如何在Makefile.posix中配置值以解决nRF52840 armgcc编译错误
nRF52840 编译nRF SDK armgcc报错修复
执行make编译项目时出现如下错误:
su@su-desktop:~/nRF/nRF5_SDK_17.1.0_ddde560/examples/peripheral/template_project/pca10056/blank/armgcc$ make /home/su/gcc-arm-none-eabi/bin/arm-none-eabi-gcc: 1: cannot open @@P�@8: No such file /home/su/gcc-arm-none-eabi/bin/arm-none-eabi-gcc: 1: Syntax error: Unterminated quoted string Cannot find: '/home/su/gcc-arm-none-eabi/bin/arm-none-eabi-gcc'. Please set values in: "/home/su/nRF/nRF5_SDK_17.1.0_ddde560/components/toolchain/gcc/Makefile.posix" according to the actual configuration of your system. ../../../../../../components/toolchain/gcc/Makefile.common:129: *** Cannot continue. Stop. su@su-desktop:~/nRF/nRF5_SDK_17.1.0_ddde560/examples/peripheral/template_project/pca10056/blank/armgcc$
修复步骤
- 打开SDK路径下的配置文件:
/home/su/nRF/nRF5_SDK_17.1.0_ddde560/components/toolchain/gcc/Makefile.posix - 修正以下三个核心变量:
- GNU_INSTALL_ROOT:填写armgcc工具链的根目录(不要带末尾的
bin/),比如你的工具链在/home/su/gcc-arm-none-eabi/,就设置为GNU_INSTALL_ROOT := /home/su/gcc-arm-none-eabi/ - GNU_VERSION:执行
arm-none-eabi-gcc --version查看版本号,填入对应值,比如GNU_VERSION := 10.3.1 - GNU_PREFIX:保持
arm-none-eabi不变,即GNU_PREFIX := arm-none-eabi
- GNU_INSTALL_ROOT:填写armgcc工具链的根目录(不要带末尾的
- 保存文件后重新运行
make命令
内容的提问来源于stack exchange,提问作者varun_koganti
相关产品推荐
相关产品推荐

