10 years, 1 month ago.

How to remove some components from build

Hi,

Is there a possibility to remove some components from build? I am compiling mbed with python scripts and everything is OK But, if I want to create mbed library for example without ADC is it possible?The idea is to create smaller code. Do you plan to improve mbed to be conifgurable?

Best regards Milan Stevanovic

2 Answers

10 years, 1 month ago.

You could always use the mbed-src package and remove the parts you don't need.

Yes I agree with you... I can remove (delete) for example ADC from mbed-src (c and h files) and to remove analog api file... and it will work...

But, my question is this possible to be conifgurable... For example.. When I start python script to build mbed to add some parameter and to skip build ADC...

Best regrads Milan

posted by Milan Stevanovic 16 Oct 2014
10 years, 1 month ago.

In the device.h file you can easily disable for example AnalogIn. However that is indeed not from the command line, however if I were you I would first check the code sizes after compiling both with and without AnalogIn disabled using device.h. A proper compiler should give back exactly the same code, since it isn't actually used.