移植stm32函数库笔记

合集下载
相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

USE_STDPERIPH_DRIVER, STM32F10X_HD

compiling stm32f10x_usart.c...

.\CMSIS\stm32f10x.h(96): error: #35: #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"

.\CMSIS\stm32f10x.h: #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"

.\CMSIS\stm32f10x.h: ^

.\CMSIS\stm32f10x.h: FWlib\src\stm32f10x_usart.c: 0 warnings, 1 error

compiling stm32f10x_wwdg.c...

.\CMSIS\stm32f10x.h(96): error: #35: #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"

.\CMSIS\stm32f10x.h: #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"

.\CMSIS\stm32f10x.h: ^

.\CMSIS\stm32f10x.h: FWlib\src\stm32f10x_wwdg.c: 0 warnings, 1 error

compiling SetClock.c...

.\CMSIS\stm32f10x.h(96): error: #35: #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"

.\CMSIS\stm32f10x.h: #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"

.\CMSIS\stm32f10x.h: ^

在这里添加USE_STDPERIPH_DRIVER, STM32F10X_HD 问题解决

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 521 of ".\CMSIS\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(23): error: #256: invalid redeclaration of type name "s32" (declared at line 487 of ".\CMSIS\stm32f10x.h")

C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: typedef signed long s32;

C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: ^

C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(27): error: #256: invalid redeclaration of type name "sc32" (declared at line 491 of ".\CMSIS\stm32f10x.h")

C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: typedef signed long const sc32; /* Read Only */

C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: ^ C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(31): error: #256: invalid redeclaration of type name "vs32" (declared at line 495 of ".\CMSIS\stm32f10x.h")

C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: typedef volatile signed long vs32; C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: ^ C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(35): error: #256: invalid redeclaration of type name "vsc32" (declared at line 499 of ".\CMSIS\stm32f10x.h")

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 503 of ".\CMSIS\stm32f10x.h")

相关文档
最新文档