I develop for the STM32 environment (same IDE), and I have to change the original Linker Script. I would like to store a struct in the exact memory address. If I create a new memory item (in the MEMORY body), it could be a solution but I have to specify the length. ( but I dont want to) Can I do it without knowing the length / struct size?
This is my current solution:
.isr_vector:
...
.text:
{
. = ALIGN(0x8000300);
KEEP(*(.SWHEADER_SECTION))
}>FLASH
.text:
...
So it will store SWHEADER_SECTION into 0x8000300, and the FLASH will continue on the next section. I can't add a variable to ALIGN instead of setting a constans. I have tried lots of other solutions, but they were not effecive or the linker dropped an error (ex: OVERLAPPED, etc.) Is there any other solution?
Another question: If the SWHEADER_SECTION is written like this, then between these two sections, there will be a section that will not be used. Is it possible that .isr_vector can be followed by the common .text, and the linker can skip space by the SWHEADER_SECTION section?
Thanks!