stm32库函数编译出错

2019-07-21 03:16发布

compiling delay.c...
..USERstm32f10x.h(96): error:  #35: #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..USERstm32f10x.h:    #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..USERstm32f10x.h:     ^
..USERstm32f10x.h: ..SYSTEMdelaydelay.c: 0 warnings, 1 error
compiling sys.c...
..USERstm32f10x.h(96): error:  #35: #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..USERstm32f10x.h:    #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..USERstm32f10x.h:     ^
..USERstm32f10x.h: ..SYSTEMsyssys.c: 0 warnings, 1 error
compiling usart.c...
..USERstm32f10x.h(96): error:  #35: #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..USERstm32f10x.h:    #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..USERstm32f10x.h:     ^
..USERstm32f10x.h: ..SYSTEMusartusart.c: 0 warnings, 1 error
compiling misc.c...
..USERstm32f10x.h(96): error:  #35: #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..USERstm32f10x.h:    #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..USERstm32f10x.h:     ^
..USERstm32f10x.h: ..FWLIBsrcmisc.c: 0 warnings, 1 error
compiling stm32f10x_gpio.c...
..USERstm32f10x.h(96): error:  #35: #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..USERstm32f10x.h:    #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..USERstm32f10x.h:     ^
..USERstm32f10x.h: ..FWLIBsrcstm32f10x_gpio.c: 0 warnings, 1 error
compiling stm32f10x_rcc.c...
..USERstm32f10x.h(96): error:  #35: #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..USERstm32f10x.h:    #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..USERstm32f10x.h:     ^
..USERstm32f10x.h: ..FWLIBsrcstm32f10x_rcc.c: 0 warnings, 1 error
compiling stm32f10x_usart.c...
..USERstm32f10x.h(96): error:  #35: #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..USERstm32f10x.h:    #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..USERstm32f10x.h:     ^
..USERstm32f10x.h: ..FWLIBsrcstm32f10x_usart.c: 0 warnings, 1 error
compiling main.c...
..USERstm32f10x.h(96): error:  #35: #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..USERstm32f10x.h:    #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
..USERstm32f10x.h:     ^
..USERstm32f10x.h: main.c: 0 warnings, 1 error
compiling stm32f10x_it.c...
stm32f10x.h(96): error:  #35: #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
stm32f10x.h:    #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
stm32f10x.h:     ^
stm32f10x.h: stm32f10x_it.c: 0 warnings, 1 error
compiling system_stm32f10x.c...
stm32f10x.h(96): error:  #35: #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
stm32f10x.h:    #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
stm32f10x.h:     ^
stm32f10x.h: system_stm32f10x.c: 0 warnings, 1 error
Target not created

之前也有报错,而且是30多个,这个报错是库函数版本不对吗?
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
4条回答
正点原子
1楼-- · 2019-07-21 08:01
 精彩回答 2  元偷偷看……
ElfenSterben
2楼-- · 2019-07-21 13:05
keil5的库函数貌似用的新的
firsttady
3楼-- · 2019-07-21 17:51
回复【2楼】ElfenSterben:
---------------------------------
这是KEIL4
ElfenSterben
4楼-- · 2019-07-21 18:48
回复【3楼】firsttady:
---------------------------------
是不是设置里面有个条件编译没填

一周热门 更多>