Step-by-Step Guide to Make a Zedboard PS LED Blink Using the Sys/Class Tool

Creating a blinking LED using the ZedBoard PS platform is a great way to start your journey into understanding the ins and outs of the Sys/Class tool. This guide is intended to provide you with step-by-step instructions on how to use the sys/class tool to implement an LED that blinks for 10 seconds and then pauses for 10 seconds.

Prerequisites

Before beginning this guide, you should have already set up your hardware. You will need the ZedBoard development platform, which includes the Zynq-7000 device, JTAG debug cable, power supply, and the board itself. Additionally, a 5 volt LED power source is recommended and a prototyping board or breadboard (optional) to ensure proper internal wiring.

Step 1 - Download Software Toolchain

The ZedBoard PS platform runs on the PetaLinux software toolchain. You will need to install the PetaLinux distribution on your workstation as part of the setup procedure. The PetaLinux download link is available on the Xilinx website. Once you’ve downloaded the PetaLinux distribution, you can follow the installation guide provided.

Step 2 - Create LED Project

Once your PetaLinux distribution is installed, you’re ready to create a blinking LED project. Begin by launching the PetaLinux terminal and launching a new project. You’ll be prompted for a name for your project, as well as the hardware platform you’re using. The hardware platform should be Zedboard.

Step 3 - Configure the System

Once the project is created, you’ll be presented with the system configuration page. In the system configuration page, select “Enable the system clock” and “Enable the interrupt controller”. These settings are necessary for the blinking LED to work correctly.

Step 4 - Set Up the LEDs

Next, you’ll need to configure the LEDs. In the system configuration page, select the “leds” option and configure the settings to match the pin configuration. Make sure to set the Mode to “Output”, the Direction to “Output”, and the Initial Low State to “ON”.

Step 5 - Write the Blinky Code

Once the LEDs are set up, you’ll need to write the code for the blinking LED. Open up the petalinux-generate-sw configuration page and create a new application. In the application settings, select the “led_blinky” option and click “Generate”. This will generate the blinking LED code for your project.

Step 6 - Compile and Deploy the Code

Once the blinking LED code is generated, you’re ready to compile and deploy the code to the ZedBoard development platform. In the PetaLinux terminal, run the command “petalinux-build” to compile the code and create the boot image. Once the boot image is created, you can use the command “petalinux-boot –u –m u-boot” to deploy the code and create the blinking LED project.

FAQ

Q: How long does it take to create a blinking LED project with the Sys/Class tool?


A: The amount of time it takes to create a blinking LED project with the Sys/Class tool will depend on the complexity of the project, but it typically takes only a few minutes to set up and deploy the code.

Q: What hardware do I need to create a blinking LED project?


A: To create a blinking LED project on the ZedBoard PS platform, you will need the ZedBoard development platform, power supply, and optional prototyping board or breadboard. Additionally, a 5 volt LED power source is recommended.

Q: Where can I find the PetaLinux software download?


A: The PetaLinux software download is available on the Xilinx website, here.[1]

Q: What command do I use to compile the code for the project?


A: To compile the code for the project, use the command “petalinux-build” in the PetaLinux terminal.

Q: What command do I use to deploy the code to the ZedBoard?


A: To deploy the code to the ZedBoard, use the command “petalinux-boot –u –m u-boot” in the PetaLinux terminal.

[1] https://www.xilinx.com/support/download.html

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to Lxadm.com.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.