We had been using online compiler to compile and generate binary code for our project. The project started back in 2016/2015. I checked library, it was version 2.0. However, the version now is version 6.8 I am trying to migrate project from online compiler to desktop IDE mbed studio and upgrade the library from version 2.0 to current version. However, when I finished the upgrade, it has been giving me format errors in the library. I wonder if the current library compatible with our project developed based on library 2.0.
you probably mean old Mbed2 and new MbedOS6 (6.16 is the latest one).
It depends about what APIs your project use, but in general… Nope, it does not.
Serial API was removed and replaced BufferedSerial for blocking applications. UnbufferedSerial for bypassing locks in IRQ or short of RAM. printf,puts and similar functions are noc available in default.
wait(1) function was replaced with thread_sleep_for(1000);
FunctionPointer was replaced by Callback
and so on…
You can follow compiler errors and repair it one by one. You can found some content about that here on forum.
Could you post the error message you’re getting? If you mean you’re trying to use binary libraries compiled for Mbed 2, those definitely won’t work with Mbed 6.
Thanks for the reply. You are right, we are moving from Mbed2 to MbedOS6. The link is very helpful, however it only shows the deprecated API from OS5 to OS6. I wonder if there’s information out there would show the deprecated API moving from mbed2 to mbedOS6?
The errors above are strange, this does not seem to be related to your project but some bad setting of whole project. Try create New empty one or popular Blinky, then copy content (also libraries) of the main from your old project based on the Mbed2. Run compilation and try fix errors. If you will stuck somewhere place the error here I will try to help ASAP.
it might be caused by my attempt to migrate the project. The project folder used to contain mbed.bld and MODSERIAL.lib , I deleted mbed.bld and replaced it with Mbed-os, which i downloaded from mbed website. the content in the MOBSERIAL.lib only has one line, it says MODSERIAL#1df6aeea544d. Please let me know if these info would help you figure out the problem I have.