Greetings:
Is it possible within the Keil environment to create a HEX file which contains just data, that is no startup, no main()?
We currently have a application which uses pointers to look to a specific flash address for its database. Rather than a single HEX file which contains both the application and its data, we would like to be able to load (via ULink, Flash Magic, etc) the application itself, then, depending on the requirements, any one of a quantity of different databases.
Obviously, the Keil environment works great to create the application including a main() function and the various requirements thereof.
What I would really like to do is write a C-file containing a structure (with an "AT" locator) and initializing data, then transform that into a HEX file.
With a significant amount of muscle, I think I see how I can achieve a HEX file with a binary editor and the HEX2BIN and BIN2HEX utilities, but is there a way do achieve that HEX file translation of a C type data with less manipulation?
Thanks for your thoughts, d
Hey Andrew:
Your suggestion to save memory via the debugger is absolutely ideal! Thanks ever so much! Your suggestion has saved me from putting together unconscionable hack code.
I have grown soft in my advancing years and rarely go beyond the functions wrapped up in the IDE. Here is a case where knowledge of the command line functions offers just what I need. Lesson learned. Make that "lesson re-learned"!
doug
After finally creating a HEX file of my external flash database, I find I am still not quite where I want to be.
After much trial and error, I conclude a AXF file (not surprisingly) contains critical information which allows, in my case, my combined internal-flash-code and external-flash-database, to be loaded by the Keil debugger.
The Keil debugger will also allow one to load a simple HEX file including the internal-flash-code, as is described elsewhere in this forum.
The Keil debugger, however, does not like to load a HEX file which consists of my external-flash-database. A verification error is reported. I surmise the combined AXF file has means to vector the external flash addressed bytes through the supplied flash download setups whereas the HEX file handling is not equally sophisticated.
I haven't given up yet, but I've certainly wearied of this.
Okay! I'm done! Here's how to get that HEX file data into external flash:
http://www.keil.com/support/man/docs/uv4/uv4_fl_hexdownload.htm