../../../sl/developer/sdks/gecko_sdk_suite/v2.7/protocol/zigbee/app/ezsp-host/ezsp-host-io.c:254:25: error: 'CSTART' undeclared (first use in this function)
tios.c_cc[VSTART] = CSTART; // define XON and XOFF
^~~~~~
../../../sl/developer/sdks/gecko_sdk_suite/v2.7/protocol/zigbee/app/ezsp-host/ezsp-host-io.c:254:25: note: each undeclared identifier is reported only once for each function it appears in
../../../sl/developer/sdks/gecko_sdk_suite/v2.7/protocol/zigbee/app/ezsp-host/ezsp-host-io.c:255:24: error: 'CSTOP' undeclared (first use in this function)
tios.c_cc[VSTOP] = CSTOP;
^~~~~
Makefile:471: recipe for target 'build/ezsp-host-io.o' failed
这个错一开始很懵,咨询了原厂,没得到解答,自己慢慢排查,发现是串口配置的时候引用了几个未定义的宏!
仔细跟踪宏的定义头文件,最终在交叉编译工具的文件里找到,附上解决办法:
#include "/opt/arm-openwrt-linux-toolchain/include/sys/ttydefaults.h"
在ezsp-host-io.c里增加头文件,就可以解决这个错误。
出错的原因应该是原厂的SDK路径配置错误问题,还未定义到具体原因。