How to use older mbed os releases with mbed studio

Hello,
I have an old program coded using mbed OS 5. I am trying to use it again now, but mbed studio uses as default library mbed OS 6, wich raises issues because some functions I was using are now deprecated. I tried importing as library an old version of mbed, but it wasn’t successful, because I couldn’t select my program as active for the debug. I am wondering if there is any way to do it with some settings, or I need to import the library in another way. Thanks in advance

Hello,

it depends how old your program is, the MbedStudio can working with MbedOS 5.12+ I think, see this.

Any program can not be set as active when the MbedOS version or its state is not valid.
It can be solved with these steps:

If you already have a MbedOS6 imported then visit the Libraries card and press the down arrow what is close to update button (like is in documentation) and you will see an option Check out to version, then it is same as above.

BR, Jan

3 Likes

Hi,
Thanks for the help. I think it was just my fault that I didn’t look well enough, but after doing File->New Program I just had to select Example program and scroll down until I found program developed with mbed OS 5(this is the part that I haven’t done before, I always picked the first program on mbed OS 6).

If you already have a MbedOS6 imported then visit the Libraries card and press the down arrow what is close to update button and you will see an option Check out to version , then it is same as above.

Also this could’ve been a really good solution.

One last thing, do you think MbedOS 5 is going to be supported by MbedStudio for long or it risks being discontinued? Thanks again for the support

I do not know but MbedOS 5.15.5 seems to be still continuously updated.
Anyway this question is more for @arekzaluski

BR, Jan

1 Like

If you do not want Mbed Studio to update the Mbed OS you want to use, like OS 5.x, to the latest OS 6.x version then I suggest using the “Link to an existing share Mbed OS instance” option when creating a new program. I found this option to be very handy and gives you much more control over which OS you want to use (and saves space) for which program.

image

1 Like

Hi @alessioc,

That is a good question. Mbed OS 5.15.X is an LTS version. That is one of the reason why Studio contains examples for both Mbed OS 5 and 6. There is currently no plan to drop support for it in Studio.
That being said we always recommend updating to newest version of Mbed OS. Some new functionalities available in the future in Studio may be disabled to old versions of Mbed OS.

Thanks,
Arek - Studio team