野火电子论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 14962|回复: 5

在IAR中为什么出现这么多的未定义?

[复制链接]
发表于 2015-4-17 17:02:50 | 显示全部楼层 |阅读模式
Error[Pe020]: identifier "TIM_TimeBaseInitTypeDef" is undefined F:\keil实验\PWM3\USER\main.c 3
Error[Pe020]: identifier "TIM_OCInitTypeDef" is undefined F:\keil实验\PWM3\USER\main.c 4
Error[Pe020]: identifier "GPIO_InitTypeDef" is undefined F:\keil实验\PWM3\USER\main.c 5
Error[Pe020]: identifier "EXTI_InitTypeDef" is undefined F:\keil实验\PWM3\USER\main.c 6
Error[Pe020]: identifier "NVIC_InitTypeDef" is undefined F:\keil实验\PWM3\USER\main.c 7
Error[Pe020]: identifier "TIM_CKD_DIV1" is undefined F:\keil实验\PWM3\USER\main.c 20
Error[Pe020]: identifier "TIM_CounterMode_Up" is undefined F:\keil实验\PWM3\USER\main.c 21


回复

使用道具 举报

 楼主| 发表于 2015-4-17 17:07:36 | 显示全部楼层
Warning[Pe223]: function "TIM_TimeBaseInit" declared implicitly F:\keil实验\PWM3\USER\main.c 22
Error[Pe020]: identifier "TIME_Timebasestructure" is undefined F:\keil实验\PWM3\USER\main.c 22
Error[Pe020]: identifier "TIM_OCMode_PWM1" is undefined F:\keil实验\PWM3\USER\main.c 25
Error[Pe020]: identifier "TIM_OutputState_Enable" is undefined F:\keil实验\PWM3\USER\main.c 26
Error[Pe020]: identifier "TIM_OCPolarity_High" is undefined F:\keil实验\PWM3\USER\main.c 29
Warning[Pe223]: function "TIM_OC1Init" declared implicitly F:\keil实验\PWM3\USER\main.c 30
Error[Pe020]: identifier "TIM_OCInitstructure" is undefined F:\keil实验\PWM3\USER\main.c 30
Warning[Pe223]: function "TIM_OC1PreloadConfig" declared implicitly F:\keil实验\PWM3\USER\main.c 31
Error[Pe020]: identifier "TIM_OCPreload_ENABLE" is undefined F:\keil实验\PWM3\USER\main.c 31
Warning[Pe223]: function "TIM_ARRPreloadConfig" declared implicitly F:\keil实验\PWM3\USER\main.c 33
Warning[Pe223]: function "TIM_Cmd" declared implicitly F:\keil实验\PWM3\USER\main.c 34
Warning[Pe223]: function "RCC_APB2PeriphClockCmd" declared implicitly F:\keil实验\PWM3\USER\main.c 50
Error[Pe020]: identifier "RCC_APB2Periph_GPIOE" is undefined F:\keil实验\PWM3\USER\main.c 50
Error[Pe020]: identifier "RCC_APB2Periph_AFIO" is undefined F:\keil实验\PWM3\USER\main.c 50
Warning[Pe223]: function "NVIC_Config" declared implicitly F:\keil实验\PWM3\USER\main.c 52
Error[Pe020]: identifier "GPIO_Pin5" is undefined F:\keil实验\PWM3\USER\main.c 54
Error[Pe020]: identifier "GPIO_Mode_IPD" is undefined F:\keil实验\PWM3\USER\main.c 55
Warning[Pe223]: function "GPIO_Init" declared implicitly F:\keil实验\PWM3\USER\main.c 56
Error[Pe020]: identifier "GPIO_Initstructure" is undefined F:\keil实验\PWM3\USER\main.c 56
Error[Pe020]: identifier "EXTI_Line5" is undefined F:\keil实验\PWM3\USER\main.c 58
Error[Pe020]: identifier "EXTI_Mode_Interrupt" is undefined F:\keil实验\PWM3\USER\main.c 59
Error[Pe020]: identifier "EXTI_Trigger_Rising" is undefined F:\keil实验\PWM3\USER\main.c 60
Warning[Pe223]: function "EXTI_Init" declared implicitly F:\keil实验\PWM3\USER\main.c 62
Error[Pe159]: declaration is incompatible with previous "NVIC_Config" (declared at line 52) F:\keil实验\PWM3\USER\main.c 66
Warning[Pe223]: function "NVIC_PriorityGroupConfig" declared implicitly F:\keil实验\PWM3\USER\main.c 70
Error[Pe020]: identifier "NVIC_PriorityGroup_1" is undefined F:\keil实验\PWM3\USER\main.c 70
Warning[Pe223]: function "NVIC_Init" declared implicitly F:\keil实验\PWM3\USER\main.c 76
Warning[Pe223]: function "EXTI_GetITStatus" declared implicitly F:\keil实验\PWM3\USER\main.c 113
Error[Pe020]: identifier "EXTI_Line5" is undefined F:\keil实验\PWM3\USER\main.c 113
Error[Pe020]: identifier "t" is undefined F:\keil实验\PWM3\USER\main.c 118
Warning[Pe223]: function "EXTI_ClearITPendingBit" declared implicitly F:\keil实验\PWM3\USER\main.c 119
Error[Pe020]: identifier "t" is undefined F:\keil实验\PWM3\USER\main.c 123
Warning[Pe223]: function "EXTI_ClearITPendingBit" declared implicitly F:\keil实验\PWM3\USER\main.c 124
Warning[Pe177]: function "EXTI_PE5_Config" was declared but never referenced F:\keil实验\PWM3\USER\main.c 109
Error[Pe067]: expected a "}" F:\keil实验\PWM3\USER\main.c 130
Warning[Pe177]: function "TIM3_Mode_Config" was declared but never referenced F:\keil实验\PWM3\USER\main.c 9
Warning[Pe177]: function "EXTI_PE5_Config" was declared but never referenced F:\keil实验\PWM3\USER\main.c 45
Error while running C/C++ Compiler
还有这些,用的是STM32VE的开发板
回复 支持 反对

使用道具 举报

发表于 2015-4-17 17:34:34 | 显示全部楼层
是stm32f10x_conf.h文件没有把其它外设的头文件包含进来吧
回复 支持 反对

使用道具 举报

 楼主| 发表于 2015-4-17 17:36:42 | 显示全部楼层
检查了,已经包进去了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2015-4-17 17:39:33 | 显示全部楼层
#include "stm32f10x_adc.h"
#include "stm32f10x_bkp.h"
#include "stm32f10x_can.h"
#include "stm32f10x_cec.h"
#include "stm32f10x_crc.h"
#include "stm32f10x_dac.h"
#include "stm32f10x_dbgmcu.h"
#include "stm32f10x_dma.h"
#include "stm32f10x_exti.h"
#include "stm32f10x_flash.h"
#include "stm32f10x_fsmc.h"
#include "stm32f10x_gpio.h"
#include "stm32f10x_i2c.h"
#include "stm32f10x_iwdg.h"
#include "stm32f10x_pwr.h"
#include "stm32f10x_rcc.h"
#include "stm32f10x_rtc.h"
#include "stm32f10x_sdio.h"
#include "stm32f10x_spi.h"
#include "stm32f10x_tim.h"
#include "stm32f10x_usart.h"
#include "stm32f10x_wwdg.h"
#include "misc.h"
就是这些,已经包进去了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2015-4-17 17:41:42 | 显示全部楼层
是不是我的IAR里面的设置有问题啊?你有关于STM32F103VE的IAR的设置没?求发一份
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-23 16:44 , Processed in 0.029741 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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