开发板NuTiny-SDK-M051
用Keil C开发8051程序,一般8051是要声明SFR
而M051例程的声明都是#include "M051Series.h"
但例程compiled可以pass,可是自建工程就会出现如下error
C:\Keil\ARM\Inc\Nuvoton\M051Series\M051Series.h(76): error: #5: cannot open source input file "System\SysInfra.h": No such file or directory
2022/09/06 11:26
Nuvoton的m0是采用标准的C编程。
8051里面也可以include头文件的。头文件有搜索地址的,在keil里面option->C/C++里面Include Paths中可以添加头文件搜索路径。
如果对keil不熟,就拿个现成的project来改。