3 years, 8 months ago.

How to generate mbed-os static library .a file?

Hi,

I am trying to generate a static library for mbed-os source code that can be used later to be compiled against my application. This will prevent me from compiling the OS again and again.

I referred to this link https://github.com/ARMmbed/mbed-cli/blob/master/README.md#compiling-static-libraries on mbed-cli and used the option library with mbed compile command. But, I can't find the *.a file generated. I only see the object files generated under .../BUILD/libraries/mbed-os-....../

Am I missing something here? How do I generate .a static library for mbed-os source code?

Thanks!

1 Answer

3 years, 8 months ago.

You can use arm-none-eabi-ar to generate the `.a` file from the `.o` files. For example, see here.