1. 下载工具链:Downloads | GNU-A Downloads – Arm DeveloperDownload the The GNU Toolchain for the Cortex-A Family are integrated and validated packages featuring the GCC compiler, libraries and other GNU tools necessary for software development on devices based on the Arm Cortex-A processors or the Arm A-profile architecture.https://developer.arm.com/downloads/-/gnu-a
2. 安装编译器
添加到配置变量:
-
修改权限(根据系统权限选择):
/opt $ sudo chown -R rocky:rocky gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf
-
将交叉编译路径添加至启动文件中:
`export PATH=$PATH:/opt/arm-none-linux-gnueabihf-9.2/bin` -
树莓派启动文件
3. 验证安装
在项目文件输入arm-none敲击tab键,自动补全: