filmov
tv
Introduction to Embedded Linux Part 6 - Add Custom Application in Yocto | Digi-Key Electronics
![preview_player](https://i.ytimg.com/vi/DVlQZnFjO9o/maxresdefault.jpg)
Показать описание
Linux is a powerful operating system that can be compiled for a number of platforms and architectures. One of the biggest draws is its ability to be customized for an application. Tools like Buildroot, OpenWRT, and Yocto Project help us create custom Linux distributions for embedded systems.
In this video series, we will explore Buildroot and the Yocto Project. We also demonstrate how you might develop applications for embedded Linux. We will not dive into the specifics of how each of these systems work but give you a good starting place so you can read or watch more advanced material about working with embedded Linux.
In this episode, we take the I2C connection a step further and create our own, custom application that reads from the sensor. We write a simple C application that performs read and write operations to the I2C device file (/dev/i2c-1). We read from the sensor’s temperature registers and combine the bytes to create a valid temperature reading in Celsius. We then print the reading to the console.
You are welcome to use a simple “Hello, world!” application instead of reading from the I2C sensor, if you wish.
While we can develop this program on nearly any Linux single board computer with an exposed I2C device (and appropriate driver and device file), the real magic of Yocto comes into play when we want to include our application in our custom image.
In addition to writing a custom application, we also demonstrate how to write a recipe to cross-compile our application during the build process and include it in our image. When we flash this image to our SD card, it will contain a pre-built version of our application in /usr/bin (on the root filesystem).
Product Links:
Related Videos:
Related Project Links:
Related Articles:
Learn more:
In this video series, we will explore Buildroot and the Yocto Project. We also demonstrate how you might develop applications for embedded Linux. We will not dive into the specifics of how each of these systems work but give you a good starting place so you can read or watch more advanced material about working with embedded Linux.
In this episode, we take the I2C connection a step further and create our own, custom application that reads from the sensor. We write a simple C application that performs read and write operations to the I2C device file (/dev/i2c-1). We read from the sensor’s temperature registers and combine the bytes to create a valid temperature reading in Celsius. We then print the reading to the console.
You are welcome to use a simple “Hello, world!” application instead of reading from the I2C sensor, if you wish.
While we can develop this program on nearly any Linux single board computer with an exposed I2C device (and appropriate driver and device file), the real magic of Yocto comes into play when we want to include our application in our custom image.
In addition to writing a custom application, we also demonstrate how to write a recipe to cross-compile our application during the build process and include it in our image. When we flash this image to our SD card, it will contain a pre-built version of our application in /usr/bin (on the root filesystem).
Product Links:
Related Videos:
Related Project Links:
Related Articles:
Learn more:
Комментарии