OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 3081|回复: 3

ARM compiler6.9编译出现错误,显示有两个cmsis_armcc

[复制链接]

1

主题

1

帖子

0

精华

新手入门

积分
11
金钱
11
注册时间
2018-6-8
在线时间
4 小时
发表于 2018-8-31 15:17:33 | 显示全部楼层 |阅读模式
1金钱
../Drivers/CMSIS/Include\cmsis_armcc.h(165): error: redefinition of '__get_PRIMASK'
\\STM32F030\Drivers\CMSIS\Include\cmsis_armcc_V6.h(324) : __attribute__((always_inline)) __STATIC_INLINE uint32_t __get_PRIMASK(void)
\\STM32F030\Drivers\CMSIS\Include\cmsis_armcc.h(165) : __STATIC_INLINE uint32_t __get_PRIMASK(void)


最佳答案

查看完整内容[请看2#楼]

armcc6 在__attribute__后面的参数格式差不多都改了 现在改成 __attribute__((always_inline)) static int row(int a) 详情你可以在于Keil ->Books Windows -> coomplier_user_guid...... 然后搜__attribute__((always_inline))
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

3

主题

1907

帖子

0

精华

论坛元老

Rank: 8Rank: 8

积分
4106
金钱
4106
注册时间
2018-8-14
在线时间
696 小时
发表于 2018-8-31 15:17:34 | 显示全部楼层
armcc6 在__attribute__后面的参数格式差不多都改了
现在改成 __attribute__((always_inline)) static int row(int a)

详情你可以在于Keil ->Books Windows -> coomplier_user_guid......
然后搜__attribute__((always_inline))
回复

使用道具 举报

530

主题

11万

帖子

34

精华

管理员

Rank: 12Rank: 12Rank: 12

积分
165540
金钱
165540
注册时间
2010-12-1
在线时间
2117 小时
发表于 2018-9-1 02:05:30 | 显示全部楼层
帮顶
回复

使用道具 举报

3

主题

312

帖子

0

精华

高级会员

Rank: 4

积分
907
金钱
907
注册时间
2011-10-19
在线时间
196 小时
发表于 2018-9-1 10:31:54 | 显示全部楼层
本帖最后由 ufbycd 于 2018-9-1 10:34 编辑

估计是定义了别的编译器的宏了
[mw_shl_code=c,true]/*------------------ RealView Compiler -----------------*/
#if   defined ( __CC_ARM )
  #include "cmsis_armcc.h"

/*------------------ ARM Compiler V6 -------------------*/
#elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
  #include "cmsis_armcc_V6.h"

/*------------------ GNU Compiler ----------------------*/
#elif defined ( __GNUC__ )
  #include "cmsis_gcc.h"

/*------------------ ICC Compiler ----------------------*/
#elif defined ( __ICCARM__ )
  #include <cmsis_iar.h>

/*------------------ TI CCS Compiler -------------------*/
#elif defined ( __TMS470__ )
  #include <cmsis_ccs.h>

/*------------------ TASKING Compiler ------------------*/
#elif defined ( __TASKING__ )
  /*
   * The CMSIS functions have been implemented as intrinsics in the compiler.
   * Please use "carm -?i" to get an up to date list of all intrinsics,
   * Including the CMSIS ones.
   */

/*------------------ COSMIC Compiler -------------------*/
#elif defined ( __CSMC__ )
  #include <cmsis_csm.h>

#endif

[/mw_shl_code]

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2025-6-19 05:11

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表