2024-09-05 07:13 AM
Hi,
I have a bootloader for my application, at the moment they exchange their working status by flash write. I think a better way is to declare a variable in RAM with the same address in both bootloader and application. Someone mentioned, in a post, that the linker script could be used for this, but didn't give an example.
Anybody could do me a favour and show me an example ? Thanks.
Solved! Go to Solution.
2024-09-09 05:44 AM
Using the first 4 bytes is a very nice solution. The last question is: does the SRAM start at 0x20000000 for all STM32 MCUs ?
2024-09-09 06:01 AM - edited 2024-09-09 06:03 AM
For the SRAMs used for data they start at 0x20000000. This is basically linked to the ARM specification and performance: need to refer to Cortex-Mx TRMs.
Example from Cortex M3 trm:
But some other SRAMs start at 0x0 for example ITCM (Tightly Coupled Memory) for F7 and H7 families. In any case, you need to check each STM32 part number datasheet.
If your original question has been answered, please mark the solution the reply that answered your original question.
Thank you.