stm32 SYSTEM文件夹编译错误

2019-07-20 06:46发布

照着原子的视频自己写了跑马灯的寄存器程序,把SYSTEM文件夹搬过来后,编译不成功。
compiling delay.c...
..SYSTEMsysstm32f4xx.h(102): error:  #35: #error directive: "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
   #error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
..SYSTEMdelaydelay.c: 0 warnings, 1 error
compiling usart.c...
..SYSTEMsysstm32f4xx.h(102): error:  #35: #error directive: "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
   #error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
..SYSTEMusartusart.c: 0 warnings, 1 error
compiling sys.c...
..SYSTEMsysstm32f4xx.h(102): error:  #35: #error directive: "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
   #error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
..SYSTEMsyssys.c: 0 warnings, 1 error
compiling main.c...
..SYSTEMsysstm32f4xx.h(102): error:  #35: #error directive: "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
   #error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
..USERmain.c: 0 warnings, 1 error
compiling LED.C...
..SYSTEMsysstm32f4xx.h(102): error:  #35: #error directive: "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
   #error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
..HARDWARELEDLED.C: 0 warnings, 1 error
"..OBJLED_light.axf" - 5 Error(s), 0 Warning(s).
Target not created.

友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
9条回答
qiuzhicheng
1楼-- · 2019-07-21 11:01
集成依稀 发表于 2018-8-9 15:40
百度方法基本都是C/C++的宏定义错误,我之前一直是这么定义的没错误

你发你工程看一下
集成依稀
2楼-- · 2019-07-21 11:13
qiuzhicheng 发表于 2018-8-9 15:48
你发你工程看一下

压缩包发了
集成依稀
3楼-- · 2019-07-21 12:46
 精彩回答 2  元偷偷看……

一周热门 更多>