野火电子论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 28299|回复: 8

k60头文件

[复制链接]
发表于 2013-9-3 17:41:28 | 显示全部楼层 |阅读模式
自己编写了一个.h文件  并在include.h里进行声明  放在自己的文件夹里不能用   放在drivers里的某一个文件夹里可以用  并且  我已经在c/c++   Preprocerssor 里进行了设置  但就是不能识别  求大神指教
回复

使用道具 举报

发表于 2013-9-3 17:44:15 | 显示全部楼层
说明没正确填写好 头文件 所在的路径嘛……
你说说你是如何写你的路径的,以及你的路径具体是如何的
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-9-3 17:48:41 | 显示全部楼层
fire 发表于 2013-9-3 17:44
说明没正确填写好 头文件 所在的路径嘛……
你说说你是如何写你的路径的,以及你的路径具体是如何的

我在drivers里新建了一个PID的文件  PID里包括PID.c和PID.h   在include.h里加了一句#include  "PID.h"  然后在设置里写了$PROJ_DIR$\..\..\src\drivers\PID     
回复 支持 反对

使用道具 举报

发表于 2013-9-3 17:55:08 | 显示全部楼层
王英俊 发表于 2013-9-3 17:48
我在drivers里新建了一个PID的文件  PID里包括PID.c和PID.h   在include.h里加了一句#include  "PID.h"   ...

感觉没错,IAR报什么错?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-9-3 18:00:19 | 显示全部楼层
fire 发表于 2013-9-3 17:55
感觉没错,IAR报什么错?

Building configuration: fire_pwm_demo - Debug
Updating build tree...
isr.c  
Fatal Error[Pe1696]: cannot open source file "PID.h" C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\src\projects\fire_pwm_demo\include.h 20
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\src\projects\fire_pwm_demo\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\projects\fire_pwm_demo\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\LIB\CMSIS\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\LIB\FatFs\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\common\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\cpu\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\cpu\headers\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\platforms\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\adc\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\AT24C02\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\exti\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\delay\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\FTM\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\gpio\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\i2c\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\LED\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\lptmr\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\mcg\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\PIT\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\key\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\pmc\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\rtc\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\uart\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\wdog\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\build\"
            searched: "D:\IAR\arm\inc\"
            searched: "D:\IAR\arm\inc\c\"
Error while running C/C++ Compiler
main.c  
Fatal Error[Pe1696]: cannot open source file "PID.h" C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\src\projects\fire_pwm_demo\include.h 20
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\src\projects\fire_pwm_demo\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\projects\fire_pwm_demo\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\LIB\CMSIS\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\LIB\FatFs\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\common\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\cpu\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\cpu\headers\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\platforms\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\adc\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\AT24C02\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\exti\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\delay\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\FTM\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\gpio\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\i2c\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\LED\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\lptmr\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\mcg\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\PIT\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\key\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\pmc\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\rtc\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\uart\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\wdog\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\build\"
            searched: "D:\IAR\arm\inc\"
            searched: "D:\IAR\arm\inc\c\"
Error while running C/C++ Compiler

Total number of errors: 2
Total number of warnings: 0
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-9-3 18:01:03 | 显示全部楼层
fire 发表于 2013-9-3 17:55
感觉没错,IAR报什么错?

Building configuration: fire_pwm_demo - Debug
Updating build tree...
isr.c  
Fatal Error[Pe1696]: cannot open source file "PID.h" C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\src\projects\fire_pwm_demo\include.h 20
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\src\projects\fire_pwm_demo\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\projects\fire_pwm_demo\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\LIB\CMSIS\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\LIB\FatFs\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\common\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\cpu\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\cpu\headers\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\platforms\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\adc\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\AT24C02\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\exti\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\delay\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\FTM\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\gpio\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\i2c\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\LED\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\lptmr\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\mcg\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\PIT\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\key\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\pmc\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\rtc\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\uart\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\wdog\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\build\"
            searched: "D:\IAR\arm\inc\"
            searched: "D:\IAR\arm\inc\c\"
Error while running C/C++ Compiler
main.c  
Fatal Error[Pe1696]: cannot open source file "PID.h" C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\src\projects\fire_pwm_demo\include.h 20
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\src\projects\fire_pwm_demo\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\projects\fire_pwm_demo\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\LIB\CMSIS\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\LIB\FatFs\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\common\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\cpu\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\cpu\headers\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\platforms\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\adc\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\AT24C02\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\exti\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\delay\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\FTM\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\gpio\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\i2c\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\LED\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\lptmr\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\mcg\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\PIT\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\key\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\pmc\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\rtc\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\uart\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\src\drivers\wdog\"
            searched: "C:\Users\Administrator\Desktop\四旋翼飞行器建模、控制与仿真\PWM 实验 LED 测试\build\pwm_demo\..\..\build\"
            searched: "D:\IAR\arm\inc\"
            searched: "D:\IAR\arm\inc\c\"
Error while running C/C++ Compiler

Total number of errors: 2
Total number of warnings: 0
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-9-3 18:04:20 | 显示全部楼层
fire 发表于 2013-9-3 17:55
感觉没错,IAR报什么错?

就是不从我自己弄得那个文件夹读取
回复 支持 反对

使用道具 举报

发表于 2013-9-3 19:06:23 | 显示全部楼层
王英俊 发表于 2013-9-3 18:00
Building configuration: fire_pwm_demo - Debug
Updating build tree...
isr.c  

你确定你把 $PROJ_DIR$\..\..\src\drivers\PID   写进工程选项了?报警里没提示这个文件夹!!!
回复 支持 反对

使用道具 举报

发表于 2013-9-3 19:07:03 | 显示全部楼层
要不就是你设置错了,要不就是根本没设置
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-23 10:28 , Processed in 0.041985 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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