您尚未登录。

楼主 #1 2021-01-11 17:11:06

LinuxGo
会员
注册时间: 2021-01-07
已发帖子: 88
积分: 120

f1c100s 在linux环境下编译 helloword 后 执行没反应

如题,用了../buildroot-2020.11/output/host/bin/arm-linux-gcc  main.c -o b2
tf卡插电脑,切换入虚拟机,把b2 放入 root文件夹,然后 插回 上电
putty里   ./b2  执行后一点反应都没有,不知哪步错了、、
大佬们 请指出。

离线

#2 2021-01-11 17:12:23

光头程序员
会员
注册时间: 2020-03-03
已发帖子: 14
积分: 14

Re: f1c100s 在linux环境下编译 helloword 后 执行没反应

说明你没有 printf 语句

离线

楼主 #3 2021-01-11 17:19:13

LinuxGo
会员
注册时间: 2021-01-07
已发帖子: 88
积分: 120

Re: f1c100s 在linux环境下编译 helloword 后 执行没反应

光头程序员 说:

说明你没有 printf 语句

有的啊,在乌班图下gcc编译,可以有输出

离线

#4 2021-01-11 17:38:48

kekemuyu
会员
注册时间: 2018-12-13
已发帖子: 841
积分: 721

Re: f1c100s 在linux环境下编译 helloword 后 执行没反应

dmesg命令查看

离线

楼主 #5 2021-01-11 18:09:35

LinuxGo
会员
注册时间: 2021-01-07
已发帖子: 88
积分: 120

Re: f1c100s 在linux环境下编译 helloword 后 执行没反应

问下各位大佬,在buildroot-2020.11/output/host/bin/arm-linux-gcc 这个编译器编译出来的文件和TF卡里的文件系统不是一个版本有关系吗?也就是说,文件系统用了buildroot-2020.11,版本,就必须我们这里的gcc编译器吗?

离线

#6 2021-01-11 18:39:59

raspberryman
会员
注册时间: 2019-12-27
已发帖子: 503
积分: 465

Re: f1c100s 在linux环境下编译 helloword 后 执行没反应

gcc 命令行加 -static 编译试一试

离线

楼主 #7 2021-01-11 19:50:46

LinuxGo
会员
注册时间: 2021-01-07
已发帖子: 88
积分: 120

Re: f1c100s 在linux环境下编译 helloword 后 执行没反应

在main里就写了printf,用gcc 编译器编译后,可以有输出,。用arm-linux-gcc编译后,放到TF卡里,nano执行后啥都没输出

离线

#8 2021-01-11 20:05:00

raspberryman
会员
注册时间: 2019-12-27
已发帖子: 503
积分: 465

Re: f1c100s 在linux环境下编译 helloword 后 执行没反应

LinuxGo 说:

在main里就写了printf,用gcc 编译器编译后,可以有输出,。用arm-linux-gcc编译后,放到TF卡里,nano执行后啥都没输出

arm-linux-gcc 命令行加 -static 编译试一试

离线

楼主 #9 2021-01-12 05:57:07

LinuxGo
会员
注册时间: 2021-01-07
已发帖子: 88
积分: 120

Re: f1c100s 在linux环境下编译 helloword 后 执行没反应

raspberryman 说:
LinuxGo 说:

在main里就写了printf,用gcc 编译器编译后,可以有输出,。用arm-linux-gcc编译后,放到TF卡里,nano执行后啥都没输出

arm-linux-gcc 命令行加 -static 编译试一试

还是不行……

离线

#10 2021-01-12 09:23:36

JasonWoo
会员
注册时间: 2019-06-04
已发帖子: 84
积分: 55.5

Re: f1c100s 在linux环境下编译 helloword 后 执行没反应

用同一个buildroot下的编译器,否则库的版本不一致。

离线

#11 2021-01-12 13:54:08

拉轰的脚踏车
会员
注册时间: 2020-03-20
已发帖子: 288
积分: 222

Re: f1c100s 在linux环境下编译 helloword 后 执行没反应

LinuxGo 说:
raspberryman 说:
LinuxGo 说:

在main里就写了printf,用gcc 编译器编译后,可以有输出,。用arm-linux-gcc编译后,放到TF卡里,nano执行后啥都没输出

arm-linux-gcc 命令行加 -static 编译试一试

还是不行……

在 ubuntu@x86 用 chroot 到 ARM 平台的 rootfs
http://whycan.cn/t_3251.html
(出处:哇酷开发者社区【VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT】)

离线

#12 2021-01-12 13:58:47

流氓兔
会员
注册时间: 2020-02-01
已发帖子: 121
积分: 109.5

Re: f1c100s 在linux环境下编译 helloword 后 执行没反应

拉轰的脚踏车 说:
LinuxGo 说:
raspberryman 说:

arm-linux-gcc 命令行加 -static 编译试一试

还是不行……

在 ubuntu@x86 用 chroot 到 ARM 平台的 rootfs
http://whycan.cn/t_3251.html
(出处:哇酷开发者社区【VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT】)

强烈建议用 aodzip 这个buildroot sdk:

buildroot-tiny200 (F1C100/200s) 开发包近期更新内容 * 已支持DVP摄像头 *
http://whycan.com/t_5221.html
(出处:哇酷开发者社区【全志 V3S/F1C100s/X3】)

离线

#13 2023-09-13 17:09:39

RiverZhang
会员
注册时间: 2023-09-13
已发帖子: 1
积分: 1

Re: f1c100s 在linux环境下编译 helloword 后 执行没反应

我也遇到了这个问题,不知道怎么解决

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn