Version 19 (modified by Eric Hazen, 5 years ago) (diff)


Finding Stuff


Looking to port Dan's zybo package to zedboard.


Petalinux 2018.2 doesn't really work under Ubuntu 2018.4. Heading off to VM-land. Already have a 2016.4 VM. Installing Vivado... no special requirements. Next, Petalinux, following:

First, install the prerequisites using


  $ mkdir /opt/petalinux/2018.2
  $ chown -R hazen /opt/petalinux
  $ ./ /opt/petalinux/2018.2
INFO: Checking installer checksum...
INFO: Extracting PetaLinux installer...
INFO: Checking installation environment requirements...
INFO: Installing PetaLinux...
INFO: Checking PetaLinux installer integrity...
INFO: Installing PetaLinux SDK to "/opt/petalinux/2018.2/."
INFO: Installing aarch64 Yocto SDK to "/opt/petalinux/2018.2/./components/yocto/source/aarch64"...
INFO: Installing arm Yocto SDK to "/opt/petalinux/2018.2/./components/yocto/source/arm"...
INFO: Installing microblaze_full Yocto SDK to "/opt/petalinux/2018.2/./components/yocto/source/microblaze_full"...
INFO: Installing microblaze_lite Yocto SDK to "/opt/petalinux/2018.2/./components/yocto/source/microblaze_lite"...
INFO: PetaLinux SDK has been installed to /opt/petalinux/2018.2/.

A few other things. The shell must be bash, not dash.

  $ sudo rm /bin/sh
  $ sudo ln -s /bin/bash /bin/sh

Now give it a try:

  $ petalinux-create -t project -s ./xilinx-zc702-v2018.2-final.bsp
INFO: Create project: 
INFO: Projects: 
INFO: 	* xilinx-zc702-2018.2
INFO: has been successfully installed to /home/hazen/Petalinux/
INFO: New project successfully created in /home/hazen/Petalinux/


Looking into UIO drivers for Linux. See these threads:

Hopefully this is documented better somewhere... looking

Looking to start now with Petalinux again. 2018.3 tools installed at /usr1 but don't work with multiple monitors (go figure!). Installing petalinux 2018.2 at /usr1/petalinux.


  • Following UG1165 to create a minimal design

In Vivado:

  • Create a design based on the FMC Carrier with Picozed 7020
  • Connected "FCLK_CLK0" to "M_AXI_GP0_ACLK".
  • Ran synthesis, implementation, build bitstream


  • Create a "hello world" project per UG1165.
  • In "platform_config.h" change UART_DEVICE_ID to 1 and build (this may not be needed)
  • Add xilffs library to BSP:
    • Double click system.mss and "Modify this BSP's Settings"
    • Find and enable xilffs library
  • Create a new Application Project "eric_fsbl" referencing the existing BSP
  • In "hello_world" project right click "Create boot image". Should be 3 partitions in boot image:
    • eric_fsbl.elf (from FSBL project)
    • design_1_wrapper.bit (from hardware design, bitfile)
    • hello_world.elf
    • This creates a BOOT.bin file
  • See MakingBootableCard and copy to FAT partition

Managed to make a blinking LED on GPIO!

In Vivado:

  • added an AXI GPIO
  • set output width to 2
  • figured out that the pins are named "gpio_rtl_tri_o[1:0]"
  • added a constraint file:
set_property -dict { PACKAGE_PIN M14 IOSTANDARD LVCMOS25 } [get_ports {gpio_rtl_tri_o[0]} ]
set_property -dict { PACKAGE_PIN M15 IOSTANDARD LVCMOS25 } [get_ports {gpio_rtl_tri_o[1]} ]
  • Generated a new bitfile
  • Did File->Export->Export Hardware
    • (SDK automatically picked up the change)


Added this stuff to the program (excerpt key parts only):

#define LED 0x01   /* Assumes bit 0 of GPIO is connected to an LED  */
#define LED_DELAY     10000000
#define LED_CHANNEL 1
XGpio Gpio; /* The Instance of the GPIO Driver */
main() {
  int Status;
  volatile int Delay;
  XGpio_Initialize(&Gpio, GPIO_EXAMPLE_DEVICE_ID);
  XGpio_SetDataDirection(&Gpio, LED_CHANNEL, ~LED);

  while (1) {
    XGpio_DiscreteWrite(&Gpio, LED_CHANNEL, LED);
    for (Delay = 0; Delay < LED_DELAY; Delay++);
    XGpio_DiscreteClear(&Gpio, LED_CHANNEL, LED);
    for (Delay = 0; Delay < LED_DELAY; Delay++);

Re-build all, make new boot image. It works!

Next step, user IP in VHDL.

Trying to follow this rather out-of-date tutorial:

It seems to work. Haven't actually tried running the code