2021-06-11 12:12 AM
I want to define a variable at a fixed address RAM with __attribut__ noinit , in order to set a magic key for trigger bootloader update request.
I have done some researches but can't edit the linker sript file correctly neither with GCC in STM32CUBEide.
Some one can help me in setup also the scatter file configuration of the KEIL uVISION for realize the same things for the BOOTLOADER?
2021-06-11 12:27 AM
Couldn't you just use a pointer?
uint32_t *foo = (uint32_t *)0x2000FFFC;
printf ("%d\n", *foo);
2021-06-11 12:32 AM
but how to make foo var no init after reset?
2021-06-11 04:41 AM
Shrink the RAM size the linker can use, and on GNU/GCC move/check where the initial stack pointer is set.
2021-06-11 07:04 AM
If the pointer points to an address outside of the linker script sections, it will not be initialized.