OpenEdv-开源电子网

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

m4一样的操作后m0编译出错求解答

[复制链接]

2

主题

4

帖子

0

精华

新手入门

积分
12
金钱
12
注册时间
2017-7-8
在线时间
4 小时
发表于 2017-7-8 22:41:10 | 显示全部楼层 |阅读模式
1金钱
我觉得我环境配置应该没有问题  为什么会出现这个错  求指教 之前做m4都没出问题 这次开发m0就出这个问题希望 错误如下
C:\Keil_v5\ARM\CMSIS\Include\core_cmInstr.h(129): error:  #20: identifier "__STATIC_INLINE" is undefined
  __attribute__((section(".rev16_text"))) __STATIC_INLINE
_ASM uint32_t __REV16(uint32_t value)
C:\Keil_v5\ARM\CMSIS\Include\core_cmInstr.h(129): error:  #101: "uint32_t" has already been declared in the current scope
  __attribute__((section(".rev16_text"))) __STATIC_INLINE
_ASM uint32_t __REV16(uint32_t value)
C:\Keil_v5\ARM\CMSIS\Include\core_cmInstr.h(129): error:  #65: expected a ";"
  __attribute__((section(".rev16_text"))) __STATIC_INLINE
_ASM uint32_t __REV16(uint32_t value)
..\CORE\core_cm0.h(200): warning:  #12-D: parsing restarts here after previous syntax error
  } APSR_Type;
..\CORE\core_cm0.h(209): error:  #757: variable "uint32_t" is not a type name
      uint32_t ISR:9;                      /*!< bit:  0.. 8  Exception number                   */
..\CORE\core_cm0.h(210): error:  #757: variable "uint32_t" is not a type name
      uint32_t _reserved0:23;              /*!< bit:  9..31  Reserved                           */
..\CORE\core_cm0.h(212): error:  #757: variable "uint32_t" is not a type name
    uint32_t w;                            /*!< Type      used for word access                  */
..\CORE\core_cm0.h(222): error:  #757: variable "uint32_t" is not a type name
      uint32_t ISR:9;                      /*!< bit:  0.. 8  Exception number                   */
..\CORE\core_cm0.h(224): error:  #757: variable "uint32_t" is not a type name
      uint32_t _reserved0:15;              /*!< bit:  9..23  Reserved                           */
..\CORE\core_cm0.h(230): error:  #757: variable "uint32_t" is not a type name
      uint32_t T:1;                        /*!< bit:     24  Thumb bit        (read 0)          */
..\CORE\core_cm0.h(231): error:  #757: variable "uint32_t" is not a type name
      uint32_t IT:2;                       /*!< bit: 25..26  saved IT state   (read 0)          */
..\CORE\core_cm0.h(232): error:  #757: variable "uint32_t" is not a type name
      uint32_t Q:1;                        /*!< bit:     27  Saturation condition flag          */
..\CORE\core_cm0.h(233): error:  #757: variable "uint32_t" is not a type name
      uint32_t V:1;                        /*!< bit:     28  Overflow condition code flag       */
..\CORE\core_cm0.h(234): error:  #757: variable "uint32_t" is not a type name
      uint32_t C:1;                        /*!< bit:     29  Carry condition code flag          */
..\CORE\core_cm0.h(235): error:  #757: variable "uint32_t" is not a type name
      uint32_t Z:1;                        /*!< bit:     30  Zero condition code flag           */
..\CORE\core_cm0.h(236): error:  #757: variable "uint32_t" is not a type name
      uint32_t N:1;                        /*!< bit:     31  Negative condition code flag       */
..\CORE\core_cm0.h(238): error:  #757: variable "uint32_t" is not a type name
    uint32_t w;                            /*!< Type      used for word access                  */
..\CORE\core_cm0.h(248): error:  #757: variable "uint32_t" is not a type name
      uint32_t nPRIV:1;                    /*!< bit:      0  Execution privilege in Thread mode */
..\CORE\core_cm0.h(249): error:  #757: variable "uint32_t" is not a type name
      uint32_t SPSEL:1;                    /*!< bit:      1  Stack to be used                   */
..\CORE\core_cm0.h(250): error:  #757: variable "uint32_t" is not a type name
      uint32_t FPCA:1;                     /*!< bit:      2  FP extension active flag           */
..\CORE\core_cm0.h(251): error:  #757: variable "uint32_t" is not a type name
      uint32_t _reserved0:29;              /*!< bit:  3..31  Reserved                           */
..\CORE\core_cm0.h(253): error:  #757: variable "uint32_t" is not a type name
    uint32_t w;                            /*!< Type      used for word access                  */
..\CORE\core_cm0.h(269): error:  #757: variable "uint32_t" is not a type name

_IO uint32_t ISER[1];                 /*!< Offset: 0x000 (R/W)  Interrupt Set Enable Register           */
..\CORE\core_cm0.h(270): error:  #757: variable "uint32_t" is not a type name
         uint32_t RESERVED0[31];
..\CORE\core_cm0.h(271): error:  #757: variable "uint32_t" is not a type name

_IO uint32_t ICER[1];                 /*!< Offset: 0x080 (R/W)  Interrupt Clear Enable Register          */
..\CORE\core_cm0.h(272): error:  #757: variable "uint32_t" is not a type name
         uint32_t RSERVED1[31];
..\CORE\core_cm0.h(273): error:  #757: variable "uint32_t" is not a type name

_IO uint32_t ISPR[1];                 /*!< Offset: 0x100 (R/W)  Interrupt Set Pending Register           */
..\CORE\core_cm0.h(274): error:  #757: variable "uint32_t" is not a type name
         uint32_t RESERVED2[31];
..\CORE\core_cm0.h(275): error:  #757: variable "uint32_t" is not a type name

_IO uint32_t ICPR[1];                 /*!< Offset: 0x180 (R/W)  Interrupt Clear Pending Register         */
..\CORE\core_cm0.h(276): error:  #757: variable "uint32_t" is not a type name
         uint32_t RESERVED3[31];
..\CORE\core_cm0.h(277): error:  #757: variable "uint32_t" is not a type name
         uint32_t RESERVED4[64];
..\HARDWARE\ADC\adc.c: 1 warning, 30 errors
QQ截图20170708223251.png

最佳答案

正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

530

主题

11万

帖子

34

精华

管理员

Rank: 12Rank: 12Rank: 12

积分
165524
金钱
165524
注册时间
2010-12-1
在线时间
2116 小时
发表于 2017-7-8 22:41:11 | 显示全部楼层
我是开源电子网www.openedv.com站长,有关站务问题请与我联系。
正点原子STM32开发板购买店铺http://openedv.taobao.com
正点原子官方微信公众平台,点击这里关注“正点原子”
回复

使用道具 举报

2

主题

4

帖子

0

精华

新手入门

积分
12
金钱
12
注册时间
2017-7-8
在线时间
4 小时
 楼主| 发表于 2017-7-9 17:20:58 | 显示全部楼层
求助啊  真的还是找不到问题的症结所在市程序写错了吗?
回复

使用道具 举报

2

主题

4

帖子

0

精华

新手入门

积分
12
金钱
12
注册时间
2017-7-8
在线时间
4 小时
 楼主| 发表于 2017-7-11 09:31:03 | 显示全部楼层

是的 问题我也找到了core_cmInstr.h和core_cmFunc.h我替换成2.10的版本就能用 但是我之前的高版本m4是可以用 为什么高版本还不兼容m0呢 不是很清楚算是个小白吧 原子哥请指教 而且如果我每次换MCU我都要在安装路径下去修改这两个头文件吗?
回复

使用道具 举报

3

主题

13

帖子

0

精华

新手上路

积分
37
金钱
37
注册时间
2018-3-28
在线时间
17 小时
发表于 2018-3-28 11:08:21 | 显示全部楼层
您好,请问您是怎么解决这个问题的啊
回复

使用道具 举报

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

本版积分规则



关闭

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

正点原子公众号

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

GMT+8, 2025-6-8 14:28

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

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