7 years, 6 months ago.

Old code not working in OS 5. How do I compile with mbed 2 (classical)?

Is the online compiler already using mbed OS 5 now (Aug 18, 2016)?

I have some old code that works well previously (in the online compiler). However now the newly generated program compiled from the same old code does not work... I doubt it may be because of the incompatibility with mbed OS 5.

Is there any way that I can still compile code with mbed 2 (classical)?


Question relating to:

The issue I'm having now is the serial port. Basically I'm receiving streams on the serial port using interrupt. This used to work well before. However now receiving bytes from the serial port will occasionally reset the MCU, which seemed very weird. I'm using STM32F411.

posted by Zach Wang 19 Aug 2016

1 Answer

7 years, 6 months ago.

Hi Zach,

Thanks for your message, hopefully i can give you some help.

So the online compiler you can use both the "mbed-os" library or the "mbed" (classic). They both should work exactly the same with your original program.

You can always compile with either of the libraries, simply remove the "mbed-os"library from your program directory and import "mbed" https://developer.mbed.org/handbook/mbed-SDK

I hope that helps,


Andrea, team mbed

Accepted Answer

Thank you! This answered my question perfectly.

posted by Zach Wang 20 Aug 2016