Is there a way to flash two different programs on different sectors of the same Flash?
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.
