1、编译过程弹出错误但是需要自己把编译过程拷贝出来放在word中分析错误在哪,不能像Andsight编译器一样可以直接提示错误
..\..\UserCode\Drv\src\BQM.c(7): error: #20: identifier "uint8_t" is undefined
uint8_t Dir;
..\..\UserCode\Drv\src\BQM.c: 0 warnings, 1 error
creating preprocessor file for hc4051.c...
compiling hc4051.c...
creating preprocessor file for PadKey.c...
compiling PadKey.c...
creating preprocessor file for ScanPadKey.c...
..\..\UserCode\Drv\inc\hc4051.h(16): warning: #1-D: last line of file ends without a newline
#endif //__HC4051_H__
..\..\UserCode\Drv\src\ScanPadKey.c: 1 warning, 0 errors
compiling ScanPadKey.c...
..\..\UserCode\Drv\inc\hc4051.h(16): warning: #1-D: last line of file ends without a newline
#endif //__HC4051_H__
..\..\UserCode\Drv\src\ScanPadKey.c(35): warning: #223-D: function "printf" declared implicitly
printf("the velocity of the key %d is : 0x%X\n", KeyIndex, PadVelocity);
..\..\UserCode\Drv\src\ScanPadKey.c: 2 warnings, 0 errors
".\obj\Device_Audio_HID_NAU8822.axf" - 1 Error(s), 4 Warning(s).
Target not created
2、隐性声明
#223-D: function "HC4051Init" declared implicitly
3、下面的提示
解决办法:
4、评估板模式,代码大小限制在32K。
当前代码大小为:8592+708+248+3136=12684B=12K,显然还没有达到限制值32K,因此可以正常烧录和下载。但是为了解决这个问题,我还是尝试了破解,结果如下:
错误R206:没有注册使用权,需要管理员权限。
接下来怎么做?
①卸载KEIL-MDK
②删除C盘中KEIL整个目录
③以管理员身份重新安装KEIL-MDK
④打开破解文件,按照相同的步骤重新破解一次,结果竟然如下:
这个破解,软件使用到期时间为2020年,而现在为2022年,因此早已不能使用了,所以下载了新的破解软件,重新破解,结果如下:
OK,成功!
5、重新编译工程,尝试下载,提示如下:
这是下载器驱动没有安装,另外还发现下面这个问题:
在新塘官网或者github中找到了相关的文件,如下如图,安装完之后,再提示安装驱动。
上面这些步骤尝试了个遍,依然还是出现在Device中找不到具体设备的问题,于是我再次卸载了keil MDK,这个版本是:
然后安装了新的版本:
然后竟然一切OK,可见4.74版本的MDK支持了nuvoton,4.12版本的是不支持的。