EmbeddedRelated.com
Forums

USB BDM Multilink - Command Files Syntax Help

Started by eric_cina February 14, 2008
I'm using the P&E Micro USB BDM Multilink with CodeWarrior 3.1. I
use several command files to help initialize the micro before the
BDM performs the flash load. One command file in particular is the
p&e_preload.cmd file which I have modified to do a sector erase of
the entire flash except for my bootloader which is in the upper
portion of flash.

Recently I have expanded my Bootloader and because of memory
constraints it no longer resides on a sector boundary. So before I
do a sector erase of my bootloader, I need to read the sector (512
bytes, 256 integers) into an array. Then I will perform the sector
erase and write the array back to flash, 1 word at a time.

Can anyone help me with the BDM commands to read and store these
values into an array? How do I create an array in the scripting
language? What language is it? Any documentation on this?

Thanks,
Eric
v\:* {behavior:url(#default#VML);}o\:* {behavior:url(#default#VML);}w\:* {behavior:url(#default#VML);}..shape {behavior:url(#default#VML);}
Goto www.pemicro.com , they have covered this in the FAQ I thinkor in the fourms.

Tim

From: 6...[mailto:6...] On Behalf Of eric_cina
Sent: Thursday, February 14, 2008 1:08 PM
To: 6...
Subject: [68HC12] USB BDM Multilink - Command Files Syntax Help

I'm using the P&E Micro USB BDM Multilinkwith CodeWarrior 3.1. I
use several command files to help initialize the micro before the
BDM performs the flash load. One command file in particular is the
p&e_preload.cmd file which I have modified to do a sector erase of
the entire flash except for my bootloader which is in the upper
portion of flash.

Recently I have expanded my Bootloader and because of memory
constraints it no longer resides on a sector boundary. So before I
do a sector erase of my bootloader, I need to read the sector (512
bytes, 256 integers) into an array. Then I will perform the sector
erase and write the array back to flash, 1 word at a time.

Can anyone help me with the BDM commands to read and store these
values into an array? How do I create an array in the scripting
language? What language is it? Any documentation on this?

Thanks,
Eric

---------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search.
I've searched their website and I can't find anything on it. I've
struggled with these scripts in the past as well. Its tough to find
info on it. It might be buried under documentation for one of their
other products. This yahoo group has been my best resource for this
info so far.

Eric

--- In 6..., Tim Milliken wrote:
>
> v\:* {behavior:url(#default#VML);}o\:* {behavior:url
(#default#VML);}w\:* {behavior:url(#default#VML);}..shape
{behavior:url(#default#VML);}
> Goto www.pemicro.com , they have covered this in the FAQ I thinkor
in the fourms.
>
> Tim
>
>
>
> From: 6...[mailto:6...] On
Behalf Of eric_cina
> Sent: Thursday, February 14, 2008 1:08 PM
> To: 6...
> Subject: [68HC12] USB BDM Multilink - Command Files Syntax Help
>
>
>
> I'm using the P&E Micro USB BDM Multilinkwith CodeWarrior 3.1. I
> use several command files to help initialize the micro before the
> BDM performs the flash load. One command file in particular is the
> p&e_preload.cmd file which I have modified to do a sector erase of
> the entire flash except for my bootloader which is in the upper
> portion of flash.
>
> Recently I have expanded my Bootloader and because of memory
> constraints it no longer resides on a sector boundary. So before I
> do a sector erase of my bootloader, I need to read the sector (512
> bytes, 256 integers) into an array. Then I will perform the sector
> erase and write the array back to flash, 1 word at a time.
>
> Can anyone help me with the BDM commands to read and store these
> values into an array? How do I create an array in the scripting
> language? What language is it? Any documentation on this?
>
> Thanks,
> Eric
>
>
> ---------------------------------
> Looking for last minute shopping deals? Find them fast with
Yahoo! Search.
>
>
>
v\:* {behavior:url(#default#VML);}o\:* {behavior:url(#default#VML);}w\:* {behavior:url(#default#VML);}..shape {behavior:url(#default#VML);}
Here is the link

http://www.pemicro.com/faqs/faq_view.cfm?idt

Tim

From:6... [mailto:6...] On Behalf Of eric_cina
Sent: Thursday, February 14, 2008 2:46 PM
To: 6...
Subject: [68HC12] Re: USB BDM Multilink - Command Files Syntax Help

I've searched their website and I can't findanything on it. I've
struggled with these scripts in the past as well. Its tough to find
info on it. It might be buried under documentation for one of their
other products. This yahoo group has been my best resource for this
info so far.

Eric
--- In 6...,Tim Milliken wrote:
>
> v\:* {behavior:url(#default#VML);}o\:* {behavior:url
(#default#VML);}w\:* {behavior:url(#default#VML);}..shape
{behavior:url(#default#VML);}
> Goto www.pemicro.com , they have covered this in the FAQ I thinkor
in the fourms.
>
> Tim
>
> From: 6...[mailto:6...] On
Behalf Of eric_cina
> Sent: Thursday, February 14, 2008 1:08 PM
> To: 6...
> Subject: [68HC12] USB BDM Multilink - Command Files Syntax Help
>
> I'm using the P&E Micro USB BDM Multilinkwith CodeWarrior 3.1. I
> use several command files to help initialize the micro before the
> BDM performs the flash load. One command file in particular is the
> p&e_preload.cmd file which I have modified to do a sector erase of
> the entire flash except for my bootloader which is in the upper
> portion of flash.
>
> Recently I have expanded my Bootloader and because of memory
> constraints it no longer resides on a sector boundary. So before I
> do a sector erase of my bootloader, I need to read the sector (512
> bytes, 256 integers) into an array. Then I will perform the sector
> erase and write the array back to flash, 1 word at a time.
>
> Can anyone help me with the BDM commands to read and store these
> values into an array? How do I create an array in the scripting
> language? What language is it? Any documentation on this?
>
> Thanks,
> Eric
> ---------------------------------
> Looking for last minute shopping deals? Find them fast with
Yahoo! Search.
>
>
>

---------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search.
I found the command set. Its actually part of the CodeWarrior
debugger. They call it the Debugger Engine Commands. Unfortuntately
they do not provide for any way to read a memory location and store
it in a variable as far as I can tell.

They have a "copymem" comnmand but this command seems to only be
able to copy to RAM and not to flash.

I guess moving my bootloader to a non-sector boundary makes it very
difficult to work with my BDM.

Eric

--- In 6..., Tim Milliken wrote:
>
> v\:* {behavior:url(#default#VML);}o\:* {behavior:url
(#default#VML);}w\:* {behavior:url(#default#VML);}..shape
{behavior:url(#default#VML);}
> Here is the link
>
> http://www.pemicro.com/faqs/faq_view.cfm?idt
>
> Tim
>
>
>
> From:6... [mailto:6...] On
Behalf Of eric_cina
> Sent: Thursday, February 14, 2008 2:46 PM
> To: 6...
> Subject: [68HC12] Re: USB BDM Multilink - Command Files Syntax Help
>
>
>
> I've searched their website and I can't findanything on it. I've
> struggled with these scripts in the past as well. Its tough to
find
> info on it. It might be buried under documentation for one of
their
> other products. This yahoo group has been my best resource for
this
> info so far.
>
> Eric
> --- In 6...,Tim Milliken wrote:
> >
> > v\:* {behavior:url(#default#VML);}o\:* {behavior:url
> (#default#VML);}w\:* {behavior:url(#default#VML);}..shape
> {behavior:url(#default#VML);}
> > Goto www.pemicro.com , they have covered this in the FAQ I
thinkor
> in the fourms.
> >
> > Tim
> >
> >
> >
> > From: 6...[mailto:6...] On
> Behalf Of eric_cina
> > Sent: Thursday, February 14, 2008 1:08 PM
> > To: 6...
> > Subject: [68HC12] USB BDM Multilink - Command Files Syntax Help
> >
> >
> >
> >
> >
> > I'm using the P&E Micro USB BDM Multilinkwith CodeWarrior 3.1. I
> > use several command files to help initialize the micro before
the
> > BDM performs the flash load. One command file in particular is
the
> > p&e_preload.cmd file which I have modified to do a sector erase
of
> > the entire flash except for my bootloader which is in the upper
> > portion of flash.
> >
> > Recently I have expanded my Bootloader and because of memory
> > constraints it no longer resides on a sector boundary. So before
I
> > do a sector erase of my bootloader, I need to read the sector
(512
> > bytes, 256 integers) into an array. Then I will perform the
sector
> > erase and write the array back to flash, 1 word at a time.
> >
> > Can anyone help me with the BDM commands to read and store these
> > values into an array? How do I create an array in the scripting
> > language? What language is it? Any documentation on this?
> >
> > Thanks,
> > Eric
> >
> >
> >
> >
> >
> >
> > ---------------------------------
> > Looking for last minute shopping deals? Find them fast with
> Yahoo! Search.
> >
> >
> >
>
>
> ---------------------------------
> Looking for last minute shopping deals? Find them fast with
Yahoo! Search.
>
>
>
Since you are using CodeWarrior 3.1, the command files you have are
provided by Codewarrior. If you are using P&E's software, (CPROG12Z is
the command line version) you should have a file called CPROG12Z,DOC
which has all the command line parameters, commands for script files and
error messagages listed.

Dave

eric_cina wrote:

> I've searched their website and I can't find anything on it. I've
> struggled with these scripts in the past as well. Its tough to find
> info on it. It might be buried under documentation for one of their
> other products. This yahoo group has been my best resource for this
> info so far.
>
> Eric
> --- In 6...
























'&E


&e_preload.cmd


























Command SAVE allows to read flash and store content in .s19 file. Maybe you can use it.
Example: SAVE 0x4000..0x5000 dump.s19
-> range 0x4000 .... 0x5000 is read and stored in dump.s19 file

Regards,

Jordi

----- Original Message -----
From: eric_cina
To: 6...
Sent: Friday, February 15, 2008 12:56 AM
Subject: [68HC12] Re: USB BDM Multilink - Command Files Syntax Help
I found the command set. Its actually part of the CodeWarrior
debugger. They call it the Debugger Engine Commands. Unfortuntately
they do not provide for any way to read a memory location and store
it in a variable as far as I can tell.

They have a "copymem" comnmand but this command seems to only be
able to copy to RAM and not to flash.

I guess moving my bootloader to a non-sector boundary makes it very
difficult to work with my BDM.

Eric

--- In 6..., Tim Milliken wrote:
>
> v\:* {behavior:url(#default#VML);}o\:* {behavior:url
(#default#VML);}w\:* {behavior:url(#default#VML);}..shape
{behavior:url(#default#VML);}
> Here is the link
>
> http://www.pemicro.com/faqs/faq_view.cfm?idt
>
> Tim
>
>
>
> From:6... [mailto:6...] On
Behalf Of eric_cina
> Sent: Thursday, February 14, 2008 2:46 PM
> To: 6...
> Subject: [68HC12] Re: USB BDM Multilink - Command Files Syntax Help
>
>
>
>
>
> I've searched their website and I can't findanything on it. I've
> struggled with these scripts in the past as well. Its tough to
find
> info on it. It might be buried under documentation for one of
their
> other products. This yahoo group has been my best resource for
this
> info so far.
>
> Eric
>
>
> --- In 6...,Tim Milliken wrote:
> >
> > v\:* {behavior:url(#default#VML);}o\:* {behavior:url
> (#default#VML);}w\:* {behavior:url(#default#VML);}..shape
> {behavior:url(#default#VML);}
> > Goto www.pemicro.com , they have covered this in the FAQ I
thinkor
> in the fourms.
> >
> > Tim
> >
> >
> >
> > From: 6...[mailto:6...] On
> Behalf Of eric_cina
> > Sent: Thursday, February 14, 2008 1:08 PM
> > To: 6...
> > Subject: [68HC12] USB BDM Multilink - Command Files Syntax Help
> >
> >
> >
> >
> >
> > I'm using the P&E Micro USB BDM Multilinkwith CodeWarrior 3.1. I
> > use several command files to help initialize the micro before
the
> > BDM performs the flash load. One command file in particular is
the
> > p&e_preload.cmd file which I have modified to do a sector erase
of
> > the entire flash except for my bootloader which is in the upper
> > portion of flash.
> >
> > Recently I have expanded my Bootloader and because of memory
> > constraints it no longer resides on a sector boundary. So before
I
> > do a sector erase of my bootloader, I need to read the sector
(512
> > bytes, 256 integers) into an array. Then I will perform the
sector
> > erase and write the array back to flash, 1 word at a time.
> >
> > Can anyone help me with the BDM commands to read and store these
> > values into an array? How do I create an array in the scripting
> > language? What language is it? Any documentation on this?
> >
> > Thanks,
> > Eric
> >
> >
> >
> >
> >
> >
> > ---------------------------------
> > Looking for last minute shopping deals? Find them fast with
> Yahoo! Search.
> >
> >
> >
>
>
>
>
>
>
> ---------------------------------
> Looking for last minute shopping deals? Find them fast with
Yahoo! Search.
>
>
>
Yes this works perfectly. Thanks so much. I spent 1/2 day yesterday
looking for a command that would do something like this. I use it
with "SREC" command to load the s19 file back to flash. This is so
much faster than using a sector erase like I used to do in my
preload.cmd script.

My script looks like this in case anybody ever has a similar problem.

FLASH
SAVE addr1..addr2 SAVE_BL.s19
FLASH ERASE 3
FLASH ARM
SREC SAVE_BL.s19

I was beginning to think I had to purchase the Prog12z software from
P&E but I think the Prog12z basically does the same thing I'm doing
in my script.

Thanks again,
Eric

--- In 6..., "Jordi Costa" wrote:
>
> Command SAVE allows to read flash and store content in .s19 file.
Maybe you can use it.
> Example: SAVE 0x4000..0x5000 dump.s19
> -> range 0x4000 .... 0x5000 is read and stored in dump.s19 file
>
> Regards,
>
> Jordi
>
> ----- Original Message -----
> From: eric_cina
> To: 6...
> Sent: Friday, February 15, 2008 12:56 AM
> Subject: [68HC12] Re: USB BDM Multilink - Command Files Syntax
Help
> I found the command set. Its actually part of the CodeWarrior
> debugger. They call it the Debugger Engine Commands.
Unfortuntately
> they do not provide for any way to read a memory location and
store
> it in a variable as far as I can tell.
>
> They have a "copymem" comnmand but this command seems to only be
> able to copy to RAM and not to flash.
>
> I guess moving my bootloader to a non-sector boundary makes it
very
> difficult to work with my BDM.
>
> Eric
>
> --- In 6..., Tim Milliken wrote:
> >
> > v\:* {behavior:url(#default#VML);}o\:* {behavior:url
> (#default#VML);}w\:* {behavior:url(#default#VML);}..shape
> {behavior:url(#default#VML);}
> > Here is the link
> >
> > http://www.pemicro.com/faqs/faq_view.cfm?idt
> >
> > Tim
> >
> >
> >
> > From:6... [mailto:6...] On
> Behalf Of eric_cina
> > Sent: Thursday, February 14, 2008 2:46 PM
> > To: 6...
> > Subject: [68HC12] Re: USB BDM Multilink - Command Files Syntax
Help
> >
> >
> >
> >
> >
> > I've searched their website and I can't findanything on it.
I've
> > struggled with these scripts in the past as well. Its tough to
> find
> > info on it. It might be buried under documentation for one of
> their
> > other products. This yahoo group has been my best resource for
> this
> > info so far.
> >
> > Eric
> >
> >
> > --- In 6...,Tim Milliken wrote:
> > >
> > > v\:* {behavior:url(#default#VML);}o\:* {behavior:url
> > (#default#VML);}w\:* {behavior:url(#default#VML);}..shape
> > {behavior:url(#default#VML);}
> > > Goto www.pemicro.com , they have covered this in the FAQ I
> thinkor
> > in the fourms.
> > >
> > > Tim
> > >
> > >
> > >
> > > From: 6...[mailto:6...]
On
> > Behalf Of eric_cina
> > > Sent: Thursday, February 14, 2008 1:08 PM
> > > To: 6...
> > > Subject: [68HC12] USB BDM Multilink - Command Files Syntax
Help
> > >
> > >
> > >
> > >
> > >
> > > I'm using the P&E Micro USB BDM Multilinkwith CodeWarrior
3.1. I
> > > use several command files to help initialize the micro
before
> the
> > > BDM performs the flash load. One command file in particular
is
> the
> > > p&e_preload.cmd file which I have modified to do a sector
erase
> of
> > > the entire flash except for my bootloader which is in the
upper
> > > portion of flash.
> > >
> > > Recently I have expanded my Bootloader and because of memory
> > > constraints it no longer resides on a sector boundary. So
before
> I
> > > do a sector erase of my bootloader, I need to read the
sector
> (512
> > > bytes, 256 integers) into an array. Then I will perform the
> sector
> > > erase and write the array back to flash, 1 word at a time.
> > >
> > > Can anyone help me with the BDM commands to read and store
these
> > > values into an array? How do I create an array in the
scripting
> > > language? What language is it? Any documentation on this?
> > >
> > > Thanks,
> > > Eric
> > >
> > >
> > >
> > >
> > >
> > >
> > > ---------------------------------
> > > Looking for last minute shopping deals? Find them fast with
> > Yahoo! Search.
> > >
> > >
> > >
> >
> >
> >
> >
> >
> >
> > ---------------------------------
> > Looking for last minute shopping deals? Find them fast with
> Yahoo! Search.
> >
> >
> >
>
>
>