In my application I use one block of the flash area as data area. A external progam creates a HEX file containing this datas: (example:
:020000040800F2 :020000020000FC :207C0000207A6D657F04000007000000090000000900000009000000090000000900000041 :207C20000900000009000000090000000900000009000000090000000900000009000000FC
) This data area can be written by a flashloader program directly to the specified block. This works fine in my target system without the debugger. But, if I load the generated hex file by the linker to the target memory with the ulink debugger the specified datas are missing (of course)! Therefore Is there any possibility to link the external hex file to my application hexfile? P.S. I've read the "http://www.keil.com/support/docs/2666.htm" app-note as well as "http://www.keil.com/forum/docs/thread15460.asp" and "http://www.keil.com/forum/docs/thread3592.asp" and "http://www.keil.com/forum/docs/thread3564.asp" but I couldn't find a usefull hint to integrate the external hex file directly to the application hexfile!
One possible solution is to convert it to binary file, then convert binary to a code constant variable and position it in your program at absolute position where you want it to be.
Ok, I know so far how to convert a hex file to a binary file! But how to convert this binary to a code constant array? And how to place this at an absolute adress? I need to to this at every run of the compiler linker, because my datas might be changed each time!
For converting bin to c, you will have to find an utility online, you can look for something like bin2c, or you will have to write such an utility yourself. For absolute address positioning you can use "__at" directive or you can use custom defined linker script. You will have to read the documentation on using __at or linker script for details.