2020-08-25 07:27 AM
I am developing an application that requires over the air firmware update, but my MCU's Bootloader does not support this Task (stm32f446re).
So I was thinking to do this :
1)My main appllication will be located at 0x0800 0000 on the flash
2) At some point a newer version of the firmware will be received and that version will be temporarily be stored at 0x0802 0000(sector 5).
3) After checking if the new firmware is vaild the applicatoin will call the program Flash_Rewrite to copy the new firmware at 0x0800 0000. Flash_Rewrite program will be located at 0x0804 0000( sector 6 of the Flash-Memory) .It must be a different program and not just a function of the main application because it will have to use it's own copy of all the necessary drivers.
4) When Flash_Rewrite finishes the system shall restart with the new version of the application.
PROBLEM:
Although the Flash_Rewrite program works fine when its located at 0x0800 000(it performs just fast blink instead of copying at this early stage of development) it fails to start when I change its starting address at 0x0804 0000 from the STM32F446RETX_FLASH.ld file.
Solved! Go to Solution.
2020-08-25 08:09 AM
Yes, you can stage data wherever. You can build for specific addresses via linker script or scatter file.
Generally you'd want a small boot loader at the 0x08000000 address which can check application integrity and check for new firmware to copy over into the active location.
2020-08-25 08:09 AM
Yes, you can stage data wherever. You can build for specific addresses via linker script or scatter file.
Generally you'd want a small boot loader at the 0x08000000 address which can check application integrity and check for new firmware to copy over into the active location.
2020-08-25 04:36 PM
> it fails to start when I change its starting address at 0x0804 0000 from the STM32F446RETX_FLASH.ld file.
Code starts from 0x08000000. If your program is somewhere else, you'll need to load code at 0x08000000 to jump to where your program is.