5 years, 10 months ago.

Is mbedignore the only way to drop features?

Useful article Jan. However, is mbedignore the only way to drop features from the build? I'm trying to build both a bootloader and a main application from the same project folder. I've created two different targets in targets.json to do this. The two builds share code but the main application uses more features than the bootloader which I'm trying to squash as small as possible. I have also seen references to using a "features_remove" array in targets.json but when I try this I always just get a message saying that the feature I'm trying to remove is not recognised.

Question relating to:

1 Answer

5 years, 10 months ago.

Hi Neil,

Other than directly removing the unused directories, .mbedignore is the simplest way to drop features from Mbed OS. However, for your bootloader and main application that use different Mbed OS features, you would need 2 different .mbedignore files to drop features for these separate applications. The easiest way to do this would be to separate your bootloader and main application into two separate projects, each with their own current copy of Mbed OS and their respective .mbedignore files.

I've spoken with my colleagues regarding your issue as well and one of our teams has created an Mbed OS project that has both a bootloader and app together in the same project folder using config and Make files, you can check out how they implemented it here: https://github.com/armmbed/ref-wem-firmware

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!