2022-05-21 03:41 AM
Problem:
I am trying to create a bootloader and a user application to do my Over the air project. So for custom bootloader I had selected sector 0 and sector 1 of flash memory. (Address starts at 0x08000000) and from sector 2 I want my user application. So I created both of them and when flashing bootloader I don't have any problem with cubeIDE. Now when I flash application on sector 2, the earlier bootloader section 0 is getting erased. How can I prevent from happening in cubeIDE. If I use cube programmer I have control over the options, but how can I do that with STM32 Cube Ide?
-------------------------------------------------------------------------------------------------------------------------------
Details:
I use STM32CubeIDE
Version: 1.6.0
Build: 9614_20210223_1703 (UTC)
Hardware: Nucleo-F411re
Solved! Go to Solution.
2022-05-21 11:24 AM
By default, only used sectors are erased. Sounds like your application is still using sector 0, most likely the vector table is still located there. Did you edit the app linker script to specify the app flash range?
2022-05-21 11:24 AM
By default, only used sectors are erased. Sounds like your application is still using sector 0, most likely the vector table is still located there. Did you edit the app linker script to specify the app flash range?
2022-05-21 06:03 PM
My bootloader memory location:/* Memories definition */
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 512K
}
And my application memory location
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
FLASH (rx) : ORIGIN = 0x08008000, LENGTH = 512K
}
Should I change the length or something?
2022-05-21 07:34 PM
You should set the LENGTH to 32K and 512K-32K respectively, but that should not be the problem here.
Try updating CubeIDE to the newest version.
2022-05-21 08:27 PM
True. It's not a problem, but I will change.