野火电子论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10261|回复: 2

关于 新建一个工程模板

[复制链接]
发表于 2018-4-15 21:27:47 | 显示全部楼层 |阅读模式
感觉什么都弄好了,还会出现一大堆错误,谁能解答一下下

*** Using Compiler 'V5.06 update 3 (build 300)', folder: 'D:\keil 5\ARM\ARMCC\Bin'
Build target 'Target 1'
compiling misc.c...
..\Libraries\STM32F10x_StdPeriph_Driver\src\misc.c(24): error:  #5: cannot open source input file "misc.h": No such file or directory
  #include "misc.h"
..\Libraries\STM32F10x_StdPeriph_Driver\src\misc.c: 0 warnings, 1 error
compiling stm32f10x_adc.c...
..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_adc.c(23): error:  #5: cannot open source input file "stm32f10x_adc.h": No such file or directory
  #include "stm32f10x_adc.h"
..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_adc.c: 0 warnings, 1 error
compiling stm32f10x_can.c...
..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_can.c(23): error:  #5: cannot open source input file "stm32f10x_can.h": No such file or directory
  #include "stm32f10x_can.h"
..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_can.c: 0 warnings, 1 error
compiling stm32f10x_bkp.c...
..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_bkp.c(23): error:  #5: cannot open source input file "stm32f10x_bkp.h": No such file or directory
  #include "stm32f10x_bkp.h"
等等
回复

使用道具 举报

 楼主| 发表于 2018-4-15 21:37:42 | 显示全部楼层
刚发现这个错误是因为包含路径只能是头文件的上级文件,我有一个包含了再上一级文件了,现在错误如下
*** Using Compiler 'V5.06 update 3 (build 300)', folder: 'D:\keil 5\ARM\ARMCC\Bin'
Build target 'Target 1'
compiling core_cm3.c...
compiling misc.c...
..\Libraries\CMSIS\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\Libraries\CMSIS\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\Libraries\STM32F10x_StdPeriph_Driver\src\misc.c: 1 warning, 1 error
compiling system_stm32f10x.c...
..\Libraries\CMSIS\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\Libraries\CMSIS\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\Libraries\CMSIS\system_stm32f10x.c: 1 warning, 1 error
compiling stm32f10x_adc.c...
..\Libraries\CMSIS\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\Libraries\CMSIS\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_adc.c: 1 warning, 1 error
compiling stm32f10x_bkp.c...
..\Libraries\CMSIS\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\Libraries\CMSIS\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
等等
回复 支持 反对

使用道具 举报

 楼主| 发表于 2018-4-15 23:17:06 | 显示全部楼层
将STM3210X_HD从define中删掉就好了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

联系站长|手机版|野火电子官网|野火淘宝店铺|野火电子论坛 ( 粤ICP备14069197号 ) 大学生ARM嵌入式2群

GMT+8, 2024-5-19 03:45 , Processed in 0.030150 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表