Ed Proulx

How to produce 2 S19 record files from a single linker command

Discussion created by Ed Proulx on Mar 16, 2010
Latest reply on Mar 16, 2010 by Ed Proulx

I have a CodeWarrior project in which the linker control file specifies the load adddress in flash to load and run from.


Normally, it is loaded and run from 0x20000.


To upgrade the image (which is typically a live, in-service upgrade of the target), I modify the linker control file to load at 0x50000, then download that second S19 file into flash to the 0x50000 address, then reset my system.


All subsequent upgrades then are loaded into either 0x20000 or 0x50000. I never know if the current image is running from 0x20k or 0x50k, so I just prepare 2 images before upgrade.


Currently, it is required that once the load for 20k is produced, I rename the resulting S19 file (so I don't lose it), then edit the linker control file and then re-link to produce the 0x50K load (and rename that one). A bit of a pain.


As a convenience, is it possible to have CodeWarrior automatically produce 2 S19 files with a single link command, one for the 0x20000 zone with a unique S19 file name, and a 2nd one for 0x50000 with some other unique S19 file name?


Or am I asking too much?




Note: at the very least, a nice to have: a variable local to the linker control file that is then using within the MEMORY section.