remote firmware update and flash delete
im trying to implement a firmware update via uart on stm32f042.
turns out that in order to jump to system memory boot mode in mid program, i need to clear first 4 bytes of the flash (AN2606)
also it turns out that it is not possible to delete only few bytes, but minimal deletion would be 1 page (1k byte).. which means that i delete my own code that is running on the mcu.
so first question would be, is there any other way to preform this firmware update?
second question would be, is there a way that my code doesnt start on the beginning of the flash (for example, flash address is 0x08000000, and there would be some kind of "go to address 0x08000400", and then my main code would be there)
is that doable?
any other insights are more than welcome