i'm writing a bootloader, and therefor i need to put few variable initialisations into the seperated bootloader segment (not in standard COPYDOWN section!). How can i do this?
The bootloader segment is defined in *.prm file like this
SEGMENTS...BOOTLOADER = READ_ONLY 0xD600 TO 0xF9FF;...ENDPLACEMENT...BOOT INTO BOOTLOADER;...END
The bootloader code is located in a Boot.c file, and this file starts with
//beginning of Boot.c
#pragma CODE_SEG BOOT
unsigned long my_var = 0x11;
In the *.map file i can see that the functions in this Boot.c are located in BOOT segment, but my_var is still in the standard COPYDOWN segment. How can i put my_var initial value in BOOT?