Attention: For security reasons,please choose a user name *different* from your login name.
Also make sure to choose a secure password and change it regularly.

Main Menu

Blinking LED on TE0715-05 board using TE0701-06 carrier card

Started by Jason_Baxter, April 25, 2024, 03:07:57 PM

Previous topic - Next topic


Hello. I am new to the Xilinx platform and I'm getting started using a TE0715-04-73E33-A board plugged into a  TE0701-05 carrier card.

The first thing I did was run 'Hello World' by loading the prebuilt hardware definition (test_board_04_30_3e_1gb.xsa) in Vitis 2022.2 and loading the hello world example. This worked fine and was able to output to Tera Term with no issues.

Next, I want to do a blinking LED using the code (below) but it doesn't work because 'XPAR_GPIO0_BASEADDR' is not defined.

Do I need to create my own hardware definition in Vivardo and add the axi_gpio_0 block? If so which board interfaces am I supposed to set? The board interfaces are: asio, p1a, p1b, p2a, p2b, p2c, p3 but I can't find where these are defined.

I really appreciate the help. Thank you.

#include <stdio.h>
#include <xstatus.h>
#include "platform.h"
#include "xil_printf.h"
#include "xgpiops.h"
#include "xparameters.h"
#include "sleep.h"

XGpioPs gpio;

void gpio_init()
    XGpioPs_Config *gpioConfig;
    gpioConfig = XGpioPs_LookupConfig(XPS_GPIO_BASEADDR);  //XPAR_GPIO0_BASEADDR
    if(gpioConfig==NULL) xil_printf("GPIO Config Error...");
    int status =XGpioPs_CfgInitialize(&gpio, gpioConfig, gpioConfig->BaseAddr);
    if (status==XST_SUCCESS) xil_printf("GPIO initialization Successful...\r\n");
    XGpioPs_SetDirectionPin(&gpio, 7, 1);
    XGpioPs_SetOutputEnablePin(&gpio, 7, 1);

int main()
        XGpioPs_WritePin(&gpio, 7, 1);
        XGpioPs_WritePin(&gpio, 7, 0);
    return 0;


you want to change MIO7 (Zynq PS IO) --> Green LED1 (Designator D2)?

This is connected to PS MIO, please check this example:

MIO GPIO are activated on the reference design.
You can import this examples over Vitis Platform Board Support Package for standalone applications.