Hi all,
I'm using a custom 28335 based board. My bootloader which runs in Sector A of the flash is derived from the factory bootloader.
My bootloader copies the "user program" from an external SPI flash into RAM. I only added some code to the factory bootloaders SPI functions to be able to reprogram the SPI flash contents through SCI and to init some GPIOs .
The user program is stored in the SPI flash in "gpio8" boot format. Here are my hex2000 parameters:
hex2000.exe $(Proj_dir)\Debug\my_prog.out -o $(Proj_dir)\Debug\my_prog.hex -i -map $(Proj_dir)\Debug\my_prog.map -romwidth 16 -boot -gpio8
My question is if there is a way to include the initial values of variables in this generated hex file.
Now I use Run-Time Autoinitialization. It loads the init tables into RAM and runs cinit. So after cinit sets the init values I have a big table in RAM. It additionally occupies the size of the initialized variables.
If I could somehow tell the linker to put the init values in out file directly and generate a HEX file from this with hex2000 utility, the bootloader were be able to initialize the variables in load time (when loads program form SCI flash) like it does when loads for example the .text sections into RAM. Solving this problem could free some RAM for me.
I hope it was clear and somebody has a good idea to solve my problem.
Thanks for helping me