你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

使用ST官网的哭喊是为什么会出现这么多的错误

[复制链接]
tm854842732 提问时间:2016-4-6 17:11 /
        
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef volatile signed long  const vsc32;  /* Read Only */
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                       ^
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(39): error:  #256: invalid redeclaration of type name "u32" (declared at line 328 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef unsigned long  u32;
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                          ^
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(43): error:  #256: invalid redeclaration of type name "uc32" (declared at line 332 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef unsigned long  const uc32;  /* Read Only */
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                ^
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(47): error:  #256: invalid redeclaration of type name "vu32" (declared at line 336 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef volatile unsigned long  vu32;
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                   ^
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(51): error:  #256: invalid redeclaration of type name "vuc32" (declared at line 340 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef volatile unsigned long  const vuc32;  /* Read Only */
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                         ^
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(55): error:  #101: "FALSE" has already been declared in the current scope
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {FALSE = 0, TRUE = !FALSE} bool;
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                 ^
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(55): error:  #101: "TRUE" has already been declared in the current scope
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {FALSE = 0, TRUE = !FALSE} bool;
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                            ^
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(55): error:  #256: invalid redeclaration of type name "bool" (declared at line 345 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {FALSE = 0, TRUE = !FALSE} bool;
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                           ^
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(57): error:  #101: "RESET" has already been declared in the current scope
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                 ^
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(57): error:  #101: "SET" has already been declared in the current scope
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                            ^
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(57): error:  #256: invalid redeclaration of type name "FlagStatus" (declared at line 348 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                          ^
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(57): error:  #256: invalid redeclaration of type name "ITStatus" (declared at line 348 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                                      ^
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(59): error:  #101: "DISABLE" has already been declared in the current scope
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                 ^
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(59): error:  #101: "ENABLE" has already been declared in the current scope
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                              ^
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(59): error:  #256: invalid redeclaration of type name "FunctionalState" (declared at line 350 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                                 ^
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(62): error:  #101: "ERROR" has already been declared in the current scope
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                 ^
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(62): error:  #101: "SUCCESS" has already been declared in the current scope
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                            ^
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(62): error:  #256: invalid redeclaration of type name "ErrorStatus" (declared at line 353 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                              ^
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_conf.h(147): warning:  #47-D: incompatible redefinition of macro "HSE_Value" (declared at line 85 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_conf.h:   #define HSE_Value    ((u32)8000000) /* Value of the External oscillator in Hz*/
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_conf.h:           ^
..\user\system_stm32f10x.c(267): error:  #20: identifier "FLASH_BASE" is undefined
..\user\system_stm32f10x.c:     SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH. */
..\user\system_stm32f10x.c:                 ^
..\user\system_stm32f10x.c(324): error:  #20: identifier "HSI_VALUE" is undefined
..\user\system_stm32f10x.c:         SystemCoreClock = HSI_VALUE;
..\user\system_stm32f10x.c:                           ^
..\user\system_stm32f10x.c(327): error:  #20: identifier "HSE_VALUE" is undefined
..\user\system_stm32f10x.c:         SystemCoreClock = HSE_VALUE;
..\user\system_stm32f10x.c:                           ^
..\user\system_stm32f10x.c(1002): error:  #18: expected a ")"
..\user\system_stm32f10x.c:     if ((RCC->CR & RCC_CR_HSERDY) != RESET)
..\user\system_stm32f10x.c:     ^
..\user\system_stm32f10x.c(1054): warning:  #12-D: parsing restarts here after previous syntax error
..\user\system_stm32f10x.c:       RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_PLLSRC | RCC_CFGR_PLLXTPRE | RCC_CFGR_PLLMULL));
..\user\system_stm32f10x.c:       ^
..\user\system_stm32f10x.c(1054): error:  #65: expected a ";"
..\user\system_stm32f10x.c:       RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_PLLSRC | RCC_CFGR_PLLXTPRE | RCC_CFGR_PLLMULL));
..\user\system_stm32f10x.c:          ^
..\user\system_stm32f10x.c(1075): error:  #169: expected a declaration
..\user\system_stm32f10x.c:     else
..\user\system_stm32f10x.c:     ^
..\user\system_stm32f10x.c(1093): warning: At end of source:  #12-D: parsing restarts here after previous syntax error
..\user\system_stm32f10x.c: ..\user\system_stm32f10x.c: 3 warnings, 27 errors

收藏 评论4 发布时间:2016-4-6 17:11

举报

4个回答
沐紫 回答时间:2016-4-6 17:30:33
楼主错别字太多啦
xmshao 回答时间:2016-4-6 17:34:58
感觉你是打开的MDK自带的库函数,可能那里没配置好。

你用个ST官方的现存库函数模板来打开验证,好简单的
watershade 回答时间:2016-4-6 20:58:09
话说St官网改版了吗,现在下载文件都要登录,网址也改成www2.开头的了。不过中文网站好像还行。
废鱼 回答时间:2016-4-7 09:00:53
头文件没掉用。调用一下STM32F10X,H这个文件。

所属标签

相似问题

关于
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
意法半导体官网
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
官方最新发布
STM32Cube扩展软件包
意法半导体边缘AI套件
ST - 理想汽车豪华SUV案例
ST意法半导体智能家居案例
STM32 ARM Cortex 32位微控制器
关注我们
st-img 微信公众号
st-img 手机版