Tool/software:
Hello,
I have a question about memory. I have two places marked out in the program for parameters (HWParam addr: 0x00000400 (R) ) and for data (ParamConfig addr: 0x00000800 (RW)).
The parameters are written at initialization and should never be changed. Data is overwritten during the program.
device_linker.cmd
-uinterruptVectors
--stack_size=512
MEMORY
{
IntVectors (RW) : origin = 0x00000000, length = 0x00000400
HWParam (R) : origin = 0x00000400, length = 0x00000400
ParamConfig (RW) : origin = 0x00000800, length = 0x00000400
FLASH (RX) : origin = 0x00000C00, length = 0x0001F400
SRAM (RWX) : origin = 0x20200000, length = 0x00008000
BCR_CONFIG (R) : origin = 0x41C00000, length = 0x00000080
BSL_CONFIG (R) : origin = 0x41C00100, length = 0x00000080
}
SECTIONS
{
.intvecs: > 0x00000000
//Přidáno
.myData : palign(8) {} > HWParam
.controllerData : palign(8) {} > ParamConfig
.text : palign(8) {} > FLASH
.const : palign(8) {} > FLASH
.cinit : palign(8) {} > FLASH
.pinit : palign(8) {} > FLASH
.rodata : palign(8) {} > FLASH
.ARM.exidx : palign(8) {} > FLASH
.init_array : palign(8) {} > FLASH
.binit : palign(8) {} > FLASH
.TI.ramfunc : load = FLASH, palign(8), run=SRAM, table(BINIT)
.vtable : > SRAM
.args : > SRAM
.data : > SRAM
.bss : > SRAM
.sysmem : > SRAM
.stack : > SRAM (HIGH)
.BCRConfig : {} > BCR_CONFIG
.BSLConfig : {} > BSL_CONFIG
}
This is how I written to memory


And like this I overwritte the data during the program.

But I have a problem that when the data is overwritten during the program, the parameters(HWParam addr: 0x00000400 (R) ) are also deleted.
Before overwritten:

After overwritten:

Could someone advise me why the data is deleted, even though a separate place is created for the parameters ? Moreover, if the memory should only be READ ?
Thank for any support