Report
9 months, 1 week ago.

Does .mbedignore still work?

Hi,

Back in April 2018 I tried the mbed-os-example-lorawan example using .mbedignore from this note: https://os.mbed.com/blog/entry/Reducing-memory-usage-by-tuning-RTOS-con/ and it worked for me.

Now that I have revisited the same example using mbed-cli 1.7.2 with mbed-os 5.9.5 it no longer works - can someone please suggest a fix?

When I compile with .mbedignore containing:

mbed-os/rtos/*
mbed-os/features/cellular/
mbed-os/features/FEATURE_CLIENT/*
mbed-os/features/FEATURE_COMMON_PAL/*
mbed-os/features/FEATURE_UVISOR/*
mbed-os/features/frameworks/*
mbed-os/features/net/*
mbed-os/features/netsocket/*
mbed-os/features/nvstore/*
mbed-os/features/storage/*

mbed compile -m DISCO_L072CZ_LRWAN1 -t GCC_ARM I see:

...
Compile [  6.6%]: DeviceKey.cpp
[Fatal Error] DeviceKey.cpp@20,10: nvstore.h: No such file or directory
[ERROR] '_queue.SimpleQueue' object has no attribute 'queue'
[mbed] ERROR: "C:\Program Files (x86)\Python37-32\python.exe" returned error code 1.
[mbed] ERROR: Command "C:\Program Files (x86)\Python37-32\python.exe -u C:\Users\nicbk\stmicro\mbed-os-example-lorawan\mbed-os\tools\make.py -t GCC_ARM -m DISCO_L072CZ_LRWAN1 --profile ./release.json --source . --build .\BUILD\DISCO_L072CZ_LRWAN1\GCC_ARM -c" in "C:\Users\nicbk\stmicro\mbed-os-example-lorawan"
...

Even just trying .mbedignore containing only:

mbed-os/features/cellular/

shows a similar error during compile:

...
Compile [ 68.7%]: OnboardCellularInterface.cpp
[Fatal Error] OnboardCellularInterface.h@19,10: EasyCellularConnection.h: No such file or directory
[ERROR] '_queue.SimpleQueue' object has no attribute 'queue'
[mbed] ERROR: "C:\Program Files (x86)\Python37-32\python.exe" returned error code 1.
[mbed] ERROR: Command "C:\Program Files (x86)\Python37-32\python.exe -u C:\Users\nicbk\stmicro\mbed-os-example-lorawan\mbed-os\tools\make.py -t GCC_ARM -m DISCO_L072CZ_LRWAN1 --profile ./release.json --source . --build .\BUILD\DISCO_L072CZ_LRWAN1\GCC_ARM -c" in "C:\Users\nicbk\stmicro\mbed-os-example-lorawan"

Thanks!

Question relating to:

Hi Nic,

I was able to reproduce the errors you are seeing with the mbed-os-example-lorawan and the .mbedignore file you mentioned above. I'm using Mbed CLI version 1.7.5 and Mbed OS version 5.9.5. I'm looking into it. Thanks!

- Jenny, team Mbed

posted by Jenny Plunkett 15 Aug 2018

Hi Jenny, any update on this? Thanks!

posted by Nic Burkinshaw 23 Aug 2018

This is still causing me issues, all suggestions gratefully received...

posted by Nic Burkinshaw 30 Aug 2018
Comment on this question

2 Answers

8 months, 3 weeks ago.

Hi Nic,

So the mbed-os-example-lorawan actually uses the Mbed OS events library (https://github.com/ARMmbed/mbed-os-example-lorawan/blob/master/main.cpp#L21) so you'll need to make sure the events folder is not included in your .mbedignore file. It also uses a few folders within the mbed-os/features/frameworks/* directory so you need to make sure you are not excluding those from compilation either.

Here's the .mbedignore file I used to successfully compile the mbed-os-example-lorawan program (with the command: mbed compile -m DISCO_L072CZ_LRWAN1 -t GCC_ARM --clean):

mbed-os/rtos/*
mbed-os/features/cellular/
mbed-os/features/FEATURE_UVISOR/*
mbed-os/features/frameworks/greentea-client/*
mbed-os/features/frameworks/mbed-client-randlib/*
mbed-os/features/frameworks/mbed-coap/*
mbed-os/features/frameworks/unity/*
mbed-os/features/frameworks/utest/*
mbed-os/features/nanostack/*
mbed-os/features/netsocket/*
mbed-os/features/nvstore/*
mbed-os/features/storage/*
mbed-os/features/device_key/*

I am using Mbed OS version 5.9.6 and Mbed CLI version 1.8.0.

Please let me know if you have any questions!

- Jenny, team Mbed

If this solved your question, please make sure to click the "Thanks" link below!

Hi Jenny, Thanks very much for the detective work. I tried your suggestion and it failed to compile, missing 'nsapi.h' - I think my problem was caused by an mbed-os update that did not fully work. Another mbed update --clean --clean-deps sorted it and now everything compiles fine.

posted by Nic Burkinshaw 05 Sep 2018

Glad it's working for you now Nic!

- Jenny, team Mbed

posted by Jenny Plunkett 05 Sep 2018
9 months, 1 week ago.

Hi Nic,

.mbedignore works for me.

I'm using mbed-cli 1.7.5 and mbed-os master. If .mbedignore stopped working with any earlier version I didn't notice.

One problem with the .mbedignore file is that it has to be updated if the mbed-os team move, add or delete folders.

HTH, Matt


To post an answer, please log in.