Mender blog

Debugging the Yocto build

There was a very interesting talk at the recent Yocto Summit about how you can do debugging on hardware. Sergio Prado, a consultant and trainer from Embedded Labworks, explains how to leverage the Yocto Project to debug an embedded Linux system . It is a very impressive talk and this is something that we would really recommend that you look into. If you were going to do serious debugging on hardware then you should run a debugger with the whole screen at full 1080 x 1080 on your desktop computer but have it connected to the smaller device via a debugger and run the process there. By adhering to this, you can have a very smooth experience. Debugging and logging go hand in hand with Yocto.

Logging and debugging go hand in hand

The Mender engineering team uses a lot of logging when we are debugging so logging is part and parcel of the debugging process. So you should have a good logger in your debugging software. And you should use one that has different log levels so that you can debug things when they're in the field: This is because one of the most difficult things to address is when someone has a problem with a device that crashes somewhere in the field but there is no record of how it got to the place where it crashed. That's why it's important to add a lot of logging everywhere in the software so that when the time comes that this happens, you can just turn on debugging off an accurate and comprehensive logging of events. Then you can just turn on this log level where all those logs are. Until now they have been silent and will start showing up in the logs. And this can give you an indication of where things are crashing and that's worth so much. Because if something is crashing, you know, in the field and not on your computer, you have a big problem. Being able to access those logs and replay those logs is made much more practical with the Mender Remote Terminal as you can access the device and get the logs via the same secure communication channel that is used for the OTA software updates.

Mender Enterprise Remote Terminal feature for Yocto debug

Common bugs with a Yocto build

What are the most common bugs that you will encounter with a Yocto build? There are some specific bugs that you will only see on Yocto and they would relate to certain software being missing or being kind of non-standard versions or built in, non-standard ways. And this is perhaps one of the few problems with Yocto and this is the environment that the software is running in, Is going to be a little bit weird in a sense because it's always customized. So, if you just take something off the shelf there's a higher chance that it's going to crash or misbehave on a Yocto build than on Ubuntu one. And this is the price you have to pay for having something that is customizable: Because whoever wrote it might assume that it has some certain software because every Ubuntu has it, that’s not the case with Yocto.

Consider reading these other articles on Yocto:

Recent articles

IoT growth is outpacing readiness – Here’s what the data says

IoT growth is outpacing readiness – Here’s what the data says

Learn more about the key takeaways from Northern.tech's recent 2025 State of Industrial IoT Device Lifecycle Management report.
Does EU CRA compliance require advanced OTA update capabilities?

Does EU CRA compliance require advanced OTA update capabilities?

Learn about the requirements of the EU CRA. Outlining the importance of robust OTA update capabilities as a cornerstone of CRA compliance.
Sustainable devices, smart innovation: How OTA updates can contribute to cutting costs and carbon

Sustainable devices, smart innovation: How OTA updates can contribute to cutting costs and carbon

Discover how OTA updates help companies like Kuva Systems and Beegy reduce emissions, cut costs, and build smarter, more sustainable IoT systems.
View more articles

Learn why leading companies choose Mender

Discover how Mender empowers both you and your customers with secure and reliable over-the-air updates for IoT devices. Focus on your product, and benefit from specialized OTA expertise and best practices.

 
sales-pipeline_295756365