当前位置:网站首页>Cross compile C program for rk3568 development board
Cross compile C program for rk3568 development board
2022-04-21 21:07:00 【mucheni】
The supporting data is on the network disk “iTOP-3568 Development board \02_iTOP-3568 Summary of development data ( No CD data )\10_Linux Supporting materials for system development \ Cross compilation C Program supporting data ”
21.1 Set up cross compilation tool
Cross compiling tool in network disk data “iTOP-3568 Development board \02_iTOP-3568 Summary of development data ( No CD data )\10_Linux Supporting materials for system development \ Cross compilation C Program supporting data \ Cross compiler ” Under the table of contents , We copy the compressed package to Ubuntu Of /usr/local/arm64 Under the table of contents ( without arm64 Folder , Need to create a new one arm64 Folder ), Then decompress , As shown in the figure below :

Method 1 : Set temporary environment variables
The so-called temporary environment variable , It refers to setting the environment variable of cross compilation in a window , If you change another terminal window, it will fail .
We set the temporary environment variables as shown in the figure below :
export PATH=/usr/local/arm64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/binPATH
Input “echo $PATH”, Check whether the environment variable is added , Add the environment variable, as shown by the arrow in the figure below :
Be careful !!! Cross compilation C The program must compile in the window where the environment variable has just been set .
hello.c Data on CD “iTOP-3568 Development board \02_iTOP-3568 Summary of development data ( No CD data )\10_Linux System on
Send supporting materials \ Cross compilation C Program supporting data \C Program ” Under the table of contents .
Enter the following command to compile :
aarch64-linux-gnu-gcc hello.c -o hello
chmod 777 hello
Method 2 : Environment variables are not set , Compile directly using absolute path .
The crossover we're going to use Ed translate device aarch64-linux-gnu-gcc , stay virtual quasi machine ubuntu Of
/usr/local/arm64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin Under this path , So we can use
Absolute path find this compiler to compile , go back to hello.c Path , Cross compile with commands hello.c
/usr/local/arm64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc hello.c -o
hello
2 function C Program
We will compile the last step hello Copy the executable program to the development board , The development board can burn Linux System ,Debian System ,Ubuntu System , We use buildroot System as an example .
First of all, will hello The executable program is copied to U On the disk , And then U Insert the disk into the of the development board usb mouth , grant hello 777 jurisdiction , And then run the program , As shown in the figure below :
You can refer to compiling hello To compile other C Program .
版权声明
本文为[mucheni]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204212052388659.html
边栏推荐
- MySQL数值函数
- 通达oa工作流升级 操作说明
- 《动手学机器人学》7.3.2动手学坐标变换 齐次矩阵生成(四元数+欧拉角)齐次坐标运算
- Module-3:外包学生管理系统架构设计文档
- Fundamentals of reinforcement learning (I): multi armed bandit
- 《ROS2机器人建模URDF》8.1URDF统一机器人建模语言
- Importance of slip ring technology in machine operation
- 父子进程间通信(二)—— 匿名管道通信的四种情况
- How to install the slip ring correctly and effectively
- 6、Qt使用MySQL例子
猜你喜欢

Why is PostgreSQL about to surpass SQL Server?

3、MySQL Workbench 对表进行增删改查

电滑环对材质有什么要求

What are the material requirements of the electric slip ring

Swift 使用AVPlayer 和 AVPlayerItem 做语音播放

Unity3d C#利用材质(Material)贴图的偏移实现2D游戏单背景图无限移动背景效果功能(含源码)

【嵌入式】关于IAP+Xmodem从外部接收bin文件对芯片进行升级学习记录

滑环接线最主要的看什么

其它——Redis与Mysql双写一致性方案解析

2、Failed to connect to MySQL Server 8.0.28 after 10 attempts
随机推荐
通达OA与第三方APP对接
常用网络工具4:SG 宽带工具
Yaml
Get application instance through reflection
剑指 Offer 15. 二进制中1的个数
使用foremost对磁盘镜像文件做数字取证
【嵌入式】关于IAP+Xmodem从外部接收bin文件对芯片进行升级学习记录
基于OpenStack的云计算平台搭建
Why is PostgreSQL about to surpass SQL Server?
其它——Siege压力测试工具使用
Pretreatment problem
2、Failed to connect to MySQL Server 8.0.28 after 10 attempts
APM(应用性能监控) 行业认知系列 - 一
Guanglianda is positioned as a digital "enabler"
shell根据分隔符截取字符串awk
[SQL] sql22 counts the number of salary records of each department
Autres - - analyse de la cohérence en double écriture entre redis et MySQL
25. < tag array and simulation > - LT - 31 Next permutation + LT - 556 Next larger element III
Tongda OA system docking single sign on platform use and Development Manual
工作流引擎 参数设置及业务引擎