作者:dushearer304 | 来源:互联网 | 2023-06-13 19:57
交叉编译就是在各种条件限制下需要在平台A上编译在平台B运行的可执行文件这两个平台的架构不同所以要用不同版本的编译器在本地编译直接调用系统路径下的gccgdb然后现在要交叉编译就需要
交叉编译就是在各种条件限制下需要在平台A上编译在平台B运行的可执行文件
这两个平台的架构不同 所以要用不同版本的编译器
在本地编译直接调用系统路径下的gcc gdb
然后现在要交叉编译 就需要指定新的arm-linux-gnueabihf-gcc之类的编译器 。【 各类平台的gcc编译工具下载链接: https://launchpad.net/linaro-toolchain-binaries/
比如下载了某个平台的工具包
然后解压到以下目录:
/root//gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/

接着在eclipse里面修改编译工具首选路径,首选路径就是说,要是在这个文件夹里找到可以用的arm-linux-gnueabihf-gcc,就用来编译,舍弃系统自带的gcc:

最后按照/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin 中的各个工具名称在eclipse中依次填写名称 保持其他参数不变:



