What a mess - Mbed becomes more and more fragile

  1. I tried to compile my old project using the online compiler and latest MBED-OS … failed.
  2. I downloaded mbed-studio and tried to use it … it is just so bad that you don’t even figureout how to use it how to customized … for ex how can you send “Preprocessor directives” to the compiler?
  3. I tried using Visual Studio + PlatformIO … failed also.

I really don’t understand … If the official IDE cannot compile, cannot export an old project just because they updated the OS … what is the purpose of the online compiler?

If there are already eclispe+GNU Make and working … what is the purpose of another clone of eclipse when you cannot customize a build! … You cannot import from the online IDE…

It is just a mess.

Deprecated classes are so deep that you need to change many things in your design…
You cannot trust the API as someone decide to change it totally and your project fails!..

So, how can the community trust this platform?
Rather than trying to develop more things to your project, you have to go back to the square 1 and rewrite your code as they delete the API you used before… And the snake eat you up again … and the loop is continuing.

Sorry for may complain … Today, I spent 8 hours to figure out how I can compile my old project (2 -3 months old) … but I couldn’t

Still I don’t know how to fix my issues.
1)Export code is wrong (Makefile, the core code of the MBED OS , …etc)
2)None of the other platform could compile my project either… don’t get me wrong… It was working before and I didn’t change anything.

BR

1 Like

Hi @mjm2016,

Sorry you’ve been having these issues. Could you give me a bit more details on the versions of Mbed OS you used and which specific API were deleted?

Thanks,

Don

Hi,
1-Latest OS that you get from the online IDE.
2- Nucleo-L476RG / Nucleo-F207ZG I use.
3-Windows 10 / Ubuntun under Windows.
4-Eclipse with GNU -ARM compiler
5-Often I use Makefile … but even using cmake didn’t resolve the problem.
6-About the APIs … It is Serial, Serail Raw, wait, and many other that I don’t remember now.

Regarding the API: As I said before, bug fix and none-breaking new feature should be ok to continue add to the current API. But breaking the API and backward compatibility absent in the OS is not acceptable.
MBED-OS shouldn’t mix that two things in one. When you say veriosn 5 … So this version should be compatible to all other older version but with more feature maybe. But if you go to Version 6 for exampel … only at that moment you might break the API. But there must be away to get version 5 -latest
At the moment, neither the IDE-Online works nor any other way you get the required version or code from the server (IMHO).
Issues in the export is old, I think it is from 1 to 2 years ago.
Read all my older posts… you will find them when I first reported.
At the moment, I am trying hardly to compile my old project using Makefile, or Cmake … It just doesn’t work.


A picture from Ubuntu under windows and the PRIi64 problem

Thanks for the further details. I’ve tried and compiled the mesh minimal example (which uses the nanostack code which doesn’t seem to compile on your end) using GCC, Mbed OS 6.6 and the Nucleo L476RG. It works well on my end. If you can provide a minimal example that reproduces your issue, happy to try it out on my end.

As of what you’re describing with the exporters, you’re right that we got quite a few problems with them over the year, as it’s been hard to keep up with the evolution of all IDEs/etc.

The way we’re planning to solve it is by moving our build system to CMake. CMake does support a range of exporters and we can leverage the wider CMake ecosystem to make sure they track latest changes :slight_smile:.

Not sure if you’ve tried our new tools and build system but I would highly recommend checking them out. Keep in mind this is work in progress, so your feedback is appreciated.

Cheers,

Don

@mjm2016 Side note: If you use mbed-cmake retro branch, you can use Mbed 5.15 with a modern CMake build system that works with IDEs. That should sort out all of your issues with having to port the code to newer Mbed. If you have any issues, please post them here so I can take a look at it.

Dear Jamie and Donatien,
I send you a link using (WeTransfer) for the project (blinky LED) with the cmake … Configured for Ubuntu under Windows 10 64bit.
You have a video also inside the zip file.
The file is compressed with some .obj … just to let you have the exact where it stopped.
I hope you will be able to test it.
thanks

Gcc version is : gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0

Note: You might try to compile the project using the same environment.
/Mariwan

@mjm2016 That error is from the Mbed cmake exporter, not the mbed-cmake project that I maintain (linked in my post above). I just gave it a shot with your processor, and the latest mbed-cmake builds fine.

1 Like

Ok?
How would you use it?
How can you download the MBED-OS?
If not from the export?
Dose the git-hub of mbed provide by default the cmake?
I have no idea how to use it.
thanks anyway.

The instructions are in the readme of the repo here: GitHub - USCRPL/mbed-cmake: Use the power of CMake to create your MBed applications

How can you add source code like the following
src/l4r5zi
src/l476rg
src/f207zg
src

In my opinion CMAKE is lazy and bad. For each sub-directory you need to make a cmake file …etc.
I use https://premake.github.io/ for windows application … much cleaner and much easier.

Thanks for jumping in Jamie! Regarding CMake there’s a quickstart on the JetBrains website - it’s in the context of using CLion but describes the basics in an efficient way:

I also highly recommend An Introduction to Modern CMake · Modern CMake

1 Like

Thank you for your help and suggestions.
But don’t forget what the title is about.
MBED OS is no longer easy to use, easy to export …
I exported today to GNU Makefile … was missing includes also, could not compile without working with the Makefile and fixing it.
None of the way you export (IMHO) works really. Needs hard work to fix that.
Thanks again.

As explained by @AnnaBridge here: Several bugs in the Makefile (Online IDE export as makefile) - #4 by AnnaBridge

If it is the former [i.e. the Online Compiler] then it is unlikely to be looked at as the focus is on the replacement, Mbed Studio…

From my own experience when I stared with Mbed, the Makefile export was already not working well and quickly became a hell to work with…

I’m afraid (well actually no, I’m relived that they can focus on more important things, especially the new CMake tools), it’s not going to get fixed.

If you’re already fighting with the Makefile that doesn’t work, why waste your effort and not try something that does work? Be it Mbed Studio, USCRPL/mbed-cmake or the first party CMake support from Mbed?