Docker or Development Container are great for isolation. And they work very well with things outside which are TCP/IP based. But most debug probes are USB only. Docker container don’t work well with USB. In Remote Debugging with DevContainer and VS Code, I showed how to use USB based debug probes. I demonstrated using them with an IP connection. In this article I show how Windows USB devices can be used from a container, with the help of usbipd.
I recently upgraded from Win10 to Win11. Windows 10 was not great for building performance compared to Linux. And I feel that with Windows 11 things got worse too.
Dev Container in VS Code uses docker-based environments. This enables me using a full-featured development environment, with isolated dependencies. This is especially very useful for development in the embedded systems space. There I have to use many different SDKs, toolchains and libraries. Using Dev Containers is super easy. But file I/O operations with building etc/is not that great.
The solution is to use a Docker Volume with VS Code and Dev Container:
I’m shifting more and more of my CI/CD testing infrastructure using the LinkServer runner. One reason is the LinkServer runner can run the test on-target. It can also collect GNO gcov coverage information at the same time. LinkServer is a suite of software tools for launching and managing GDB servers for NXP debug probes.
Remote debugging an embedded target is very useful: I don’t need a direct debug probe or USB cable connection. Instead, I’m using a network connection (wired or even wireless) over TCP/IP to talk to the debug probe and target. That way I can place the debug probe and target system away from my desk.
In Remote Debugging with USB based JTAG/SWD Debug Probes I showed how normal USB based debug probes can be used. This approach uses a remote host machine (e.g. desktop machine or notebook). This approach is still expensive, not scalable and the host machine needs a lot of space too.
So what if I use a Raspberry Pi instead? The RPi is small, inexpensive and ideal for such a task. Additionally, I can easily use it to build a test or debug farm. In this article, I show the use of the Raspberry Pi for remote debugging. A sub $20 or embedded target debug probe can be employed.
Raspberry Pi with NXP MCU-Link for Embedded Target DebuggingContinue reading →
Embedded System have a lifetime of 10 or 15 years. During that time the software and tools has to be maintained. This can be very challenging. Who knows if that compiler or tool used is still available in 10 years from now? Additionally installing and configuring the tool chain and environment for a new team member is difficult. Even worse: using a different host operating system for the cross development can produce different results or introduce issues.
VS Code running with DevContainer
One solution for all these problems is to use Docker images and containers. I can pack all the necessary tools and software into a virtual environment and container. But developing inside a container comes with many challenges. In this article I’ll show how Visual Studio Code or VS Code makes working with containers very easy. In this article I show how easy it is to use modern development tools and methodologies for embedded development.
This time, let’s do a similar thing. But instead of GitHub, I use GitLab with VS Code. And I use it for a project where three different MCUs are used: the Raspberry Pi Pico-W, an Espressif ESP32 plus the NXP K22FX512 on the Sumo robot:
Raspberry Pi Pico-W, Espressif ESP32 and Robot with NXP K22FX512Continue reading →
The new year 2024 is coming, so time to close the current year with a new release: I’m pleased to announce a new release of the Processor Expert components, available on SourceForge and GitHub.
It is August 1st, and Switzerland is celebrating its National Holiday. Rather cold and rainy, so this gets me some time to catch up on things. The preparation for the coming university semester in September is in full swing, and I have the honor to take over building up a new Master of Science in Engineering education module. In the existing courses I teach on the topic of embedded systems, I do use devices and MCUs from vendors like Broadcom, NXP, STM, Nordic, Raspberry Pi and Espressif. This not only means different SDKs, but different IDEs with different debug probes.
Just a subset of different hardware kits used in different labs
Eclipse has been the common factor in the mix with all these, and with all the pros and cons, it worked very well. With NXP having released support for Visual Studio Code, adding an announcement, and other vendors going into the same direction, I took the decision that I want to migrate my lab and lecture infrastructure to VS Code.
In “Touch & Build: Auto-Update of Firmware Date and Time” I’m using commands as ‘touch’ in a pre-build script with the NXP Eclipse based MCUXpresso IDE. That ‘touch’ command is not a Windows shell command, but common on Linux: it updates the time/date of a file.
Build Step Dialog in MCUXpresso IDE
As a Windows user you might wonder what is about this ‘Linux compatible shell’?