ARMmbed / mbed-os

Arm Mbed OS is a platform operating system designed for the internet of things
https://mbed.com
Other
4.67k stars 2.98k forks source link

Disabling mbed-os features in .mbedignore broken in version >=5.12 #10678

Closed kluszkiewicz closed 5 years ago

kluszkiewicz commented 5 years ago

Description

Target: DISCO_L072CZ_LRWAN1 Toolchain: GCC_ARM (GNU Tools for ARM Embedded Processors 6-2017-q2-update) 6.3.1 20170620 (release) [ARM/embedded-6-branch revision 249437] Tools: mbed-cli 1.8.3 mbed-os: 73f096399b4c (mbed-os-5.12.4) program: mbed-os-example-blinky-no-rtos (#e98302381ff3)

When I'm building https://github.com/janjongboom/mbed-os-example-blinky-no-rtos in orignal state (with mbed-os 5.11.2) with some mbed-os features disabled in .mbedignore (no changes to repo state) everything works fine - features mentioned in .mbedignore are disabled and project is properly compiled and linked. It is fine also for mbed-os 5.11.5.

But if I'm trying to build the project with mbed-os 5.12.* build fails because of header dependencies to disabled features (nanostack, netsocket,...). Example: ` Compile [ 1.3%]: rf_configuration.c [Fatal Error] rf_configuration.c@16,44: nanostack/platform/arm_hal_phy.h: No such file or directory [ERROR] .\mbed-os\components\802.15.4_RF\stm-s2lp-rf-driver\source\rf_configuration.c:16:44: fatal error: nanostack/platform/arm_hal_phy.h: No such file or directory

include "nanostack/platform/arm_hal_phy.h"

`

Same issue occures for https://github.com/ARMmbed/mbed-os-example-lorawan (d1ccef0a039cc2ac76c15d36571d248ee88e2519).

Issue request type

[ ] Question
[ ] Enhancement
[x] Bug

So it seems that in mbed-os version >=5.12 there is dependency issue which makes disabling features in .mbedignore impossible.

Krystian

ciarmcom commented 5 years ago

Internal Jira reference: https://jira.arm.com/browse/MBOCUSTRIA-1230

AnttiKauppila commented 5 years ago

@kluszkiewicz This is a valid issue and is going to be fixed. @artokin will take care of this, but in the meanwile you should ignore \mbed-os\components\802.15.4_RF folder (you don't need 802.15.4 drivers for LoRaWAN or blinky examples)

artokin commented 5 years ago

PR https://github.com/ARMmbed/mbed-os/pull/10680 created to fix this issue.

0xc0170 commented 5 years ago

Quick fix !

kluszkiewicz commented 5 years ago

@kluszkiewicz This is a valid issue and is going to be fixed. @artokin will take care of this, but in the meanwile you should ignore \mbed-os\components\802.15.4_RF folder (you don't need 802.15.4 drivers for LoRaWAN or blinky examples)

true, but for https://github.com/ARMmbed/mbed-os-example-lorawan i need this driver, but have same issue.

AnttiKauppila commented 5 years ago

What exactly are you trying to do?

kluszkiewicz commented 5 years ago

@AnttiKauppila I'm trying to disable some mbed-os features (in .mbedignore) in mbed-os-example-lorawan application to reduce code and program size. I'm tring to do this following: https://github.com/ARMmbed/mbed-os-example-lorawan/issues/122 https://os.mbed.com/questions/82060/Does-mbedignore-still-work/ https://os.mbed.com/blog/entry/Reducing-memory-usage-by-tuning-RTOS-con/

example of my .mbedignore: mbed-os/features/cellular/ mbed-os/features/cryptocell/ mbed-os/features/deprecated_warnings/ mbed-os/features/device_key/* mbed-os/features/FEATURE_BLE/* mbed-os/features/FEATURE_BOOTLOADER/* mbed-os/features/lwipstack/* mbed-os/features/nanostack/* mbed-os/features/netsocket/* mbed-os/features/nfc/* mbed-os/features/storage/* mbed-os/features/unsupported/* mbed-os/features/frameworks/greentea-client/* mbed-os/features/frameworks/mbed-client-cli/* mbed-os/features/frameworks/mbed-client-randlib/* mbed-os/features/frameworks/mbed-coap/* mbed-os/features/frameworks/nanostack-libservice/* mbed-os/features/frameworks/TARGET_PSA/* mbed-os/features/frameworks/unity/* mbed-os/features/frameworks/utest/*

artokin commented 5 years ago

@kluszkiewicz , PR https://github.com/ARMmbed/mbed-os/pull/10680 is now merged in to Mbed OS master and it will fix the issue with compilation of rf_configuration.c.

For me the application builds OK if I add mbed-os/usb/* mbed-os/features/frameworks/TARGET_PSA/* to the .mbedignore.

Would you please verify the fix?

kluszkiewicz commented 5 years ago

@artokin I've checked out mbed-os at master(#a8444bd6ff21) and updated .mbed ignore and can confirm that application build OK now.

AnttiKauppila commented 5 years ago

@kluszkiewicz Can you close this now?