Keil编译常见问题
来源:互联网 发布:gopro studio for mac 编辑:程序博客网 时间:2024/04/28 01:48
1.led的前后今生
1.出现warning: #1-D: last line of file ends without a newline
解决方案:这是由于在函数的“}”之后没有回车的原因造成的,添加回车后,可消除警告。
2.出现main.c: Error: command-line: #992: invalid macro definition: USE_STDPERIPH_DRIVER.STM32F10X_HD
解决方案:这是由于中间的逗号写错了,应该是英文的逗号。
3.出现main.c(2): warning: #9-D: nested comment is not allowed
解决方案:这是注释嵌套的结果,不是程序本身的问题,对程序运行没有任何影响。
/*/**/去掉第二个/*可以消除警告
4.出现LED\led.c(33): error: #20: identifier "GPIO_InitStructure" is undefined
解决方案:这是由于变量没有定义造成的,检查定义的变量是否写错,注意大小写GPIO_Initstructure。
5.出现main.c(21): warning: #223-D: function "LED_GPIO_Config" declared implicitly
解决方案:是由于led.c中定义了一个函数,led.h中没有申明这个函数,只需要在led.h中申明了即可解决
2.SysTick
1.出现Delay\Delayus.c(14): error: #20: identifier "TimingDelay" is undefined
解决方案;是由于delayus()中没有定义造成,定义静态变量static __IO u32 TimingDelay;即可解决
2.出现stm32f10x_it.c(143): warning: #223-D: function "TimingDelay_Decrement" declared implicitly
解决方案:在stm32f10x_it.c文件中,外部声明extern void TimingDelay_Decrement(void);
3.KEY_POLLING
1.出现error: #20: identifier "GPIO" is undefined?
解决方案:将GPIO InitTypeDef GPIO InitStructure;改成GPIO_InitTypeDef GPIO_InitStructure;
4.USART1
1.出现warning: #177-D: variable "GPIO_InitSuructure" was declared but never referenced
解决方案:常常是函数书写错误,改成GPIO_InitStructure
2.error: #20: identifier "USARTx" is undefined
解决方案:由于USARTx没有定义造成,首先检查第一次出现USART的位置.void USART1_printf(USART TypeDef* USARTx, uint8_t *Data,...)在定义结构体出错,改为void USART1_printf(USART_TypeDef* USARTx, uint8_t *Data,...)
3.出现usart1\usart1.c(129): error: #20: identifier "va_list" is undefined
解决方案:va函数在头文件stdarg.h中,要使用其中的参数,必须包含此头文件#include "stdarg.h"
4.出现usart1\usart1.c(47): error: #20: identifier "FILE" is undefined
解决方案;这是由于使用了重定向C函数,又没有包含该函数的头文件#include “stdio.h”,在usart.h中添加即可解决问题,还要在编译器中设置一个选项 Use MicroLIB (使用微库)。
- Keil编译常见问题
- keil 常见问题
- 【调试工具】单片机keil常见问题
- keil编译错误解决方法
- KEIL编译错误信息表
- KEIL编译文件说明
- KEIL编译错误信息表
- KEIL编译错误信息
- KEIL编译错误信息表
- Keil编译错误汇总
- KEIL编译文件
- keil C51脚本编译
- Keil C51 编译错误总结
- Keil C51编译错误总结
- Keil增量编译build异常
- Keil的常见编译警告
- Eclipse + Keil + Jlink编译、调试
- 用keil编译LPC程序
- 线性回归中最小二乘的概率解释
- HBase RowKey设计原则
- 深入理解Android Wi-Fi,NFC和GPS卷 全面到货
- MyEclipse 代码编写,编译卡死,启动卡死解决方案
- iOS学习之iOS沙盒(sandbox)机制和文件操作(二)
- Keil编译常见问题
- 【邻接表】STL中的vector实现邻接表
- UC浏览器电脑版来了:用了有快感?
- 前端面试题——js闭包
- 第二十六节 深入委托实例补充
- 我来打酱油的
- 浅析uboot网络程序结构
- 【链式前向星】(静态建邻接表)
- 【豌豆荚 & 360助手】发布第一个私人项目