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
One way of doing this would be to create a complete application with a dummy main() and everything. Then strip everything but your data from the resulting HEX file. This can be done with a tool like SRecord.
http://srecord.sf.net
By the way, the fromelf utility (which generates HEX files among other things) has a great deal of flexibility. You should be able to make it output only the data you want into the HEX file:
http://www.keil.com/support/man/docs/armutil/armutil_BABCHFEB.htm
First, why c? Well, if you must know I haven't don't anything but patchwork in assembler since my Z80 days (talk about dating ones self!). I'm a little intimidated by the ARM.
Actually I have done the cut operation on a main() enabled program HEX file output. That works, but I was hoping for a solution which I can be a bit more confidant will be done correctly if/when I get to the point of passing this project off to some other unlucky sole.
But, if you're just creating a data .HEX file, ARM is irrelevant.
If your data is already in a file, then there are plebty of utilities for converting to .hex...