Shared RAM memory from boot to firmware
Hello everye one, i have a customized bootloader and firmware, i need pass som argument from the first one to the last one, in both project, at linker scripr file i have the following:
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 12K
SHARED (xrw) : ORIGIN = 0x20002000, LENGTH = 8K
FLASH (rx) : ORIGIN = 0x8009C00, LENGTH = 25K
}
SECTIONS
{
.shared_mem :
{
. = ALIGN(4);
__shared_mem_start__ = .;
*(.shared_mem.key)
*(.shared_mem.ID)
*(.shared_mem*)
__shared_mem_end__ = .;
} > SHAREDas you can see i created a SHARED area and shared_mem into, and the application project has the same defined area, and then in the main.c files has thes two lines
__attribute__((section(".shared_mem.key"))) volatile uint32_t VERSION[20];
__attribute__((section(".shared_mem.ID"))) volatile uint32_t ID[20];if i compile, everything is okay, but when i try to write something in VERSION from the bootloader, the file's size step up a lot, like 300Kb, so if i code the following:
VERSION[0] = 1;
it makes file.bin increase its size a lot and then i cannot flash the MCU because of its size.
Do know someone what's going on?
thanks a lot in advance.
