A linux os runs on zynq board. I want ro run a hello world c program on it.linux
I linked zynq board to a wifi router which my laptop also connected to and use scp command to transfer compiled files to board.ssh
The linux os runing on zynq is reduced. its user and password is simple root and root.spa
helloworld.crouter
The content of helloworld.c is:ip
#include <stdio.h>it
int main()
{
printf("Hello World\n");io
return 0;
}gcc
compile helloworld.croute
when use universal arm gcc:
arm-linux-gnueabi-gcc helloworld.c -o helloworld_arm.outfile
when use xilinx arm gcc:
arm-xilinx-linux-gnueabi-gcc helloworld.c -o helloworld_xilinx.out
transfer file to board
scp *.out root@[ip address of zynq board]:~/
result
ssh root@[ip address of zynq board]
zynq> ./helloworld_arm.out Hello World zynq> ./helloworld_xilinx.out Hello World