We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Using STM32F203CB (20KB RAM)
Question 1) Do I have to make sure that the RAM required for my bootloader and the RAM required for my application code is less than the 20K available on this device?
Question 2) Do I need to make sure that the bootloader RAM and application RAM are in separate memory spaces?
At the moment I set both RAM locations to start at 0x20000000 with a size of 0x5000.
I feel like I'm battling a compiler issue, but accept that it could the due to the above.
Many thanks,
Stephen Ormston.
Normally not.
The application startup code will normally initialize all global variables. Either they get explicit values, or they get zeroed.
This means that if the boot loader and your application have variables placed at the same address, the startup code will normally destroy the contents of the variable before the application reaches main().
You can either use attributes or memory segments to specify that some variables shouldn't be zeroed. Or you may just defined the memory block as smaller than it really is, and then you access the remaining bytes using a pointer.