6 years, 3 months ago.

How to compile and link smallest necessary files in mbed-os?

I have read the memory usage optimize post mentioned in this post https://os.mbed.com/questions/81717/Reducing-mbed-rtos-footprint-to-smallest/. As I know, all source code in mbed-os directory will be compiled and linked. But what I need is only necessary and project needed files. How to crop unnecessary parts like USB, NFC, Network and so on? I found possible answer that *'The build tools include every source file found in the project unless it is in a label directory, it is in a test directory or it matches a pattern in an .mbedignore file.'* in link https://os.mbed.com/docs/mbed-os/v5.12/reference/mbed-os-build-rules.html. So the best way is using .mbedignore file? Couldn't I crop them in mbed_app.json?

Be the first to answer this question.