Sorry, you need to enable JavaScript to visit this website.

AXI-GPIO demo software on Petalinux

Unsolved
3 posts / 0 new
y_okada's picture
y_okada
Junior(0)
AXI-GPIO demo software on Petalinux

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 \n\r");

Xil_Out32((u32)(XPAR_AXI_GPIO_0_BASEADDR+4),0x00000000);
while(1) {
Xil_Out32((u32)(XPAR_AXI_GPIO_0_BASEADDR),0x00000004);
usleep(300000);
Xil_Out32((u32)(XPAR_AXI_GPIO_0_BASEADDR),0x00000000);
usleep(300000);
}

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?

y_okada's picture
y_okada
Junior(0)
I tried to include seemingly

I tried to include seemingly related .c and .h files, resulting in "undefined reference to `_stack_end` In function `Xil_L1DCacheInvalidate`.

y_okada's picture
y_okada
Junior(0)
solved