expected ‘(‘ after 、error: use of undeclared identifier ‘PRESERVE8‘

在搭建nordic 52xx系列keil开发环境时,发现报错。

报错1:

../../../../../../components/libraries/util/app_error_handler_keil.c(47): error: use of undeclared identifier 'PRESERVE8'

参考解决方案:ARM 编译器错误和警告参考指南版本 5.05

报错2:

../../../../../../components/libraries/util/app_error_handler_keil.c(45): error: expected '(' after 'asm'
__ASM void app_error_handler(ret_code_t error_code, uint32_t line_num, const uint8_t * p_file_name)
      ^
../../../../../../components/libraries/util/app_error_handler_keil.c(45): error: expected ';' after top-level asm block
__ASM void app_error_handler(ret_code_t error_code, uint32_t line_num, const uint8_t * p_file_name)

报错3:

ArmClang: error: unsupported option '--reduce_paths'

以上报错均是编译器问题,SDK默认是compiler5 for keil,对于compiler6而言,很多特性不再支持。

我们可以下载compiler5:Legacy Arm Compiler 5, 4.1, and RVCT (ACOMP5)

然后在工程中添加compiler5:µVision User's Guide (arm.com)

不同编译器的差异:Arm Compiler for Embedded Migration and Compatibility Guide

虽然改了compiler版本,但是有可能Keil版本太高,导致无法编译仍然存在。建议降低keil版本。如果是52、53系列的nordic芯片建议使用SES支持度更高,目前noridc在keil开发环境的sdk在维护状态了,只有最新的NCS开发包在继续更新,它可以使用SES开发环境。

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值