I have completed software lab 7 for the Zedboard. When I run my boot image it seems to run fine except it hangs on the line that tests the Ethernet port in the Test_Peripherals application. After seeing this behavior I decided to run the Test_Peripherals application in a jtag debug mode similar to what was done in SW Lab05. Here when I run the application it steps all the way through the application and does not hang at the line that tests the Ethernet port "Running Interrupt Test for ps7_ethernet_0..." What would cause this problem.
ZedBoard Lab 7 Hangs
SPI stand alone example
Hi,
I look for simple tutorial on SPI for stand alone project to test my LCD init., so far I only found this
Xillinx/SDK/2014.4/data/embeddedsw/XilinxProcessorIPLib/drivers/spips_v1_06_a
any other simple tutorial for SPI on zedboard ?
learning programming microzed 7010 board for PS(processor)
Hello Dear,
i am studying microcontroller microzed 7010 board at my univesity, i have too much difficulty to understand how to use the functions ,the libraries,i have difficulties to find ressources to help me understand how to start,even i cannot blink an LED, please give me some advices or anythings that will help me to start and learn how to program microzed board because itis too difficult for me
tarik
greetings
Lab1 of Designing Accelerators for the Zynq®-7000
Hi,
I am trying to run the lab1 of "Designing Accelerators for the Zynq®-7000 All Programmable SoC" on a microzed board with Z7020 device on it. The labs are either for zedboard with 7020 or microzed with 7010.
So basically I am using the elf and hdf for zedboard even though the actual hardware I am programming and connected to is a microzed. I hope I'm right in doing so as this is the first time I'm working on zedboards and SDK.
I tried 2013.3 as well as 2015.4 versions of vivado and SDK. However in either case, when I run the matMult_sw_only_app using "launch on hardware (GDB)" I don't see anything in the terminal window. The board is connected fine. But I don't see any contents in the terminal updating or anything as is mentioned in the lab manuals. I tried to monitor it through the hardware manager in vivado as well but that doesn't show anything either.
Could you tell me how to debug this?
Thanks,
--Gaurav
[MicroZed] Can't get Hello World to print anything in console/minicom
I have been following the support tutorials from http://zedboard.org/support/design/1519/10, and I have followed every step and I can't get my MicroZed to print out a hello world. I am on a Linux, I tried using minicom as the serial terminal but nothing ever prints on it. From the tutorials, I tried using serial terminal from within the XSDK, but everytime i run the Hello World project, my XSDK crashed with a SIGSEGV error. Any help is deeply appreciated.
can't use webcam on my zedboard
I'm trying to boot a zynq z7000 with a linaro distribution and I'm following [this tutorial](http://fpga.org/2013/05/24/yet-another-guide-to-running-linaro-ubuntu-de...).
I managed to run the Linaro and seemed to be working fine except that I couldn't use usb webcam nor disc drive (mouse and keyboard are working fine).
When I try: lsusb
I get:
...
Bus 001 Device 005: ID 046d:0805 Logitech, Inc. Webcam C300
but when I use: ls /dev/video*
I get:
ls: cannot access /dev/video*: No such file or directory
Can someone tell me where could be the problem?
Is there anyone who can download training lab materials?
I want to download lab material from below training page
: http://zedboard.org/course/developing-zynq%C2%AE-7000-all-programmable-s...
by clicking the " Download the labs (Vivado 2014.4.1) " link,
but it just re-direct me
:http://avnetexpress.avnet.com/index.html
Is this a broken link or Am I doing something wrong?
Regards,
Can anyone POST the Training Lab Materials?
It seems like people are getting hit by the unavailability of the training lab materials for the Developing Zynq®-7000 All Programmable SoC Software (Vivado 2013.3 and 2014.4.1)
and the
http://zedboard.org/course/developing-zynq%C2%AE-7000-all-programmable-s...
Speedway workshops?
This would be a workaround until the website is back up.
Lab 9 cpu1 BSP difficulties
Has anyone been doing the SW Speedway series and gotten to the dual processor software development and encountered a problem with creating the second (cpu1) bsp? I get a flood of errors from LONG not being declared.
I had to truncate the error messages to not get labeled as spam.
xemacps_bdring.c:514:13: error: 'LONG' undeclared (first use in this function)
Status = (LONG)(XST_FAILURE);
^
xemacps_bdring.c: At top level:
xemacps_bdring.c:552:1: error: unknown type name 'LONG'
LONG XEmacPs_BdRingToHw(XEmacPs_BdRing * RingPtr, u32 NumBd,
^
xemacps_bdring.c: In function 'XEmacPs_BdRingToHw':
xemacps_bdring.c:557:2: error: unknown type name 'LONG'
LONG Status;
^
xemacps_bdring.c:560:13: error: 'LONG' undeclared (first use in this function)
Status = (LONG)(XST_SUCCESS);
^
(truncated errors)
xemacps.h:780:1: error: unknown type name 'LONG'
LONG XEmacPs_SetTypeIdCheck(XEmacPs *InstancePtr, u32 Id_Check, u8 Index);
^
xemacps.h:782:1: error: unknown type name 'LONG'
LONG XEmacPs_SendPausePacket(XEmacPs *InstancePtr);
^
make[1]: *** [xemacps_sinit.o] Error 1
make[1]: Target `libs' not remade because of errors.
make: *** [ps7_cortexa9_1/libsrc/emacps_v3_1/src/make.libs] Error 2
"Running Make libs in ps7_cortexa9_1/libsrc/gpiops_v3_1/src"
make -C ps7_cortexa9_1/libsrc/gpiops_v3_1/src -s libs "SHELL=CMD" "COMPILER=arm-xilinx-eabi-gcc" "ARCHIVER=arm-xilinx-eabi-ar" "COMPILER_FLAGS= -O2 -c" "EXTRA_COMPILER_FLAGS=-g -DUSE_AMP=1"
"Compiling gpiops"
In file included from xgpiops.c:62:0:
xgpiops.h:115:28: fatal error: xplatform_info.h: No such file or directory
#include "xplatform_info.h"
^
compilation terminated.
make[1]: *** [xgpiops.o] Error 1
In file included from xgpiops_g.c:41:0:
xgpiops.h:115:28: fatal error: xplatform_info.h: No such file or directory
#include "xplatform_info.h"
^
compilation terminated.
make[1]: *** [xuartps_sinit.o] Error 1
make[1]: Target `libs' not remade because of errors.
make: *** [ps7_cortexa9_1/libsrc/uartps_v3_1/src/make.libs] Error 2
"Running Make libs in ps7_cortexa9_1/libsrc/usbps_v2_2/src"
make -C ps7_cortexa9_1/libsrc/usbps_v2_2/src -s libs "SHELL=CMD" "COMPILER=arm-xilinx-eabi-gcc" "ARCHIVER=arm-xilinx-eabi-ar" "COMPILER_FLAGS= -O2 -c" "EXTRA_COMPILER_FLAGS=-g -DUSE_AMP=1"
"Compiling usbps"
"Running Make libs in ps7_cortexa9_1/libsrc/xadcps_v2_2/src"
make -C ps7_cortexa9_1/libsrc/xadcps_v2_2/src -s libs "SHELL=CMD" "COMPILER=arm-xilinx-eabi-gcc" "ARCHIVER=arm-xilinx-eabi-ar" "COMPILER_FLAGS= -O2 -c" "EXTRA_COMPILER_FLAGS=-g -DUSE_AMP=1"
"Compiling xadcps"
make: Target `all' not remade because of errors.
15:26:59 Build Finished (took 11s.438ms)
Speedway Lab 10 Difficulties
Is anyone doing Lab 10 of the Speedway SW series and encountering the undefined value XPAR_FABRIC_PWM_W_INT_0_INTERRUPT_OUT_INTR in the examples? I have a complier error on this value that doesn't seem to be defined anywhere in the entire workspace.
Loading a FPGA image using u-boot
Is there any training material which shows how to load a FPGA device image through uboot. I have a MicroZed board and would like to use uboot to load the FPGA image and the Linux Kernel iteratively.
Is there any documentation/tutorial information which shows how to use the uboot "fpga loadb" commands?
Petalinux support directory
I am doing the Petalinux training "PetaLinux for the Zynq®-7000 All Programmable SoC" and in the pdf documentations it refers to a support directory "~/Speedway/petalinux/labs/" where I should file some source files I would use in the training but I cant find it anywhere , when I download the labs I only get PDFs and slides
anyone can help?
Training Video Lab - Implementing Linux on the Zynq®-7000 All Programmable SoC
When I followed lab0.1 (Creating a Cross Build Platform for Zynq) to experiment 3. At step 13, to obtain Sourcery Codebench from the following URL, the link does not exist. I wonder whether Xilinx still support it?
http://www.xilinx.com/member/mentor_codebench/xilinx-2011.09-50-arm-xili...
error detect phy
Hi!
I have a problem with Lab3 and was wondering if someone could help me please. I keep running in this error in Lab3/ Peripheral Test: "Error detect phy"
the full output when launchig that test is:
---Entering main---
Running ScuGicSelfTestExample() for ps7_scugic_0...
ScuGicSelfTestExample PASSED
ScuGic Interrupt Setup PASSED
Running Interrupt Test for ps7_ethernet_0...
Error detect phy
there is nothing happening afterwards.
i also tested this with the solution to lab 3 and there is the same error message and the exact same behaviour. Could someone please tell me waht is going on? is my board broken or is this another problem?
I'm running vivado2016.2;my board is picozed xc7z015.
Regards,
ZynqHW & ZynqSW 2016.2 SpeedWays
Hello Everyone,
We have recently updated out Zynq Hardware and Zynq Software Speedways to Vivado 2016.2. They are compatiable with Zedboard, MicroZed 7010/7020, and PicoZed 7010/7015/7020/7030 + PicoZed FMC Carrier Card V2. Come take a look at them! (See Link Below)
http://zedboard.org/support/trainings-and-videos
Regards,
Josh
Introduction to Zynq Hardware Lab3-MIO Peripherals
I am a new learner in studying Zynq and I started with the document 《Introdtion to Zynq Hardware》.
Now I have a trouble in this process and I want to tell others to solve it. At the end of the experiment,there are some quertions. But I can't answer it and I don't konw where to find the answers.
thanks
ILA Core in Zynq Speedway Hardware Training Lab 8
In experiment 2 of lab 8 you use hardware manager to connect to the ILA core you created in Lab 7.
But, when you click "Run Trigger Immediate" (step 10) you get the following dialog:
"Use the Refresh Device command with a valid Probes (debug_nets.ltx) file before executing the command: Run Trigger Immediate"
The tutorial never mentions the probes file.
Zedboard: Unable to run Hello_World_ap.elf on linux
Hi all,
I have been following zedboard_refdoc_Vivado_2014-2.pdf with great success, but am running into difficulties in section 5.3 - running a Hello World example on Linux.
I have followed all steps in the tutorial and copied the file "Hello_World_ap.elf" to the SD card.
Connecting to the Zedboard via FTP shows that the file is indeed there when I mount the SD card:
However, I simply cannot run the file. I keep getting the response:
-/bin/ash: /mnt/Hello_World_ap.elf: not found
See the Putty screenshot:
Has anybody come across this before?
Petalinux speedway
I am trying to do lab 4 from Petalinux speedway "Accessing Hardware Devices from User
Space".
It is asking me to open a project in vivado ~/Speedway/petalinux/labs/accessHwUserSpace/ <target_board>/hardware but when I download the lab from the web it did not came with the hardware files, as the other SW and HW labs did. Where can I find the HW solutions for Petalinux?
SDK
Hi, I am trying to create my first project SDK with example Zedboard following:
============================================================================================================
/*
* Copyright (c) 2009 Xilinx, Inc. All rights reserved.
*
* Xilinx, Inc.
* XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A
* COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS
* ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR
* STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION
* IS FREE FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE
* FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION.
* XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO
* THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO
* ANY WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE
* FROM CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE.
*
* helloworld.c: simple test application
*/
#include <stdio.h>
#include "platform.h"
#include "xil_types.h"
#include "xgpio.h"
#include "xtmrctr.h"
#include "xparameters.h"
#include "xgpiops.h"
#include "xil_io.h"
#include "xil_exception.h"
#include "xscugic.h"
static XGpioPs psGpioInstancePtr;
extern XGpioPs_Config XGpioPs_ConfigTable[XPAR_XGPIOPS_NUM_INSTANCES];
static int iPinNumber = 7; /*Led LD9 is connected to MIO pin 7*/
XScuGic InterruptController; /* Instance of the Interrupt Controller */
static XScuGic_Config *GicConfig;/* The configuration parameters of the
controller */
static int InterruptFlag;
extern char inbyte(void);
void Timer_InterruptHandler(void *data, u8 TmrCtrNumber)
{
print("\r\n");
print("\r\n");
print("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\n");
print(" Inside Timer ISR \n \r ");
XTmrCtr_Stop(data,TmrCtrNumber);
// PS GPIO Writing
print("LED 'LD9' Turned ON \r\n");
XGpioPs_WritePin(&psGpioInstancePtr,iPinNumber,1);
XTmrCtr_Reset(data,TmrCtrNumber);
print(" Timer ISR Exit\n \n \r");
print("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\n");
print("\r\n");
print("\r\n");
InterruptFlag = 1;
}
int SetUpInterruptSystem(XScuGic *XScuGicInstancePtr)
{
/*
* Connect the interrupt controller interrupt handler to the hardware
* interrupt handling logic in the ARM processor.
*/
Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_INT,
(Xil_ExceptionHandler) XScuGic_InterruptHandler,
XScuGicInstancePtr);
/*
* Enable interrupts in the ARM
*/
Xil_ExceptionEnable();
return XST_SUCCESS;
}
int ScuGicInterrupt_Init(u16 DeviceId,XTmrCtr *TimerInstancePtr)
{
int Status;
/*
* Initialize the interrupt controller driver so that it is ready to
* use.
*/
GicConfig = XScuGic_LookupConfig(DeviceId);
if (NULL == GicConfig) {
return XST_FAILURE;
}
Status = XScuGic_CfgInitialize(&InterruptController, GicConfig,
GicConfig->CpuBaseAddress);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
/*
* Setup the Interrupt System
*/
Status = SetUpInterruptSystem(&InterruptController);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
/*
* Connect a device driver handler that will be called when an
* interrupt for the device occurs, the device driver handler performs
* the specific interrupt processing for the device
*/
Status = XScuGic_Connect(&InterruptController,
XPAR_FABRIC_AXI_TIMER_1_INTERRUPT_INTR,
(Xil_ExceptionHandler)XTmrCtr_InterruptHandler,
(void *)TimerInstancePtr);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
/*
* Enable the interrupt for the device and then cause (simulate) an
* interrupt so the handlers will be called
*/
XScuGic_Enable(&InterruptController, XPAR_FABRIC_AXI_TIMER_1_INTERRUPT_INTR);
return XST_SUCCESS;
}
int main()
{
static XGpio GPIOInstance_Ptr;
XGpioPs_Config*GpioConfigPtr;
XTmrCtr TimerInstancePtr;
int xStatus;
u32 Readstatus=0,OldReadStatus=0;
//u32 EffectiveAdress = 0xE000A000;
int iPinNumberEMIO = 54;
u32 uPinDirectionEMIO = 0x0;
// Input Pin
// Pin direction
u32 uPinDirection = 0x1;
int exit_flag,choice,internal_choice;
init_platform();
/* data = *(u32 *)(0x42800004);
print("OK \n");
data = *(u32 *)(0x41200004);
print("OK-1 \n");
*/
print("##### Application Starts #####\n\r");
print("\r\n");
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//Step-1 :AXI GPIO Initialization
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xStatus = XGpio_Initialize(&GPIOInstance_Ptr,XPAR_AXI_GPIO_1_DEVICE_ID);
if(XST_SUCCESS != xStatus)
print("GPIO INIT FAILED\n\r");
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//Step-2 :AXI GPIO Set the Direction
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
XGpio_SetDataDirection(&GPIOInstance_Ptr, 1,1);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//Step-3 :AXI Timer Initialization
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xStatus = XTmrCtr_Initialize(&TimerInstancePtr,XPAR_AXI_TIMER_1_DEVICE_ID);
if(XST_SUCCESS != xStatus)
print("TIMER INIT FAILED \n\r");
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//Step-4 :Set Timer Handler
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
XTmrCtr_SetHandler(&TimerInstancePtr,
Timer_InterruptHandler,
&TimerInstancePtr);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//Step-5 :Setting timer Reset Value
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
XTmrCtr_SetResetValue(&TimerInstancePtr,
0, //Change with generic value
0xf0000000);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//Step-6 :Setting timer Option (Interrupt Mode And Auto Reload )
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
XTmrCtr_SetOptions(&TimerInstancePtr,
XPAR_AXI_TIMER_1_DEVICE_ID,
(XTC_INT_MODE_OPTION | XTC_AUTO_RELOAD_OPTION ));
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//Step-7 :PS GPIO Intialization
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GpioConfigPtr = XGpioPs_LookupConfig(XPAR_PS7_GPIO_1_DEVICE_ID);
if(GpioConfigPtr == NULL)
return XST_FAILURE;
xStatus = XGpioPs_CfgInitialize(&psGpioInstancePtr,
GpioConfigPtr,
GpioConfigPtr->BaseAddr);
if(XST_SUCCESS != xStatus)
print(" PS GPIO INIT FAILED \n\r");
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//Step-8 :PS GPIO pin setting to Output
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
XGpioPs_SetDirectionPin(&psGpioInstancePtr, iPinNumber,uPinDirection);
XGpioPs_SetOutputEnablePin(&psGpioInstancePtr, iPinNumber,1);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//Step-9 :EMIO PIN Setting to Input port
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
XGpioPs_SetDirectionPin(&psGpioInstancePtr,
iPinNumberEMIO,uPinDirectionEMIO);
XGpioPs_SetOutputEnablePin(&psGpioInstancePtr, iPinNumberEMIO,0);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//Step-10 : SCUGIC interrupt controller Initialization
//Registration of the Timer ISR
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xStatus=
ScuGicInterrupt_Init(XPAR_PS7_SCUGIC_1_DEVICE_ID,&TimerInstancePtr);
if(XST_SUCCESS != xStatus)
print(" :( SCUGIC INIT FAILED \n\r");
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//Step-11 :User selection procedure to select and execute tests
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
exit_flag = 0;
while(exit_flag != 1)
{
print(" SELECT the Operation from the Below Menu \r\n");
print("###################### Menu Starts ########################\r\n");
print("Press '1' to use NORMAL GPIO as an input (BTNU switch)\r\n");
print("Press '2' to use EMIO as an input (BTNR switch)\r\n");
print("Press any other key to Exit\r\n");
print(" ##################### Menu Ends #########################\r\n");
choice = inbyte();
printf("Selection : %c \r\n",choice);
internal_choice = 1;
switch(choice)
{
//~~~~~~~~~~~~~~~~~~~~~~~
// Use case for AXI GPIO
//~~~~~~~~~~~~~~~~~~~~~~~~
case '1':
exit_flag = 0;
print("Press Switch 'BTNU' push button on board \r\n");
print(" \r\n");
while(internal_choice != '0')
{
Readstatus = XGpio_DiscreteRead(&GPIOInstance_Ptr, 1);
if(1== Readstatus && 0 == OldReadStatus )
{
print("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\r\n");
print("BTNU PUSH Button pressed \n\r");
print("LED 'LD9' Turned OFF \r\n");
XGpioPs_WritePin(&psGpioInstancePtr,iPinNumber,0);
//Start Timer
XTmrCtr_Start(&TimerInstancePtr,0);
print("timer start \n\r");
//Wait For interrupt;
print("Wait for the Timer interrupt to tigger \r\n");
print("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\r\n");
print(" \r\n");
while(InterruptFlag != 1);
InterruptFlag = 0;
print(" ###########################################\r\n ");
print("Press '0' to go to Main Menu \n\r ");
print("Press any other key to remain in AXI GPIO Test \n\r ");
print(" ###########################################\r\n ");
internal_choice = inbyte();
printf("Select = %c \r\n",internal_choice);
if(internal_choice != '0')
{
print("Press Switch 'BTNU' push button on board \r\n");
}
}
OldReadStatus = Readstatus;
}
print(" \r\n");
print(" \r\n");
break;
case '2' :
//~~~~~~~~~~~~~~~~~~~~~~~
//Usecase for PS GPIO
//~~~~~~~~~~~~~~~~~~~~~~~~
exit_flag = 0;
print("Press Switch 'BTNR' push button on board \r\n");
print(" \r\n");
while(internal_choice != '0')
{
Readstatus = XGpioPs_ReadPin(&psGpioInstancePtr,
iPinNumberEMIO);
if(1== Readstatus && 0 == OldReadStatus )
{
print("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\r\n");
print("BTNR PUSH Button pressed \n\r");
print("LED 'LD9' Turned OFF \r\n");
XGpioPs_WritePin(&psGpioInstancePtr,iPinNumber,0);
//Start Timer
XTmrCtr_Start(&TimerInstancePtr,0);
print("timer start \n\r");
//Wait For interrupt;
print("Wait for the Timer interrupt to tigger \r\n");
print("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\r\n");
print(" \r\n");
while(InterruptFlag != 1);
InterruptFlag = 0;
print(" ###########################################\r\n ");
print("Press '0' to go to Main Menu \n\r ");
print("Press any other key to remain in EMIO Test \n\r ");
print(" ###########################################\r\n ");
internal_choice = inbyte();
printf("Select = %c \r\n",internal_choice);
if(internal_choice != '0')
{
print("Press Switch 'BTNR' push button on board \r\n");
}
}
OldReadStatus = Readstatus;
}
print(" \r\n");
print(" \r\n");
break;
default :
exit_flag = 1;
break;
}
}
print("\r\n");
print("***********\r\n");
print("BYE \r\n");
print("***********\r\n");
cleanup_platform();
return 0;
}
============================================================================================================
The above code is what gives Zedboard in document ZedBoard: Zynq-7000 AP SoC Concepts, Tools, and Techniques, in section Reference Designs / Tutorials. This code gives me errors in a series of "constant" as:
- XPAR_AXI_TIMER_1_DEVICE_ID
- XPAR_AXI_GPIO_1_DEVICE_ID
The error it complaining :#include "xtmrctr.h" and #include "xgpio.h"
Why this error occurs? should I use the same version of my vivado and SDU according to my zedboard?
Thank you very much