Forums

flash_over_jtag utility (part 2)

Started by rootesracer January 20, 2003
I downloaded the latest version (07-03-2002) of the flash_over_jtag
tool, and accompanying files/docs. Nice to have the docs now,
but the -? option on the program was all that was needed to get
me running.

The update tool still does not work for me.

I can take my s record (with boot and flash mem) use the codewarrior
IDE to flash the target, power the target down, and restart with total
success.

If I take the exact same s record with the flash_over_jtag utility,
it programs and verifies with no errors, but the code doesnt run
right. I even loaded the target with the IDE, saved an s record
using (flash_over_jtag flash803.cfg test.s -rp0x0:0x87ff), then used
that file to reflash the target.
It doesnt work either.

I set the IDE linker options per the instructions.

I have to wonder if the tool itself is not handling the S record
in the same manner as the IDE.

Is Mr. Malik among us?

befuddled,

Jarrid




RE: [motoroladsp] flash_over_jtag utility (part 2)

I presume that you have compared the jtag flash827.cfg file and the flash.cfg file in your project directory for differences???

Jerry.

-----Original Message-----
From: rootesracer <j...@earthlink.net>
[mailto:j...@earthlink.net]
Sent: Monday, January 20, 2003 9:11 AM
To: m...@yahoogroups.com
Subject: [motoroladsp] flash_over_jtag utility (part 2)


I downloaded the latest version (07-03-2002) of the flash_over_jtag
tool, and accompanying files/docs.  Nice to have the docs now,
but the -? option on the program was all that was needed to get
me running.

The update tool still does not work for me.

I can take my s record (with boot and flash mem) use the codewarrior
IDE to flash the target, power the target down, and restart with total
success.

If I take the exact same s record with the flash_over_jtag utility,
it programs and verifies with no errors, but the code doesnt run
right.  I even loaded the target with the IDE, saved an s record
using (flash_over_jtag flash803.cfg test.s -rp0x0:0x87ff), then used
that file to reflash the target.
It doesnt work either.

I set the IDE linker options per the instructions.

I have to wonder if the tool itself is not handling the S record
in the same manner as the IDE.

Is Mr. Malik among us?

befuddled,

Jarrid

_____________________________________
Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer.  You need to do a "reply all" if you want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:  m...@yahoogroups.com

To Post:  m...@yahoogroups.com

To Leave: m...@yahoogroups.com

Archives: http://www.yahoogroups.com/group/motoroladsp

More Groups: http://www.dsprelated.com/groups.php3
 

" TARGET="_blank">http://docs.yahoo.com/info/terms/



________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information visit http://www.messagelabs.com
________________________________________________________________________


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information visit http://www.messagelabs.com
________________________________________________________________________
RE: [motoroladsp] flash_over_jtag utility (part 2)

Sorry, I think you are using the 56F803 DSP not the 56F827 DSP???

On the 807 DSP I reversed the order of a couple of lines in the JTAG Flash807.cfg file

for the 803, if you haven't tried it already, you might try this order:

#base start  end    P reg    ......
 0    0x0000 0x0003 1 0x0f80 ......
 0    0x0004 0x7dff 1 0x0f40 ......
 0    0x8000 0x87ff 1 0x0f80 ......
 0    0x1000 0x1fff 0 0x0f60 ......

Jerry.

-----Original Message-----
From: rootesracer <j...@earthlink.net>
[mailto:j...@earthlink.net]
Sent: Monday, January 20, 2003 9:11 AM
To: m...@yahoogroups.com
Subject: [motoroladsp] flash_over_jtag utility (part 2)


I downloaded the latest version (07-03-2002) of the flash_over_jtag
tool, and accompanying files/docs.  Nice to have the docs now,
but the -? option on the program was all that was needed to get
me running.

The update tool still does not work for me.

I can take my s record (with boot and flash mem) use the codewarrior
IDE to flash the target, power the target down, and restart with total
success.

If I take the exact same s record with the flash_over_jtag utility,
it programs and verifies with no errors, but the code doesnt run
right.  I even loaded the target with the IDE, saved an s record
using (flash_over_jtag flash803.cfg test.s -rp0x0:0x87ff), then used
that file to reflash the target.
It doesnt work either.

I set the IDE linker options per the instructions.

I have to wonder if the tool itself is not handling the S record
in the same manner as the IDE.

Is Mr. Malik among us?

befuddled,

Jarrid

_____________________________________
Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer.  You need to do a "reply all" if you want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:  m...@yahoogroups.com

To Post:  m...@yahoogroups.com

To Leave: m...@yahoogroups.com

Archives: http://www.yahoogroups.com/group/motoroladsp

More Groups: http://www.dsprelated.com/groups.php3
 

" TARGET="_blank">http://docs.yahoo.com/info/terms/



________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information visit http://www.messagelabs.com
________________________________________________________________________


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information visit http://www.messagelabs.com
________________________________________________________________________
Another thing you can do is dump the complete contents of the
device as CodeWarrior loads it and dump the contents after the
JTAG utility loads it. You can do that by unchecking the
option in the target settings of the project that specifies
that the code should be downloaded when the debugger is launched.

It's then a simple matter to save the P and X memory to a text
file and then use CodeWarrior's graphic file comparing utility
to see what's different between the two states of programming
of the DSP.

A little brute force, but it would certainly tell you what's
different and narrow down where you should start looking in
order to fix it.

--david
--- In , "rootesracer <jarrid_gross@e...>"
<jarrid_gross@e...> wrote:
> I downloaded the latest version (07-03-2002) of the flash_over_jtag
> tool, and accompanying files/docs. Nice to have the docs now,
> but the -? option on the program was all that was needed to get
> me running.
>
> The update tool still does not work for me.
>
> I can take my s record (with boot and flash mem) use the codewarrior
> IDE to flash the target, power the target down, and restart with
total
> success.
>
> If I take the exact same s record with the flash_over_jtag utility,
> it programs and verifies with no errors, but the code doesnt run
> right. I even loaded the target with the IDE, saved an s record
> using (flash_over_jtag flash803.cfg test.s -rp0x0:0x87ff), then
used
> that file to reflash the target.
> It doesnt work either.
>
> I set the IDE linker options per the instructions.
>
> I have to wonder if the tool itself is not handling the S record
> in the same manner as the IDE.
>
> Is Mr. Malik among us?
>
> befuddled,
>
> Jarrid


Hello Jarrid,

the tool works fine for me and many others. When trying the code on your
EVM - do you disconnect the printerport cable (and all other cables),
disable the on board command converter by shorting the appropriate jumper
and ground /TRST line (pin 14 on the JTAG header) before cycling power?

I believe that what you are seeing is caused by the fact that your
application does rely on same data written into RAM and the EVM is powered
through the printerport cable while you cycle power after downloading the
code using codewarrior.

I have done many different tests with the tool, however there might be a bug
of course. Does contents of the flash differ in any way from the S-record
file you are trying to download? Did you try to compare the flash and the
S-rec file by hand? You can read out contents of the flash memory by
codewarrior or the flash_over_jtag tool.

The Metrowerks debugger does not use the S-rec file when downloading code to
the DSP, it uses the ELF file instead - I have noticed that you are now
aware of this, so I am mentioning it here. The S-rec file does not have to
be generated to download code to flash using the debugger, so infact you
might have the linker set-up not to generate it and then the flash_over_jtag
tool would be using S-rec file corresponding to some old version of your
software which might not work. Please make sure the S-record file is up to
date.

Another thing to mention here is that BSS segment variables (global and
static variables initialised to 0 or left uninitialised) are treated
differently in ELF and S-rec files. For the S-rec file to work correctly
your start-up code needs to initialise the DATA segment (global and static
variables initialised to non-zero values) from flash, but you need to
initialise BSS segment directly to zero. In the ELF file you can leave the
BSS and DATA segments together and initialise all variables from flash
irrespective of their segment. This means that programs which work perfectly
when flashed by the debugger (from the ELF file) may suddenly cease to work
when flashed by tools relying on the S-rec file. This is a property of the
Metrowerks linker and there is nothing I can do about this in the
flash_over_jtag tool. The tool simply takes the S-rec file and writes it
into flash and does not care what data are inside. I can send a simple
example which shows how to implement the linker command file and the
start-up code to make the application work when flashed from the S-rec file
(please e-mail me privately, I do not want to pollute everyone's inbox;
these examples are also available on motorola pages - go to FAQs and search
for FAQ number 19080).

Daniel

> -----Original Message-----
> From: [mailto:]
> Sent: Monday, January 20, 2003 4:11 PM
> To:
> Subject: [motoroladsp] flash_over_jtag utility (part 2) > I downloaded the latest version (07-03-2002) of the flash_over_jtag
> tool, and accompanying files/docs. Nice to have the docs now,
> but the -? option on the program was all that was needed to get
> me running.
>
> The update tool still does not work for me.
>
> I can take my s record (with boot and flash mem) use the codewarrior
> IDE to flash the target, power the target down, and restart with total
> success.
>
> If I take the exact same s record with the flash_over_jtag utility,
> it programs and verifies with no errors, but the code doesnt run
> right. I even loaded the target with the IDE, saved an s record
> using (flash_over_jtag flash803.cfg test.s -rp0x0:0x87ff), then used
> that file to reflash the target.
> It doesnt work either.
>
> I set the IDE linker options per the instructions.
>
> I have to wonder if the tool itself is not handling the S record
> in the same manner as the IDE.
>
> Is Mr. Malik among us?
>
> befuddled,
>
> Jarrid >
>
> _____________________________________
> Note: If you do a simple "reply" with your email client, only the
> author of this message will receive your answer. You need to do
> a "reply all" if you want your answer to be distributed to the
> entire group.
>
> _____________________________________
> About this discussion group:
>
> To Join:
>
> To Post:
>
> To Leave:
>
> Archives: http://www.yahoogroups.com/group/motoroladsp
>
> More Groups: http://www.dsprelated.com/groups.php3 > ">http://docs.yahoo.com/info/terms/
>