OpenEdv-开源电子网

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

在线求助帖,ARM Compiler使用v6.6版本之后CMSIS报错和报警,急急急!!!!

[复制链接]

2

主题

3

帖子

0

精华

新手入门

积分
17
金钱
17
注册时间
2018-4-27
在线时间
2 小时
发表于 2018-4-28 07:43:29 | 显示全部楼层 |阅读模式
5金钱
iver/src/stm32f4xx_iwdg.c(85): warning: In file included from...
../Libraries/STM32F4xx_StdPeriph_Driver/inc\stm32f4xx_iwdg.h(38): warning: In file included from...
../Libraries/CMSIS/Device/ST/STM32F4xx/Include\stm32f4xx.h(462): warning: In file included from...
../Libraries/CMSIS/Include\core_cm4.h(1435): error: unknown type name '__STATIC_INLINE'
__STATIC_INLINE void NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
^
../Libraries/CMSIS/Include\core_cm4.h(1435): error: expected identifier or '('
__STATIC_INLINE void NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
                ^
../Libraries/CMSIS/Include\core_cm4.h(1455): error: unknown type name '__STATIC_INLINE'
__STATIC_INLINE uint32_t NVIC_GetPriorityGrouping(void)
^
../Libraries/CMSIS/Include\core_cm4.h(1455): error: expected ';' after top level declarator
__STATIC_INLINE uint32_t NVIC_GetPriorityGrouping(void)
                        ^
                        ;
../Libraries/CMSIS/Include\core_cm4.h(1717): error: unknown type name '__STATIC_INLINE'
__STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch)
^
../Libraries/CMSIS/Include\core_cm4.h(1717): error: expected ';' after top level declarator
__STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch)
                        ^
                        ;
6 errors generated.
compiling stm32f4xx_iwdg.c...
../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_tim.c(119): warning: In file included from...
../Libraries/STM32F4xx_StdPeriph_Driver/inc\stm32f4xx_tim.h(38): warning: In file included from...
../Libraries/CMSIS/Device/ST/STM32F4xx/Include\stm32f4xx.h(462): warning: In file included from...
../Libraries/CMSIS/Include\core_cm4.h(1435): error: unknown type name '__STATIC_INLINE'
__STATIC_INLINE void NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
^
../Libraries/CMSIS/Include\core_cm4.h(1435): error: expected identifier or '('
__STATIC_INLINE void NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
                ^
../Libraries/CMSIS/Include\core_cm4.h(1455): error: unknown type name '__STATIC_INLINE'
__STATIC_INLINE uint32_t NVIC_GetPriorityGrouping(void)
^
../Libraries/CMSIS/Include\core_cm4.h(1455): error: expected ';' after top level declarator
__STATIC_INLINE uint32_t NVIC_GetPriorityGrouping(void)
                        ^
                        ;
../Libraries/CMSIS/Include\core_cm4.h(1717): error: unknown type name '__STATIC_INLINE'
__STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch)
^
../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_tim.c(1027): warning: implicit conversion loses integer precision: 'int' to 'uint16_t' (aka 'unsigned short') [-Wconversion]
  tmp1 = CCER_CCE_SET << (uint16_t)TIM_Channel;
       ~ ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_tim.c(1795): warning: implicit conversion loses integer precision: 'int' to 'uint16_t' (aka 'unsigned short') [-Wconversion]
  tmp = CCER_CCE_SET << TIM_Channel;
      ~ ~~~~~~~~~~~~~^~~~~~~~~~~~~~
../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_tim.c(1825): warning: implicit conversion loses integer precision: 'int' to 'uint16_t' (aka 'unsigned short') [-Wconversion]
  tmp = CCER_CCNE_SET << TIM_Channel;
      ~ ~~~~~~~~~~~~~~^~~~~~~~~~~~~~
../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_tim.c(2236): warning: implicit conversion loses integer precision: 'unsigned int' to 'uint16_t' (aka 'unsigned short') [-Wconversion]
             TIM_BDTRInitStruct->TIM_Break | TIM_BDTRInitStruct->TIM_BreakPolarity |
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
4 warnings and 6 errors generated.
compiling stm32f4xx_tim.c...
../User/SYSTEM/stm32f4xx_assert.c(1): warning: non-portable path to file '"MAIN.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "main.h"      
         ^~~~~~~~
         "MAIN.h"
                ^
../Libraries/CMSIS/Include\core_cm4.h(1455): error: unknown type name '__STATIC_INLINE'
__STATIC_INLINE uint32_t NVIC_GetPriorityGrouping(void)
^
../Libraries/CMSIS/Include\core_cm4.h(1455): error: expected ';' after top level declarator
__STATIC_INLINE uint32_t NVIC_GetPriorityGrouping(void)
                        ^
                        ;
../Libraries/CMSIS/Include\core_cm4.h(1717): error: unknown type name '__STATIC_INLINE'
__STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch)
^
../Libraries/CMSIS/Include\core_cm4.h(1717): error: expected ';' after top level declarator
__STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch)
                        ^
                        ;
../User/SYSTEM/stm32f4xx_assert.c(1): warning: In file included from...
../User\main.h(13): warning: non-portable path to file '"NVIC.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "NVIC.H"
         ^~~~~~~~
         "NVIC.h"
../User\main.h(14): warning: non-portable path to file '"CAN.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "CAN.H"
         ^~~~~~~
         "CAN.h"
../User\main.h(15): warning: non-portable path to file '"LED.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "LED.H"
         ^~~~~~~
         "LED.h"
../User/SYSTEM/stm32f4xx_assert.c(1): warning: In file included from...
../User\main.h(15): warning: In file included from...
../User/LED.H(4): warning: In file included from...
../User/AgreedTerms.h(15): warning: redefinition of typedef 'u8' is a C11 feature [-Wtypedef-redefinition]
typedef unsigned char u8;
                      ^
../Libraries/CMSIS/Device/ST/STM32F4xx/Include\stm32f4xx.h(488): note: previous definition is here
typedef uint8_t  u8;
                 ^
../User/SYSTEM/stm32f4xx_assert.c(1): warning: In file included from...
../User\main.h(15): warning: In file included from...
../User/LED.H(4): warning: In file included from...
../User/AgreedTerms.h(25): warning: redefinition of typedef 'u16' is a C11 feature [-Wtypedef-redefinition]
typedef unsigned short int u16;
                           ^
../Libraries/CMSIS/Device/ST/STM32F4xx/Include\stm32f4xx.h(487): note: previous definition is here
typedef uint16_t u16;
                 ^
../User/SYSTEM/stm32f4xx_assert.c(1): warning: In file included from...
../User\main.h(15): warning: In file included from...
../User/LED.H(4): warning: In file included from...
../User/AgreedTerms.h(32): warning: redefinition of typedef 'u32' is a C11 feature [-Wtypedef-redefinition]
typedef unsigned int u32;
                     ^
../Libraries/CMSIS/Device/ST/STM32F4xx/Include\stm32f4xx.h(486): note: previous definition is here
typedef uint32_t  u32;
                  ^
7 warnings and 6 errors generated.
compiling stm32f4xx_assert.c...
../User/SYSTEM/sys.c(1): warning: In file included from...
../User/SYSTEM/sys.h(3): warning: In file included from...
../Libraries/CMSIS/Device/ST/STM32F4xx/Include\stm32f4xx.h(462): warning: In file included from...
../Libraries/CMSIS/Include\core_cm4.h(1435): error: unknown type name '__STATIC_INLINE'
__STATIC_INLINE void NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
^
../Libraries/CMSIS/Include\core_cm4.h(1435): error: expected identifier or '('
__STATIC_INLINE void NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
                ^
../Libraries/CMSIS/Include\core_cm4.h:1455:1: ../User/SYSTEM/sys.c:22:7: error: expected '(' after 'asm'
__asm void WFI_SET(void)
      ^
../User/SYSTEM/sys.c(22): error: expected ';' after top-level asm block
__asm void WFI_SET(void)
     ^
     ;
../User/SYSTEM/sys.c(24): error: use of undeclared identifier 'WFI'
        WFI;              
        ^
../User/SYSTEM/sys.c(27): error: expected '(' after 'asm'
__asm void INTX_DISABLE(void)
      ^
../User/SYSTEM/sys.c(27): error: expected ';' after top-level asm block
__asm void INTX_DISABLE(void)
     ^
     ;
../User/SYSTEM/sys.c(29): error: use of undeclared identifier 'CPSID'
        CPSID   I
        ^
../User/SYSTEM/sys.c(33): error: expected '(' after 'asm'
__asm void INTX_ENABLE(void)
      ^
../User/SYSTEM/sys.c(33): error: expected ';' after top-level asm block
__asm void INTX_ENABLE(void)
     ^
     ;
../User/SYSTEM/sys.c(35): error: use of undeclared identifier 'CPSIE'
        CPSIE   I
        ^
../User/SYSTEM/sys.c(40): error: expected '(' after 'asm'
__asm void MSR_MSP(u32 addr)
      ^
../User/SYSTEM/sys.c(40): error: expected ';' after top-level asm block
__asm void MSR_MSP(u32 addr)
     ^
     ;
../User/SYSTEM/sys.c(42): error: use of undeclared identifier 'MSR'
        MSR MSP, r0                     //set Main Stack value
        ^
../User/SYSTEM/sys.c(40): warning: unused parameter 'addr' [-Wunused-parameter]
__asm void MSR_MSP(u32 addr)
                       ^
1 warning and 18 errors generated.
compiling sys.c...
../User/SYSTEM/system_stm32f4xx.c(262): warning: In file included from...
In file included from ../Libraries/CMSIS/Device/ST/STM32F4xx/Include\stm32f4xx.h:../User/SYSTEM/system_stm32f4xx.c:371:12: warning: no previous extern declaration for non-static variable 'SystemCoreClock' [-Wmissing-variable-declarations]
  uint32_t SystemCoreClock = 168000000;
           ^
../User/SYSTEM/system_stm32f4xx.c(386): warning: no previous extern declaration for non-static variable 'AHBPrescTable' [-Wmissing-variable-declarations]
__I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
            ^
../User/SYSTEM/system_stm32f4xx.c(420): warning: '__FPU_USED' is not defined, evaluates to 0 [-Wundef]
  #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
                               ^
../User/SYSTEM/system_stm32f4xx.c(657): warning: while loop has empty body [-Wempty-body]
    while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL);
                                                                     ^
../User/SYSTEM/system_stm32f4xx.c(657): note: put the semicolon on a separate line to silence this warning
4 warnings and 6 errors generated.

最佳答案

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

想改的就打开Keil 在Books里打开 Arm Compiler Migration and Compatibility 6.12 .pdf 里面都列出了从V5到V6要改的
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

3

主题

1907

帖子

0

精华

论坛元老

Rank: 8Rank: 8

积分
4106
金钱
4106
注册时间
2018-8-14
在线时间
696 小时
发表于 2018-4-28 07:43:30 | 显示全部楼层
想改的就打开Keil 在Books里打开 Arm Compiler Migration and Compatibility 6.12 .pdf
里面都列出了从V5到V6要改的
回复

使用道具 举报

530

主题

11万

帖子

34

精华

管理员

Rank: 12Rank: 12Rank: 12

积分
165508
金钱
165508
注册时间
2010-12-1
在线时间
2115 小时
发表于 2018-4-29 02:07:22 | 显示全部楼层
帮顶
回复

使用道具 举报

0

主题

5

帖子

0

精华

初级会员

Rank: 2

积分
72
金钱
72
注册时间
2014-12-14
在线时间
8 小时
发表于 2019-8-25 17:30:53 | 显示全部楼层
我也遇到了这个问题,求大神指点!!!
我的个性由我张扬
回复

使用道具 举报

3

主题

1907

帖子

0

精华

论坛元老

Rank: 8Rank: 8

积分
4106
金钱
4106
注册时间
2018-8-14
在线时间
696 小时
发表于 2019-8-25 17:54:47 | 显示全部楼层
旧的库用不了V6的编译器, 要不就自己动手一个一个库改, 要不就用HAL或LL
回复

使用道具 举报

3

主题

59

帖子

0

精华

高级会员

Rank: 4

积分
635
金钱
635
注册时间
2017-8-23
在线时间
234 小时
发表于 2019-8-27 10:51:34 | 显示全部楼层
最简单方法,用最新版本CUBE新建一个工程,里面的库也升级到最新版,自动生成代码,把你新增的代码添进去就可以了
回复

使用道具 举报

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

本版积分规则



关闭

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

正点原子公众号

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

GMT+8, 2025-5-16 06:28

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

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