Hello Team,
I am trying to create a section in the known fixed code flash address and would like to store 3 bytes in that address or section.
Could you please assist me in creating the section in the .ld file and adding the necessary memory to it?
I have already attempted the following, but I'm still unable to store the data in that section. I would appreciate your urgent assistance with this issue. Thank you!
MEMORY
{
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00100000
RAM (rwx) : ORIGIN = 0x40000000, LENGTH = 0x00040000
MY_SECTION (rwx) : ORIGIN = 0x40040000, LENGTH = 0x00010000
}
SECTIONS
{
.text : { *(.text) } > FLASH
.data : { *(.data) } > RAM
.bss : { *(.bss) } > RAM
.my_section :
{
. = ALIGN(4);
*(.my_section)
. = ALIGN(4);
} > MY_SECTION
}
const uint8_t __attribute__ ((section (".my_section"))) Ecu_Cu8_SwVersionNum[3] = {0x19U, 0x08U, 0x08U}; /* Year=25, Week=08, Patch Level=8 */