FlashIAP Erase function STM32

13 Mar 2018

Hi, I'm trying to develope a bootloader application for my stm32f401 board, starting from mbed-bootloader-example.

I want to update the firmware via UART serial port.

I can successfully compile application+bootloader and program it via stlink. The bootloader mbed_start_application works well and the main application start. But if I try to write a new firmware by bootloader I got problem.

My problem is that FlashIAP Erase function always fails.

Does anyone found solution ?

Please help


15 Mar 2018

Following the bootloader tutorial I've setted

    "target_overrides": {
		"NUCLEO_F401RE": {
            "target.restrict_size": "0x20000"

but when I compile (GCC_ARM)

Using regions in this build:
  Region bootloader size 0x1ff00, offset 0x8000000
  Region application size 0x60100, offset 0x801ff00 

Region bootloader size is wrong, it must be 0x20000, as specified in mbed_app.json file. In this way it's not possible to align sector for erasing/program operation

Please log in to post a reply.