Hi,
I’m trying to create a bootloader for my project by following the tutorial here: https://os.mbed.com/docs/mbed-os/v5.15/tutorials/bootloader.html. I get the code to build on Mbed studio when building for some processors, but unfortunately not when building for the target I’m using - F401RE.
The main.cpp code is from this example here: https://github.com/ARMmbed/mbed-os-example-bootloader and the mbed_app.json is as seen below:
{
“config”: {
“update_file”: {
“help”: “Path to the application update binary on the SD card”,
“value”: “"mbed-os-example-blinky_application.bin"”
},
“sd_card_mosi”: {
“help”: “MCU pin connected to the SD card’s SPI MOSI pin”,
“value”: “PC_12”
},
“sd_card_miso”: {
“help”: “MCU pin connected to the SD card’s SPI MISO pin”,
“value”: “PC_11”
},
“sd_card_sck”: {
“help”: “MCU pin connected to the SD card’s SPI SCK pin”,
“value”: “PC_10”
},
“sd_card_cs”: {
“help”: “MCU pin connected to the SD card’s SPI CS pin”,
“value”: “PC_4”
}
},
“target_overrides”: {
“NUCLEO_F429ZI”: {
“target.components_add”: [“SD”],
“target.restrict_size”: “0x40000”
},
“NUCLEO_F401RE”: {
“target.components_add”: [“SD”],
“target.restrict_size”: “0x40000”
},
“NUCLEO_F411RE”: {
“target.components_add”: [“SD”],
“target.restrict_size”: “0x40000”
}
}
}
When trying to build for F429ZI (as in the example mbed_app.json) or F411 (or several other seemingly unrelated processors) it builds fine, but with F401 it does not seem to find the target.restrict_size configuration.
[Error] main.cpp@9,2: “target.restrict_size must be set for your target in mbed_app.json”