My environment:
- Vivado 2014.4
- XSDK 2014.4
- Petalinux 2014.4
They are installed on CentOS6.5.
.
I am trying to execute LED on/off program on PetaLinux for zedboard.
.
Firstly, I confirmed that the software works using Vivado/XSDK
1. made bitstream on Vivado
2. export .hdf file from Vivado
3. made application on XSDK
4. made BOOT.BIN on XSDK
--
Secondly, I tried made the program on PetaLinux
1., 2. are same as above
3. made application on PetaLinux
4. failed to build software on PetaLinux
Following is the application code (to ON/OFF LED through AXI_GPIO).
----------------------------
#include <stdio.h>
#include "platform.h"
#include "xil_types.h"
#include "xparameters.h"
#include "xil_io.h"
//#include "xil_exception.h"
//#include "xscugic.h"
int main()
{
init_platform();
print("Hello World
r");
Xil_Out32((u32)(XPAR_AXI_GPIO_0_BASEADDR+4),0x00000000);
twhile(1) {
ttXil_Out32((u32)(XPAR_AXI_GPIO_0_BASEADDR),0x00000004);
ttusleep(300000);
ttXil_Out32((u32)(XPAR_AXI_GPIO_0_BASEADDR),0x00000000);
ttusleep(300000);
t}
cleanup_platform();
return 0;
}
-----
Without Xil_Out32(), init_platform(), cleanup_platform(), I successfully made BOOT.BIN and image.ub on PetaLinux.
However, I am not sure how to build when I use AXI-GPIO.
What is the tutorial I can refer?