Arm Mbed OS support forum

OS compile times are very long - can I link to a pre-compiled version of the OS?

The solution here will be used with Freshmen in an embedded programming class so it needs to be simple.

When I use the online compiler (server), first pass compile times are very fast, < 30sec.
When I use the Studio compiler (my computer), first pass compile times are very slow , > 16min.
I would like to use the studio version for access to the debugger. This timing just won’t work for students or for class demos.

I could pre-define the required OS configuration (required additional libraries) and compile it.

Q - I can’t figure out how to reuse (link) the pre-compiled OS to the students program. (again, a simple solution required)

Searches have not helped, mbed + OS + … generates lots of non-helpful results

thanks

1 Like

Hi Timothy,

The scenario you described is definitely possible when using mbed-cli. You can compile any library (including Mbed OS) as a static library by providing a --library argument.

mbed compile -t {ARMC6/GCC_ARM} -m {YOUR_TARGET} --profile {your profile} --library

After that, you can use generated static library by passing it as --source {static_library_path} in the mbed compile command.

You can use mbed-cli that is shipped with Mbed Studio. Here is more information on how to access it: Using tools in the terminal - Using tools in the terminal | Mbed Studio Documentation

Unfortunately, this solution will work only with the mbed-cli. It doesn’t work with compilation in Mbed Studio UI as it doesn’t allow to specify the --source argument. We will consider adding it in the future.

Not sure if it helps you but we are also working on the new online IDE. It will be available soon. It will allow debugging programs on limited number of boards. You can find more information about it here: https://www.keil.arm.com/

What targets are you using as part of your course?

Thanks,
Arek - Studio team

Thankyou for the response.

The bummer here is that the debugger provides students the opportunity to SEE what is happening with their code - allowing them to tie software to hardware. With these long compile times I’ll have to bail to the online compiler.

The class uses STM L476RG. Which by the way, isn’t allowing the debugger to start anyway. (started a diff thread on that earlier today)

This is a new class for me (supporting biomedical engineers), in my other classes we use TI processors and CodeComposer (Eclipse), so this is a bit of a step backwards from an educational perspective.

Hello Timothy,

Another alternative how to shorten compilation time is to build the project only with the Mbed features used by the program. You can find more info in this post.

1 Like