Ruth Hendrix

CodeWarrior 5 IDE

Discussion created by Ruth Hendrix Employee on Jan 26, 2006
This message contains an entire topic ported from a separate forum. The original message and all replies are in this single message. We have seeded this new forum with selected information that we expect will be of value to you as you search for answers to your questions.
 
Posted: Jan 3, 2006, 5:42 p.m.
 
I want to write a windows console program to read the .s19 file generated by the IDE, compute a checksum over the firmware, and insert it into the .s19 file. I want this to happen automatically in the IDE. I know how to do this for a standard make file, but I don't know how to set up the CodeWarrior 5 IDE to call the program.
 
Posted: Jan 3, 2006, 5:49 p.m.

You may want to take a quick look at following example:
(CodeWarrior_Examples)\BatchFileRunner.
 
Posted: Jan 3, 2006, 5:00 p.m.
 
Thanks, I can now get it to do what I said I wanted. But now I find out that the debugger automatically loads the .abs file, not the .abs.s19 file I modified. I can go ahead and then manually load the .s19 file in the debugger, but then I don't have any symbolic debugging.
 
Posted: Jan 3, 2006, 5:46 p.m.
 
First a sidenote: The linker is also capable of computing various kinds
 of checksums. Use in the ide Help->Index, and in the index tab, look for "CHECKSUM". With this, the abs file would contain the checksum.
 
About your problems. The HIWAVE debugger does load the abs file because it is explicitely listed in the command line in the project settings, Build Extras tab, in the Arguments box.
 
Well, you don't see it here, but the macro %targetFilePath does just
 actually expand to the abs file name. If you do not want that this automatic load happens, just remove the "%targetFilePath".
 
Now, if you do want to automatically load your srecord instead, I propose to add something like this...
 
LOAD "bin\Test.abs.s19" AUTOERASEANDFLASH
LOAD "bin\Test.abs" SYMBOLSONLY
 
...in the cmd\*_Startup.cmd file you are using.
 
(This does flash the srecord and then loads the symbolics from the abs file.)
 
Posted: Jan 4, 2006, 10:58 a.m.
 
Thanks, I didn't use the linker's checksum routines because I wanted to embed the -CHECKSUM within the flash being checked so that the application would get a 0 when the checksum was computed.
 
Your other suggestions worked fine, although I had a little hangup until I remembered that the debugger was changing the ICG trim value at $FFBE which was in the checksummed memory.

Outcomes