element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Path II Programmable
  • Challenges & Projects
  • Design Challenges
  • Path II Programmable
  • More
  • Cancel
Path II Programmable
Blog Path II Programmable Blog 8 - Getting started with Integrating Sensors on Ultra96 with PetaLinux
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: avnrdf
  • Date Created: 16 Nov 2019 5:16 AM Date Created
  • Views 556 views
  • Likes 2 likes
  • Comments 0 comments
  • ultra96-v2
  • path ii programmable
  • petalinux
Related
Recommended

Path II Programmable Blog 8 - Getting started with Integrating Sensors on Ultra96 with PetaLinux

avnrdf
avnrdf
16 Nov 2019

I've completed the hardware & software courses, so now it is time for the last bit - using Petalinux to build Linux for Zynq & accessing hardware from an application.

 

image

 

 

Petalinux Chapter 1 video: Overview, Review of Ultra96 Kit, PetaLinux Overview

 

  • An overview of what's bundled with the Ultra96.
  • What else we need: power supply, debugger, mezzanine board etc.
  • An Introduction to Petalinux - a collection of tools for building Linux for Zynq on x86.
  • How Petalinux works with other Xilinx tools (Vivado, SDSoC & SDK).
  • Petalinux on Zynq MPSoC - how it works with the bootloader, programs the PL etc.
  • Petalinux hardware drivers - GPIO, SPI, I2C etc.
  • Petalinux has multitasking capabilities & can run on the 4x A53s. For real-time applications, use FreeRTOS on the R5s and communicate with the A53s using OpenAMP.

 

image image

imageimage

PetaLinux Lab 1 - Minimal Ultra96 PetaLinux

 

  • The PetaLinux environment was setup in a pre-lab - this was a pretty lengthy process & involved entering quite a few commands in the terminal.
  • Lab 1 was to create, configure & build a minimal PetaLinux - this used 2 commands which were entered into the Linux terminal, where the PetaLinux configuration also gets displayed. The configuration used the defaults, except for the primary stdin/stdout which was changed to ps_uart_1 due to how things are connected on the Ultra96.
  • According to the lab document, the kernel configuration takes around 10 minutes, and the PetaLinux build takes another 40. There was an option to use the bundled pre-built files, so I went with that.
  • The generated files need to be copied over to the SD card. Boot & rootfs partitions need to be created on the SD card, which need to be formatted as FAT32 & EXT4 respectively.

 

imageimage

image

 

 

Petalinux Chapter 2 video: All about Yocto & Device Tree fundamentals

 

  • An intro to the Yocto project - how the build system reduces complexity & makes building Linux easier.
  • A Yocto crash course - how things are structured, how files are fetched.
  • How Petalinux & Yocto work together.
  • How the Petalinux tools are structured & project taxonomy - deciphering which files go where!
  • Petalinux platform configuration using the Linux device tree. How the device tree structure is compiled to a binary

 

imageimage

 

PetaLinux Lab 2 - Updating Fully Featured PetaLinux

 

  • Enabled 'User mode SPI device driver support' in the kernel configuration wizard and updated the .dtsi file
  • Customized the Petalinux root file system - different tools like python & i2ctools can be selected

 

Petalinux Chapter 3 video: Ultra96 Communications

 

  • A recap of the communication interfaces on the Ultra96v2

image

 

PetaLinux Lab 3 - Connect with Ultra96 Using Wi-Fi

 

  • Connected to the hotspot of the Ultra96, and used the webpage to login to Wi-Fi network - this is something that I had already done, so I skipped this experiment.
  • SSH'ed into the Ultra96 from the VM.
  • Use FileZilla to transfer files.
  • Ping internet servers
  • Use 'wget' to fetch files from servers on the internet

 

Petalinux Chapter 4 video: Petalinux User Application Development

 

  • The importance of the memory management unit when it comes to running user applications & how addressing is handled.
  • Advantages & disadvantages of using the MMU to isolate/abstract hardware/memory from the user application.
  • Trade-offs between user & kernel application code - performance, learning curve, portability, stability, security & ease of debugging.
  • User space vs kernel space.
  • Linux Device Driver model - an introduction.
  • The part I've been looking forward to: accessing hardware from the user space. Different methods include /dev/mem, the UIO framework, sysfs etc.

 

imageimage

 

image

 

PetaLinux Lab 4 - Creating PetaLinux Applications using Xilinx SDK

 

  • Created a new Xilinx SDK project. The process was the same was the same as previous projects, except that this time, 'linux' was selected as the 'OS Platform', and 'psu_cortexa53' was the 'Processor Type'.
  • The Linux TCF agent is used to debug the application - setting this up required entering the IP address of the Ultra96v2.
  • The debug session was launched as usual, but ending a debug session requires selecting the 'Terminate & Remove' as an extra step.

imageimage

 

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube