Introduction to Embedded Linux Part 6 - Add Custom Application in Yocto | Digi-Key Electronics

Поделиться
HTML-код
  • Опубликовано: 18 сен 2024
  • 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.
    See this written tutorial if you would like to review the commands issued in this tutorial for the Yocto Project: www.digikey.co...
    In the previous episode ( • Introduction to Embedd... ), we enabled I2C port 5 on the STM32MP157D-DK1 so we could communicate with a connected TMP102 temperature sensor.
    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:
    www.digikey.co...
    www.digikey.co...
    Related Videos:
    • STM32MP1 workshop - 1 ...
    Related Project Links:
    www.digikey.co...
    Related Articles:
    forum.digikey....
    Learn more:
    Maker.io - www.digikey.co...
    Digi-Key’s Blog - TheCircuit www.digikey.co...
    Connect with Digi-Key on Facebook / digikey.electronics
    And follow us on Twitter / digikey

Комментарии • 35