-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
MBED_CONF_RTOS_PRESENT incorrectly pass to in-tree static library or conversely #407
Comments
1. Common change for migration to Mbed CE from Mbed CLI 1/2 (1) Remove *.lib originally for library import. Replace with git submodule. (2) Rename mbed_app.json/mbed_lib.json to mbed_app.json5/mbed_lib.json5 (3) Add/update CMakeLists.txt (4) Remove .mbedignore originally for Mbed CLI 1 (5) Update document 2. Support VS Code development 3. Temporary fix to build profile inconsistent with mbed-lora library build See: mbed-ce/mbed-os#407
Yeah, that's basically what I have done until now. But honestly, it's an ugly way to do it, and it can cause a lot of unexpected issues. I've been seriously considering just making it so a given project is set to "baremetal mode" or "OS mode" and then that globally controls whether mbed-core-flags and mbed-rtos-flags are linked together or not. That would remove the ability to have some apps build with baremetal and others build with OS within a single project. But honestly, I am not sure anyone is actually using that feature. So basically, I'd accept a PR to fix this mess by only having one of mbed-baremetal or mbed-os active at a time, set by a JSON option. |
This feature needs two build modes at the same time for single static library, like |
1. Common change for migration to Mbed CE from Mbed CLI 1/2 (1) Remove *.lib originally for library import. Replace with git submodule. (2) Rename mbed_app.json/mbed_lib.json to mbed_app.json5/mbed_lib.json5 (3) Add/update CMakeLists.txt (4) Remove .mbedignore originally for Mbed CLI 1 (5) Update document 2. Support VS Code development 3. Temporary fix to build profile inconsistent with mbed-lora library build See: mbed-ce/mbed-os#407
1. Common change for migration to Mbed CE from Mbed CLI 1/2 (1) Remove *.lib originally for library import. Replace with git submodule. (2) Rename mbed_app.json/mbed_lib.json to mbed_app.json5/mbed_lib.json5 (3) Add/update CMakeLists.txt (4) Remove .mbedignore originally for Mbed CLI 1 (5) Update document 2. Support VS Code development 3. Temporary fix to build profile inconsistent with mbed-lora library build See: mbed-ce/mbed-os#407
MBED_CONF_RTOS_PRESENT
is defined in mbed-rtos-flags. For libraries which need to distinguish betweenmbed-os
ormbed-bardmetal
build, e.g. ESP8266Interface.h, they need to determine to linkmbed-rtos-flags
to get inMBED_CONF_RTOS_PRESENT
(for linkingmbed-os
) or not (for linkingmbed-baremetal
). But only application-level CMakeLists.txt knows which ofmbed-os
andmbed-baremetal
is linked, and this information isn't passed to these libraries which rely onMBED_CONF_RTOS_PRESENT
. This will generate such error: application linkingmbed-baremetal
but libraries havingMBED_CONF_RTOS_PRESENT
definedㄝor conversely.One rough fix is these libraries all link
mbed-core-flags
and let application-level CMakeLists.txt determine to linkmbed-rtos-flags
additionally for these libraries. But this fix isn't compatible and isn't easy to apply.The text was updated successfully, but these errors were encountered: