c helloworld on zynq

本文介绍如何在Zynq板上通过无线路由器连接并使用scp命令传输编译后的HelloWorld C程序。文章详细说明了使用两种不同的ARM GCC编译器编译HelloWorld程序,并将编译好的文件通过SSH命令远程执行的过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

A linux os runs on zynq board. I want ro run a hello world c program on it.

I linked zynq board to a wifi router which my laptop also connected to and use scp command to transfer compiled files to board.

The linux os runing on zynq is reduced. its user and password is simple root and root.

helloworld.c

The content of helloworld.c is:

#include <stdio.h>

int main()
{
printf("Hello World\n");

return 0;
}

compile helloworld.c

when use universal arm gcc:
arm-linux-gnueabi-gcc helloworld.c -o helloworld_arm.out

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

转载于:https://www.cnblogs.com/snigoal/p/3153895.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值