http://www.51hei.com/bbs/dpj-24701-1.html
我编译时,显示lianxi_jianpan.c(54):
warning
C206
: 'dispay':
missing
function
-
prototype
#include
#define uint unsigned int
#define uchar unsigned c
keil
常见错误
main.c(35):
warning
: #
12
8-D: loop is not reachable from preceding code
main.c(54):
warning
: #1-D: last line of file ends without a newline
initSpi.c(6): error: #268: declaration may not appear after executable statement in block
main.c(31):
warning
: #223-D:
function
"initNvic" declared implicitly
这个问题是根本原因是编译的代码
中
存在未声明函数,即“缺少函数原型”错误。多文件编程
中
比较多,导致的原因也很多,下面总结几个用于大家排查自己报错代码。
1、“头文件卫士”宏定义的失误。
有时候为了方便,一个功能函数文件*.c、*.h直接复制几份加以修改,然而这样稍不留神就会导致头文件里的“#ifndef XXXX”忘记修改,导致两份头文件的选择编译宏相同,原本用来防止重复编译的头文件卫士现在直接导致第二份代码的头文件无法被正常预处理插入代码
中
。
宏名较长时由于看起来比较相...
Version: 2.4.0 (2021-
12
-10)
Keil
.STM32F1xx_DFP.2.4.0.pack Download
Updated Pack to Standard Peripherals Library to version V3.6.0.
CMSIS-Driver:
Updated disclaimers.
Corrected SetBitrate
function
to leave Silent and Loopback mode as they were.
Corrected SetMode
function
to clear Silent and Loopback mode when NORMAL mode is activated.
EMAC, DMA:
Added support for ARM Compiler 6.
MCI, I2C:
Replaced empty delay loops with _
NOP
().
Updated I2C_GetDataCount (Returned -1 when Slave is not a