Digilent Staff
  • Content Count

  • Joined

  • Last visited

Reputation Activity

  1. Like
    vicentiu got a reaction from JColvin in build error petalinux   
    It looks like you took our petalinux project and added your hdf file to it?
    System-user.dtsi makes references to axi which was present in our Vivado design in the petalinux project, but you don't have axi in your design.
    Please remove all the references it's complaining about.
    Regarding a Petalinux "HOWTO", Xilinx's petalinux documentation in the best reference:
    You'll find most documentation about system-user.dtsi in the first link, and some in the second.
    Make sure you're looking at the guide for the Petalinux version you are using.
  2. Like
    vicentiu got a reaction from JColvin in No petaLinux projects found in bsp   
    Zedboard was a joint effort between Digilent and Avnet. We developed the board and Avnet took on the platform support and community forums at
    As you found out, Xilinx also provided their own bsp, but we were not part of that effort.
  3. Like
    vicentiu reacted to bogdan.deac in Include files of SDSoC for Zybo-Z7   
    Hi @akhilahmed,
    In the mentioned video tutorial, the leds are controlled using "xgpio.h" library but the application
    is standalone. If you want to use a linux based application you have to use linux drivers for controlling.
    In the current Petalinux build, which is used in SDSoC platform, UIO driver is the best approach.
    1. Vivado project generation:
        - Extract .dsa archive from /path_to_sdsoc_platform/zybo_z7_20/hw/zybo_z7_20.dsa
        - Launch Vivado
        - In Tcl Console: cd /path_to_extracted_dsa/prj
        - In Tcl Console: source rebuild.tcl
        - In this point you should have the vivado project which is the hardware component of SDSoC platform.
            Open Block Design. Change to Address Editor Tab.
            Here you will find the address for axi_gpio_led IP: 0x4122_0000
    2. Petalinux UIO driver:
        - Launch SDx
        - Import zybo-z7-20 SDSoC platform
        - Create a new SDx linux based project using a sample application (e.g. array_zero_copy)
        - Build the project
        - Copy the files from /Dubug/sd_card to SD card
        - Plug the SD card in Zybo Z7. Make sure that the JP5 is set in SD position. Turn on the baord
        - Use your favorite serial terminal to interact with the board (115200, 8 data bits, 2 stop bits, none parity)
        - cd to /sys/class/uio
        - if you run ls you will get something like:
            uio0  uio1  uio2  uio3  uio4  uio5
        - Now you have to iterate through all these directories and to search for the above mentioned axi_gpio_led address:
        - For example: cat uio0/maps/map0/addr will output: 0x41220000, which means that the axi_gpio_led can be
            accessed using linux uio driver through uio0 device.
        - Code:
    #include <stdio.h> #include <stdlib.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <stdint.h> #include <unistd.h> #include <fcntl.h> #define UIO_MEM_SIZE 65536 #define UIO_LED_PATH "/dev/uio0" void UioWrite32(uint8_t *uioMem, unsigned int offset, uint32_t data) { *((uint32_t*) (uioMem+offset)) = data; } uint32_t UioRead32(uint8_t *uioMem, unsigned int offset) { return *((uint32_t*) (uioMem+offset)); } void led_count_down(uint8_t *ledMem) { uint8_t count = 0xF; uint8_t index = 0; for (index = 0; index < 5; index++) { UioWrite32(ledMem, 0, count); count = count >> 1; sleep(1); } } int main() { // Set Leds as output int led_fd = open(UIO_LED_PATH, O_RDWR); uint8_t *ledMem = (uint8_t *) mmap( 0, UIO_MEM_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, led_fd, (off_t)0); UioWrite32(ledMem, 4, 0x0); // Set all leds as output while(1) { // Start led count-down led_count_down(ledMem); } return 0; }     - Build the project and copy the content of Debug/sd_card on SD sd_card
        - Power on the board and connect to it using a serial terminal
        - run the following commands:
    mount mmcblk0p1 /mnt cd /mnt ./project_name.elf - Result: A countdown should be displayed on leds.