|
Keil тупит или я?... |
|
|
|
Nov 14 2012, 16:16
|
Частый гость
 
Группа: Участник
Сообщений: 151
Регистрация: 1-10-12
Пользователь №: 73 751

|
Господа, осваиваю STM32F103. Пользуюсь KEIL. Пытаюсь скрестить два проекта, в одном LCD библиотека, в другом библиотека для работы с USB. Скопировал файлы. Создал группы. В группу добавил файлы. Как понимаете, добавлял средствами KEIL, а не где-то вручную прописывал. Тем не менее, добавленные файлы при компиляции компилятор не находит. Парадокс - лезу во вкладку Project, нажимаю на ненайденный файл, жму правую кнопку мыши, "открыть файл"- он открыватеся. Почему пользовательский интерфейс понимает структуру проекта, а компилятор нет. ПРоект прилагаю.
|
|
|
|
|
Nov 14 2012, 16:49
|
Местный
  
Группа: Участник
Сообщений: 226
Регистрация: 10-07-09
Пользователь №: 51 126

|
Цитата(Memento Mori @ Nov 14 2012, 20:16)  Скопировал файлы. Не все... увы... Кейл справедливо ругается на отсутствие некоторых...
|
|
|
|
|
Nov 14 2012, 17:19
|
Частый гость
 
Группа: Участник
Сообщений: 151
Регистрация: 1-10-12
Пользователь №: 73 751

|
Немного вник - оказывается, в эту вкладку вписываются только .c файлы, а includes вписываются через Options. А скопировано было все... Вот только проблемы не кончились: Это что за... Цитата .\Source\CMSIS\Core\CM3\stm32f10x.h(312): error: #256: invalid redeclaration of type name "s32" (declared at line 23 of ".\Source\User\FWLib\library\inc\stm32f10x_type.h") .\Source\CMSIS\Core\CM3\stm32f10x.h(316): error: #256: invalid redeclaration of type name "sc32" (declared at line 27 of ".\Source\User\FWLib\library\inc\stm32f10x_type.h") .\Source\CMSIS\Core\CM3\stm32f10x.h(320): error: #256: invalid redeclaration of type name "vs32" (declared at line 31 of ".\Source\User\FWLib\library\inc\stm32f10x_type.h") .\Source\CMSIS\Core\CM3\stm32f10x.h(324): error: #256: invalid redeclaration of type name "vsc32" (declared at line 35 of ".\Source\User\FWLib\library\inc\stm32f10x_type.h") .\Source\CMSIS\Core\CM3\stm32f10x.h(328): error: #256: invalid redeclaration of type name "u32" (declared at line 39 of ".\Source\User\FWLib\library\inc\stm32f10x_type.h") .\Source\CMSIS\Core\CM3\stm32f10x.h(332): error: #256: invalid redeclaration of type name "uc32" (declared at line 43 of ".\Source\User\FWLib\library\inc\stm32f10x_type.h") .\Source\CMSIS\Core\CM3\stm32f10x.h(336): error: #256: invalid redeclaration of type name "vu32" (declared at line 47 of ".\Source\User\FWLib\library\inc\stm32f10x_type.h") .\Source\CMSIS\Core\CM3\stm32f10x.h(340): error: #256: invalid redeclaration of type name "vuc32" (declared at line 51 of ".\Source\User\FWLib\library\inc\stm32f10x_type.h") .\Source\CMSIS\Core\CM3\stm32f10x.h(345): error: #101: "FALSE" has already been declared in the current scope .\Source\CMSIS\Core\CM3\stm32f10x.h(345): error: #101: "TRUE" has already been declared in the current scope .\Source\CMSIS\Core\CM3\stm32f10x.h(345): error: #256: invalid redeclaration of type name "bool" (declared at line 55 of ".\Source\User\FWLib\library\inc\stm32f10x_type.h") .\Source\CMSIS\Core\CM3\stm32f10x.h(348): error: #101: "RESET" has already been declared in the current scope .\Source\CMSIS\Core\CM3\stm32f10x.h(348): error: #101: "SET" has already been declared in the current scope .\Source\CMSIS\Core\CM3\stm32f10x.h(348): error: #256: invalid redeclaration of type name "FlagStatus" (declared at line 57 of ".\Source\User\FWLib\library\inc\stm32f10x_type.h") .\Source\CMSIS\Core\CM3\stm32f10x.h(348): error: #256: invalid redeclaration of type name "ITStatus" (declared at line 57 of ".\Source\User\FWLib\library\inc\stm32f10x_type.h") .\Source\CMSIS\Core\CM3\stm32f10x.h(350): error: #101: "DISABLE" has already been declared in the current scope .\Source\CMSIS\Core\CM3\stm32f10x.h(350): error: #101: "ENABLE" has already been declared in the current scope .\Source\CMSIS\Core\CM3\stm32f10x.h(350): error: #256: invalid redeclaration of type name "FunctionalState" (declared at line 59 of ".\Source\User\FWLib\library\inc\stm32f10x_type.h") .\Source\CMSIS\Core\CM3\stm32f10x.h(353): error: #101: "ERROR" has already been declared in the current scope .\Source\CMSIS\Core\CM3\stm32f10x.h(353): error: #101: "SUCCESS" has already been declared in the current scope .\Source\CMSIS\Core\CM3\stm32f10x.h(353): error: #256: invalid redeclaration of type name "ErrorStatus" (declared at line 62 of ".\Source\User\FWLib\library\inc\stm32f10x_type.h") .\Source\User\FWLib\library\inc\cortexm3_macro.h(30): error: #55: too many arguments in macro invocation .\Source\User\FWLib\library\inc\cortexm3_macro.h(30): error: #79: expected a type specifier .\Source\User\FWLib\library\inc\cortexm3_macro.h(31): error: #55: too many arguments in macro invocation .\Source\User\FWLib\library\inc\cortexm3_macro.h(31): error: #79: expected a type specifier .\Source\User\FWLib\library\inc\cortexm3_macro.h(32): error: #55: too many arguments in macro invocation .\Source\User\FWLib\library\inc\cortexm3_macro.h(32): error: #79: expected a type specifier .\Source\User\FWLib\library\inc\stm32f10x_map.h(58): error: #256: invalid redeclaration of type name "ADC_TypeDef" (declared at line 389 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_map.h(154): error: #256: invalid redeclaration of type name "BKP_TypeDef" (declared at line 488 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_map.h(163): error: #256: invalid redeclaration of type name "CAN_TxMailBox_TypeDef" (declared at line 500 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") compiling usb_istr.c... compiling usb_prop.c... .\Source\User\FWLib\library\inc\stm32f10x_type.h(23): error: #256: invalid redeclaration of type name "s32" (declared at line 312 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_type.h(27): error: #256: invalid redeclaration of type name "sc32" (declared at line 316 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_type.h(31): error: #256: invalid redeclaration of type name "vs32" (declared at line 320 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_type.h(35): error: #256: invalid redeclaration of type name "vsc32" (declared at line 324 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_type.h(39): error: #256: invalid redeclaration of type name "u32" (declared at line 328 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_type.h(43): error: #256: invalid redeclaration of type name "uc32" (declared at line 332 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_type.h(47): error: #256: invalid redeclaration of type name "vu32" (declared at line 336 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_type.h(51): error: #256: invalid redeclaration of type name "vuc32" (declared at line 340 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_type.h(55): error: #101: "FALSE" has already been declared in the current scope .\Source\User\FWLib\library\inc\stm32f10x_type.h(55): error: #101: "TRUE" has already been declared in the current scope .\Source\User\FWLib\library\inc\stm32f10x_type.h(55): error: #256: invalid redeclaration of type name "bool" (declared at line 345 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_type.h(57): error: #101: "RESET" has already been declared in the current scope .\Source\User\FWLib\library\inc\stm32f10x_type.h(57): error: #101: "SET" has already been declared in the current scope .\Source\User\FWLib\library\inc\stm32f10x_type.h(57): error: #256: invalid redeclaration of type name "FlagStatus" (declared at line 348 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_type.h(57): error: #256: invalid redeclaration of type name "ITStatus" (declared at line 348 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_type.h(59): error: #101: "DISABLE" has already been declared in the current scope .\Source\User\FWLib\library\inc\stm32f10x_type.h(59): error: #101: "ENABLE" has already been declared in the current scope .\Source\User\FWLib\library\inc\stm32f10x_type.h(59): error: #256: invalid redeclaration of type name "FunctionalState" (declared at line 350 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_type.h(62): error: #101: "ERROR" has already been declared in the current scope .\Source\User\FWLib\library\inc\stm32f10x_type.h(62): error: #101: "SUCCESS" has already been declared in the current scope .\Source\User\FWLib\library\inc\stm32f10x_type.h(62): error: #256: invalid redeclaration of type name "ErrorStatus" (declared at line 353 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\cortexm3_macro.h(30): error: #55: too many arguments in macro invocation .\Source\User\FWLib\library\inc\cortexm3_macro.h(30): error: #79: expected a type specifier .\Source\User\FWLib\library\inc\cortexm3_macro.h(31): error: #55: too many arguments in macro invocation .\Source\User\FWLib\library\inc\cortexm3_macro.h(31): error: #79: expected a type specifier .\Source\User\FWLib\library\inc\cortexm3_macro.h(32): error: #55: too many arguments in macro invocation .\Source\User\FWLib\library\inc\cortexm3_macro.h(32): error: #79: expected a type specifier .\Source\User\FWLib\library\inc\stm32f10x_map.h(58): error: #256: invalid redeclaration of type name "ADC_TypeDef" (declared at line 389 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_map.h(154): error: #256: invalid redeclaration of type name "BKP_TypeDef" (declared at line 488 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_map.h(163): error: #256: invalid redeclaration of type name "CAN_TxMailBox_TypeDef" (declared at line 500 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") compiling usb_pwr.c... .\Source\User\FWLib\library\inc\stm32f10x_type.h(23): error: #256: invalid redeclaration of type name "s32" (declared at line 312 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_type.h(27): error: #256: invalid redeclaration of type name "sc32" (declared at line 316 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_type.h(31): error: #256: invalid redeclaration of type name "vs32" (declared at line 320 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_type.h(35): error: #256: invalid redeclaration of type name "vsc32" (declared at line 324 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_type.h(39): error: #256: invalid redeclaration of type name "u32" (declared at line 328 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_type.h(43): error: #256: invalid redeclaration of type name "uc32" (declared at line 332 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_type.h(47): error: #256: invalid redeclaration of type name "vu32" (declared at line 336 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_type.h(51): error: #256: invalid redeclaration of type name "vuc32" (declared at line 340 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_type.h(55): error: #101: "FALSE" has already been declared in the current scope .\Source\User\FWLib\library\inc\stm32f10x_type.h(55): error: #101: "TRUE" has already been declared in the current scope .\Source\User\FWLib\library\inc\stm32f10x_type.h(55): error: #256: invalid redeclaration of type name "bool" (declared at line 345 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_type.h(57): error: #101: "RESET" has already been declared in the current scope .\Source\User\FWLib\library\inc\stm32f10x_type.h(57): error: #101: "SET" has already been declared in the current scope .\Source\User\FWLib\library\inc\stm32f10x_type.h(57): error: #256: invalid redeclaration of type name "FlagStatus" (declared at line 348 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_type.h(57): error: #256: invalid redeclaration of type name "ITStatus" (declared at line 348 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_type.h(59): error: #101: "DISABLE" has already been declared in the current scope .\Source\User\FWLib\library\inc\stm32f10x_type.h(59): error: #101: "ENABLE" has already been declared in the current scope .\Source\User\FWLib\library\inc\stm32f10x_type.h(59): error: #256: invalid redeclaration of type name "FunctionalState" (declared at line 350 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_type.h(62): error: #101: "ERROR" has already been declared in the current scope .\Source\User\FWLib\library\inc\stm32f10x_type.h(62): error: #101: "SUCCESS" has already been declared in the current scope .\Source\User\FWLib\library\inc\stm32f10x_type.h(62): error: #256: invalid redeclaration of type name "ErrorStatus" (declared at line 353 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\cortexm3_macro.h(30): error: #55: too many arguments in macro invocation .\Source\User\FWLib\library\inc\cortexm3_macro.h(30): error: #79: expected a type specifier .\Source\User\FWLib\library\inc\cortexm3_macro.h(31): error: #55: too many arguments in macro invocation .\Source\User\FWLib\library\inc\cortexm3_macro.h(31): error: #79: expected a type specifier .\Source\User\FWLib\library\inc\cortexm3_macro.h(32): error: #55: too many arguments in macro invocation .\Source\User\FWLib\library\inc\cortexm3_macro.h(32): error: #79: expected a type specifier .\Source\User\FWLib\library\inc\stm32f10x_map.h(58): error: #256: invalid redeclaration of type name "ADC_TypeDef" (declared at line 389 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_map.h(154): error: #256: invalid redeclaration of type name "BKP_TypeDef" (declared at line 488 of ".\Source\CMSIS\Core\CM3\stm32f10x.h") .\Source\User\FWLib\library\inc\stm32f10x_map.h(163): error: #256: invalid redeclaration of type name "CAN_TxMailBox_TypeDef" (declared at line 500 of ".\Source\CMSIS\Core\CM3\stm32f10x.h")
|
|
|
|
|
Nov 14 2012, 18:17
|

Частый гость
 
Группа: Участник
Сообщений: 169
Регистрация: 26-03-12
Из: Харьков
Пользователь №: 71 010

|
Цитата(Memento Mori @ Nov 14 2012, 18:16)  Господа, осваиваю STM32F103. Пользуюсь KEIL. Пытаюсь скрестить два проекта, в одном LCD библиотека, в другом библиотека для работы с USB. А какой дисплей LCD? По последовательному интерфейсу подключается?
|
|
|
|
|
Nov 14 2012, 20:34
|
Частый гость
 
Группа: Участник
Сообщений: 151
Регистрация: 1-10-12
Пользователь №: 73 751

|
ДА пожалуйста! Но схема не моя - китайсы плату ваяли. И разнесли 16-ти битную шину данных по 2 портам. Чем существенно снизили скорость работы.
|
|
|
|
|
Nov 15 2012, 06:45
|

Частый гость
 
Группа: Участник
Сообщений: 169
Регистрация: 26-03-12
Из: Харьков
Пользователь №: 71 010

|
Цитата(Memento Mori @ Nov 14 2012, 22:34)  ДА пожалуйста!
Но схема не моя - китайсы плату ваяли. И разнесли 16-ти битную шину данных по 2 портам. Чем существенно снизили скорость работы. Тоже хотел такую купить, только денег пожалел))
|
|
|
|
|
Nov 18 2012, 14:18
|
Частый гость
 
Группа: Участник
Сообщений: 151
Регистрация: 1-10-12
Пользователь №: 73 751

|
 Господа, ну помогите. Осталось всего 2 ошибки, я что-то застрял. В моем проекте последняя версия StdPeriph. В исходном проекте эти файлы в папке и в группе, обозванной почему-то FWLib Причем поименный состав папок StdPeriph и FWLib отличается. Компилятор ругается на отсутствие stm32f10x_lib.h и stm32f10x_type.h Если их подключить то компилятор ругается на повторное определение типов и имен, которые уже определены в файле stm32f10x.h Заменяешь ссылки на stm32f10x_lib.h и stm32f10x_type.h на файл stm32f10x_lib.h и stm32f10x.h - опять ругается.
Сообщение отредактировал Memento Mori - Nov 18 2012, 14:19
Прикрепленные файлы
TEST.rar ( 955.54 килобайт )
Кол-во скачиваний: 18
|
|
|
|
|
Nov 18 2012, 14:39
|
Частый гость
 
Группа: Участник
Сообщений: 151
Регистрация: 1-10-12
Пользователь №: 73 751

|
Viko я не библиотеки скрещиваю, а проекты, один из них мой, созданный с нуля на основе последних библиотек другой с USB, со старой библиотекой (FWLib), вполне рабочий проект. Разобрался... на отсутствие указанных библиотек не ругается. Ругается вот на что: Цитата USB_library\src\usb_core.c(40): error: #20: identifier "bool" is undefined USB_library\src\usb_core.c(40): error: #20: identifier "FALSE" is undefined USB_library\src\usb_core.c(494): error: #20: identifier "TRUE" is undefined USB_library\src\usb_core.c(821): error: #20: identifier "TRUE" is undefined Я думал, что true и false у компилятора в ДНК прописаны... А фишка "Go to definition of "true" " почему-то не действует... Я даже на знаю где они должны быть определены. Вставка #define TRUE 1 #define FALSE 0 решает проблему, но будет ли работать, не знаю. Мне непонятно, поченму компилятор ругается на "extern volatile bool" фразой error: #20: identifier "bool" is undefined. Причем текстовый редактор bool подсвечивает синим. Приаттачил последнюю версию.
Сообщение отредактировал Memento Mori - Nov 18 2012, 14:46
Прикрепленные файлы
TEST.rar ( 996.65 килобайт )
Кол-во скачиваний: 17
|
|
|
|
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0
|
|
|