Week 4 involved finishing up the PetaLinux labs and getting prepared for the post training project.


I received the Click Mezzanine Stater kit https://www.newark.com/avnet/aes-acc-u96-me-sk/aes-acc-u96-me-sk-rohs-compliant/dp/03AH7038?st=ultra96%20click%20mezzani… this week and was able to complete Labs 4-6.


The labs use the temperature sensor on LSM6DSL Click which is interfaced using SPI.  Below is the LSM6DSL Click on the Mezzanine board mounted on the Ultra96.

LSM6DSL Click on Ultra96 Mezzanine board


Lab 4 Objectives

  • Import existing C/C++ programs into the Xilinx SDK Eclipse based development tool
  • Develop PetaLinux user applications meaning: edit, compile, link, transfer and debug programs on the Ultra96 using the Xilinx SDK
  • Read and use the /dev/SPIDev in Petalinux
  • Read and manipulate the LSM6DSL Sensor using Ultra96


Lab 5 Objectives

  • Collect sensor data from SPI Sensors
  • Use the MQTT IoT protocol to send data to servers
  • Create JSON formatted information that IoT applications often use
  • Setup your own IBM™ Bluemix© Quickstart cloud service


The labs were pretty straightforward.  A new method of debugging was introduced.  Since we established a WiFi interface in the previous labs, we can use that as the debug connection rather than using the JTAG/UART.  The new connection is the Linux TCF (Target Communications Framework) Agent.  The debugging is done through the SDK interface.


IBM Bluemix provides a trial interface that allows you to connect a uniquely named device and receive and plot data that is sent via MQTT in JSON format.


Here is a screen capture of the LSM6DSL temperature data being plotted on IBM Bluemix.  The temperature changes were induced by touching the sensor with my finger.  The whine in the audio is the Ultra96 fan.


I did run into an installation issue that did not seem to affect the labs but I don't know if it will cause adverse side effects in the future.  The PetaLinux installation requires that you run a settings script "source /tools/petalinux-v2018.3-final/settings.sh" which among other things sets the PATH used by the terminal to point to the petalinux installed files.  Unfortunately some of the files required by the SDK are not in the petalinux file tree so that I cannot start SDK from the terminal using "xsdk &".   I can however start the SDK using the SDK shortcut that points to the Vivado/SDK installed files (Xilinx file tree) and that's how I did the labs.  I doubt that any petalinux commands will invoke the SDK GUI so maybe this is a non-issue other than not being able to start the SDK from a terminal (I had modified my .bashrc per the instructions so that PATH is set for petalinux in all new terminals).


Lab 6 Objectives

  • Create and install a custom application into the Ultra96’s PetaLinux file system
  • Compile a custom C application using a Makefile
  • Build Ultra96’s PetaLinux from scratch (given a BSP)
  • Install the PetaLinux image onto the Ultra96


Lab 6 was the culmination of the petalinux process to create, build  and install a custom application on the Ultra96.  This process will be the basis for doing custom development such as our post training project.  It's now time to move on to that phase which is pretty exciting.  Hopefully, I won't get discouraged trying to integrate new stuff.  My first step will be to see what recipes are already available to add components that I'll need for my project and then try to get them to work in an application.