Добрый день!
Работаю в Keil. Пытаюсь использовать SPL для stm32f103. При включении в проект некоторых хедеров(к примеру gpio), начинается ахтунг. //////////////////////////////
C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h(23): error: #256: invalid redeclaration of type name "s32" (declared at line 470 of "C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h") C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h(27): error: #256: invalid redeclaration of type name "sc32" (declared at line 474 of "C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h") C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h(31): error: #256: invalid redeclaration of type name "vs32" (declared at line 478 of "C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h") C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h(35): error: #256: invalid redeclaration of type name "vsc32" (declared at line 482 of "C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h") C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h(39): error: #256: invalid redeclaration of type name "u32" (declared at line 486 of "C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h") C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h(43): error: #256: invalid redeclaration of type name "uc32" (declared at line 490 of "C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h") C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h(47): error: #256: invalid redeclaration of type name "vu32" (declared at line 494 of "C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h") C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h(51): error: #256: invalid redeclaration of type name "vuc32" (declared at line 498 of "C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h") C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h(57): error: #101: "RESET" has already been declared in the current scope C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h(57): error: #101: "SET" has already been declared in the current scope C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h(57): error: #256: invalid redeclaration of type name "FlagStatus" (declared at line 502 of "C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h") C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h(57): error: #256: invalid redeclaration of type name "ITStatus" (declared at line 502 of "C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h") C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h(59): error: #101: "DISABLE" has already been declared in the current scope C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h(59): error: #101: "ENABLE" has already been declared in the current scope C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h(59): error: #256: invalid redeclaration of type name "FunctionalState" (declared at line 504 of "C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h") C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h(62): error: #101: "ERROR" has already been declared in the current scope C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h(62): error: #101: "SUCCESS" has already been declared in the current scope C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_type.h(62): error: #256: invalid redeclaration of type name "ErrorStatus" (declared at line 507 of "C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h") C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_conf.h(147): warning: #47-D: incompatible redefinition of macro "HSE_Value" (declared at line 511 of "C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h") C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\cortexm3_macro.h(30): error: #55: too many arguments in macro invocation C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\cortexm3_macro.h(30): error: #79: expected a type specifier C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\cortexm3_macro.h(31): error: #55: too many arguments in macro invocation C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\cortexm3_macro.h(31): error: #79: expected a type specifier C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\cortexm3_macro.h(32): error: #55: too many arguments in macro invocation C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\cortexm3_macro.h(32): error: #79: expected a type specifier C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h(58): error: #256: invalid redeclaration of type name "ADC_TypeDef" (declared at line 547 of "C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h") C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h(154): error: #256: invalid redeclaration of type name "BKP_TypeDef" (declared at line 646 of "C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h") C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h(163): error: #256: invalid redeclaration of type name "CAN_TxMailBox_TypeDef" (declared at line 658 of "C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h") C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h(171): error: #256: invalid redeclaration of type name "CAN_FIFOMailBox_TypeDef" (declared at line 670 of "C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h") C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h(177): error: #256: invalid redeclaration of type name "CAN_FilterRegister_TypeDef" (declared at line 680 of "C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h") C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x_map.h(203): error: #256: invalid redeclaration of type name "CAN_TypeDef" (declared at line 714 of "C:\Program Files\Keil\ARM\Inc\ST\STM32F10x\stm32f10x.h")
////////////////////////////////////
И Keil совершенно прав! Действительно дублирование есть. Если подключать хедеры где нет этого злосчастного \stm32f10x_type.h то все компилиться и работает на железе без проблем. Как только хоть кто то о нем заикнется начинается фиерия*))
Пытался закоментить все повторные декларации, но тогда компилятор перестает их видеть и оригинальные почему то... SPL свежая...
Подскажите что делать...
Заранее спасибо!
Сообщение отредактировал Quantum1 - Jul 22 2014, 19:06
|