I was trying to add wolfboot library ( which uses as a secure bootloader and for OTA firmware upgrades written in C) to my project which is based on Arduino platform , and then I got the following error ,
I just copied stm32f7.c file from hal folder which provided by the wolfssl to the src directory and compiled, now there’s no more compile error.
Should I also need to update the linker file which provided by them with the stm arduino core linker file ?
Actually, are you sure? I took one more look at it and it looks to me like there should be two binaries involved. Once, you build + upload the bootloader (“wolfBoot.bin”) from the repo. The bootloader is only linked with that special linker file, it restricts it to the start at the start of flash ( 0x08000000) and the value of BOOTLOADER_PARTITION_SIZE. Only source codes from wolfBoot go into the wolfBoot.bin, none of your firmware or the Arduino stuff.
Then you have to adapt your (Arduino) firmware to start at a different offset, aka after the bootloader, which is when I read this correctly is 0x08020000. However, there is a 0x100 big firmware image header before the actual entry point that is generated “somehow”.
With this, the Arduino linker script should be unmodified, but you still have to tell it the offset (doable via this) and probably do a special post-processing step to correctly append the header.
Correct ,that I modified the existing linker script when building the my build+the bootloader for the give start address by the wolfboot .That I have done in a separate task. Currently i’m working on with the OTA update process and try to add the wolfboot library to the firmware and use their API’s.