Hi Mbed users,
I have been using Mbed OS with Mbed CLI for some time now (we require a lot of customization, where Mbed Studio is too inflexible) and I noticed that there are no “best practices” when it comes to the development environments and external tools which go along with Mbed OS. It is understandable, since the project is heavily in development and constantly improving, and the user base is so diverse that it is not possible to dictate a “best practice”.
Still, I think the community would benefit from users sharing their development setups, which could be guides for other newcomers and even users like me who are maybe missing out on some cool development tools. Also we could discuss the issues we are having with the integration and maybe find solutions.
A nice-to-have is that the tools are open-source, but not a necessity (I know that some people are developing on proprietary IDEs such as CLion @MultipleMonomials). You could still share ways to access these proprietary tools e.g. for student organizations.
I already found a guide by @hudakz on how to develop on Qt Creator (didn’t even know if it was an alternative!). Please tell me if there are other such guides/repositories.
So let me start:
Operating system: Windows, since it is adopted by my company. I am a big fan of Linux when it comes to development systems due to its reproducable package management system and abundance of open-source tooling. Furthermore, compilation of Mbed on Linux is way faster. Since dual-booting is a hassle, I tried developing on a VM (Ubuntu on VirtualBox), however I had problems with debugging (uploading is crazy slow with pyOCD). I would be happy to hear if anybody is successfully developing and debugging on a Linux VM.
Editor: Visual Studio Code. I find the UI and the extension system amazing, compared to more classical open-source IDEs such as Eclipse. I use custom tasks, settings and launch configurations, since the ones generated from Mbed OS are buggy. There is a 3rd party script by @janjongboom which generates these, but I already developed mine since I didn’t know of it back then (this is exactly what I mentioned by the lack of best practices). Furthermore it supports remote development, which could be useful when building on a VM.
Debugger: I use the cortex-debug plugin of VS Code together with pyOCD. In addition to the VS Code’s own debugger, it shows register information and memory content. As the probe I use ST-Link, which is very slow when uploading large binaries. I tried the much-praised J-Link probe, however the J-Link GDB server does not support RTX threads, which is a bummer. Apparently pyOCD has J-Link support, but I had issues with uploading binaries.
Code analysis / verification tools: Currently I do not use any but I am planning to integrate some into my development flow. I am open to suggestions here too.
This is what comes to my mind so far, but it is a broad topic with many particular details to discuss, so I expect more aspects to be added to the discussion in the future. Looking forward to your contributions!