Describe the bug
Hi Mbed team, @ladislas @Patater ,
We are using Mbed-OS 6.14 with Mbed-CLI2 and CMake to port a bootloader for our custom target.
In “target_overrides” we are simply using “target.restrict_size”: “0x20000” to basically use the managed bootloader. However, when we are compiling the bootloader application, it seems as though the POST_APPLICATION_ADDR macro is not being defined.
...
X-BL.dir/main.cpp.obj.d -o CMakeFiles/VOYAGER-PHOENIX-BL.dir/main.cpp.obj -c ../../../../main.cpp
../../../../main.cpp: In function 'int main()':
../../../../main.cpp:28:28: error: 'POST_APPLICATION_ADDR' was not declared in this scope
28 | mbed_start_application(POST_APPLICATION_ADDR);
| ^~~~~~~~~~~~~~~~~~~~~
../../../../main.cpp: In function 'bool update(const char*)':
../../../../main.cpp:37:28: error: 'POST_APPLICATION_ADDR' was not declared in this scope
37 | apply_update(file, POST_APPLICATION_ADDR);
| ^~~~~~~~~~~~~~~~~~~~~
Why is the macro not being defined?
Expected behavior
The simple bootloader application builds and POST_APPLICATION_ADDR=0x8020000
Desktop (please complete the following information):
OS: Ubuntu
Version: 20.04.2
Mbed (please complete the following information):
Device: custom board based on STM32WB55xG
Mbed OS Version: 6.14.0
Mbed CLI 2 Version: 7.34.0
Additional context
Add any other context about the problem here.
Describe the bug Hi Mbed team, @ladislas @Patater ,
We are using Mbed-OS 6.14 with Mbed-CLI2 and CMake to port a bootloader for our custom target.
In “target_overrides” we are simply using “target.restrict_size”: “0x20000” to basically use the managed bootloader. However, when we are compiling the bootloader application, it seems as though the POST_APPLICATION_ADDR macro is not being defined.
I followed this guide to port a custom target using Mbed-CLI2: Porting custom boards - Porting | Mbed OS 6 Documentation Could you maybe give some pointers as to why this is happening?
To Reproduce Our custom_targets.json:
Our mbed_app.json:
Top-level CMakeLists.txt
Custom target CMakeListst.txt (based on the mbed-stm32wb55xg):
Compiling command line:
And the last output from the build:
Why is the macro not being defined?
Expected behavior The simple bootloader application builds and POST_APPLICATION_ADDR=0x8020000
Desktop (please complete the following information):
Mbed (please complete the following information):
Additional context Add any other context about the problem here.