How to Use a Variable in SRAM to Communicate between Bootloader and Application
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-05 7: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.
- Labels:
-
Flash
-
RAM
-
STM32F1 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-09 5: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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-09 6:01 AM - edited ‎2024-09-09 6: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.

- « Previous
-
- 1
- 2
- Next »