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

แชร์
ฝัง
  • เผยแพร่เมื่อ 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

  • @Kravch96
    @Kravch96 2 ปีที่แล้ว +29

    Please dont stop these videos, they are excellent

  • @Dinkleberg96
    @Dinkleberg96 2 ปีที่แล้ว +7

    I could listen to Shawn talk alllll day. Awesome content, very relaxing the way he makes the videos and explains everything is great. It would be sooo cool if after this series (maybe on another series i hope) Shawn designes his own custom board with a ST micro, DDR3/4 and eMMC or NAND storage and integrate the image he is building rn on that custom board.

    • @ShawnHymel
      @ShawnHymel 2 ปีที่แล้ว +2

      Thank you! I think a full SBC build would be amazing...definitely a pretty big challenge, though :)

    • @Dinkleberg96
      @Dinkleberg96 2 ปีที่แล้ว +1

      @@ShawnHymel Yes indeed would be a challenge and time consuming and I believe. Since the day I found your content (RP2040 hardware design) I don't miss a single video and those are being an inspiration and guide to me to design my own stuff so i can integrate it on college projects. Thank you so much Shawn!

    • @ShawnHymel
      @ShawnHymel 2 ปีที่แล้ว

      @@Dinkleberg96 I'm really glad they help--I'd love to know what kinds of projects you are making!

    • @manuprakash8456
      @manuprakash8456 ปีที่แล้ว

      This is exactly what I was thinking.

  • @moatasemelsayed2902
    @moatasemelsayed2902 2 ปีที่แล้ว +1

    dont stoooop please it is more than excellent , it gives everything we just needed in our career so please keep going and thanks a lot for your effort

  • @rick_er2481
    @rick_er2481 2 ปีที่แล้ว +2

    These videos are awesome! thankyou so much Digikey and Shawn! keep it up. btw channels deserves way more views

  • @byteslee1729
    @byteslee1729 2 ปีที่แล้ว +1

    Free knowledge. Wow!
    I wish all universities taught students like that 😁🤣😂

  • @alexscarbro796
    @alexscarbro796 2 ปีที่แล้ว +1

    An excellent series that is going to be extremely useful during the development of our next line of products.

  • @AliNormukhamedov
    @AliNormukhamedov ปีที่แล้ว +1

    Thank you Shawn ! Awesome !

  • @vikrammane5145
    @vikrammane5145 2 ปีที่แล้ว +1

    Shawn, you are really a good instructor. And good course content as well.

  • @davidquezada6324
    @davidquezada6324 2 ปีที่แล้ว +1

    These videos are awesome, I'm so interested in learning more about embedded systems. Thanks a lot for such an amazing content. It's always good to learn those kind of things for new future projects.

  • @vivekkumar-tu7kg
    @vivekkumar-tu7kg 2 ปีที่แล้ว +2

    Great video!! please make a video on QT based gui app on linux.

  • @sagarshubham8660
    @sagarshubham8660 2 ปีที่แล้ว +4

    Hello Shawn and Digikey, thanks for another great video in the series. For the next video, would you be interested in using the fbtft drivers in the staging directory? It's a great introduction for writing small overlays for tat lcds, and it can be a great addition to any embedded device to have display capabilities without having to rely on stuff like HDMI and DSI. No issues if it's not in the agenda, just wanted to see how you guys will do it for the STM board. All the best for the next video.

    • @ShawnHymel
      @ShawnHymel 2 ปีที่แล้ว +2

      Thanks for the suggestion! I tried getting SPI LCD working as a framebuffer output for a few days with no such luck :( ST told me that I should use their OpenSTLinux "weston" image, which contains a lot of overhead (and no indication as to how I need to configure a custom image). To be honest, I'm not a Linux expert, so this one stumped me.
      To enable the drivers, you would use many of the same techniques explored in the series (patching DTS, enabling drivers/packages--which we'll touch on in the next episode, etc.). However, I simply could not find the magic combination of keywords to make the fbtft or TinyDRM driver work with the STM32MP1, so I have to move on from the series after episode 7. That being said, if I ever figure it out (or someone can show me how), I'd definitely make a video for it!

    • @sagarshubham8660
      @sagarshubham8660 2 ปีที่แล้ว

      Yes, the drivers are sometimes not so easy to set up. Though I do not have the board to follow the tutorial myself (NXP Guy myself with i.mx series experience), if you would like to share the issues you faced, maybe I can take a look and help? I got it working with raspberry pi, pocket beagle, and i.mx series boards, though mostly through buildroot. But I do not think the process will be that different for Yocto's bit bake linux-menuconfig -c menuconfig. I'll try it out with Yocto and let you know if it's doable. Looking forward to more amazing videos from you and Digikey always :)

    • @ShawnHymel
      @ShawnHymel 2 ปีที่แล้ว

      ​@@sagarshubham8660 Thank you--the help would be very much appreciated! I detailed the changes I made in Yocto here (I can't post full links, so you might have to enter in the URL manually): community.st.com/s/feed/0D53W000017QCzoSAG

  • @AbdulRehman-eq3ns
    @AbdulRehman-eq3ns ปีที่แล้ว +2

    Hi, Could you please make a video for .bb file for multiple C and H file in application

  • @26411bapul
    @26411bapul 2 ปีที่แล้ว +1

    Simply excellent

  • @vladimirvakhter4655
    @vladimirvakhter4655 2 ปีที่แล้ว +1

    Thank you a lot! The video series are great!

  • @bam6004a
    @bam6004a 2 ปีที่แล้ว +2

    Please one more video hot to add Qt library in yokto and cross compile some gui

  • @ming-chunsu2678
    @ming-chunsu2678 ปีที่แล้ว +1

    Great, thanks you.

  • @shubhamsen4572
    @shubhamsen4572 2 ปีที่แล้ว +2

    You are the leader

  • @romeklomek5646
    @romeklomek5646 2 ปีที่แล้ว +1

    Hi, this is indeed helpful. Could you please make a short video about using cmake project which is in git repo, that is, how to make custom application build and install to the image if the source code of that app is in the git repo and cmake is used to build such app.
    Thank you.

  • @savinposter9816
    @savinposter9816 2 ปีที่แล้ว +1

    Hello!
    Can you make video about gpio ? Or point to some docs that explaining that theme ?
    All tutorials that I found in internet are using sysfs. As I sysfs is deprecated now.

  • @71GA
    @71GA 2 ปีที่แล้ว +1

    Is it possible to create a video that shows, how to deploy Poky for a STM32H743... It is not an MPU, but a MCU capable of running Linux if we add external RAM to it and disable MMU in kernel! It is much cheaper that anny kind of SOM.

  • @user-ww2lc1yo9c
    @user-ww2lc1yo9c ปีที่แล้ว +1

    If we use eclipse or yocto sdk, where will that be run? raspberry pi? pc?

  • @71GA
    @71GA 2 ปีที่แล้ว +1

    What bothers me with Yocto is that everybody shows how to work on systems that already have a BSP provided by Yocto or someonne. But noone shows how to write your own BSP in order to be able to deploy Poky to e.g. ARM MCU (strong enough to run Linux) and support one of it's key peripherals i.e GPIO or UART.

  • @user-ww2lc1yo9c
    @user-ww2lc1yo9c ปีที่แล้ว +1

    why can't I write the program on my PC instead?

  • @x1101126
    @x1101126 หลายเดือนก่อน

    All these work just to read a temperature? It will work better with just bare metal. Should consider another proper example for all these work you have done.

  • @davehitchman5171
    @davehitchman5171 11 หลายเดือนก่อน

    Great video... question though
    I had
    S = ${WORKDIR}/mylibrary
    but got a parse error, changed it to
    S = ${WORKDIR}/mylibrary"
    Your video shows the first version.