6 years ago.

How do I specify which version?

Since not every hardware platform is "Mbed OS 5-eneabled" (e.g. Micro:bit is still "version 2 enabled'),

(1) how do I ensure I am using version 2 instead of version 5 when I am working in the Mbed online compiler?

(2) or is the compiler smart enough to decide as soon as I have set the platform mode correctly in my environment?

Thanks in advance for any feedback

If you look at the files included in the project there will either be an mbed library or an mbed-os library. mbed is version 2, mbed-os is version 5.

posted by Andy A 20 Nov 2018

Hi Andy, thanks. Yes, if the project is an existing one, I guess I can tell. My question is more on how to be sure if I am creating a new one from scratch (assuming I do not want to use "clone" approach)?

posted by YK Wong 20 Nov 2018

1 Answer

6 years ago.

Hello YK,

When creating a new program with the online compiler:

  • Select he Blinky LED Hello World template if you want MBED OS-2
  • Select the mbed OS Blinky LED Hello World template to have MBED OS-5

Accepted Answer

Hi Zoltan,

Many thanks for your response. I tried to follow your suggestion. But I can only see these four templates if I click New to start a new project. These 4 templates are:

(1) A Blinky for the BBC Micro:bit, which needs a custom blinky (2) An example of how to use the Micro:bit DAL's abstraction. (3) How to use the Micro:bit display without the whole Micro:bit (4) Empty Program

Wish I can screencapture to show you what I mean. I can't see the 2 templates you have suggested. Am I missing something?

posted by YK Wong 20 Nov 2018

I think that all four templates are provided only for MBED OS-2.

posted by Zoltan Hudak 20 Nov 2018

Many thanks, Zoltan.

posted by YK Wong 20 Nov 2018