NodeMCU 固件编译常见问题答疑
smartconfig.h: No such file or directory
报错信息:
wifi.c:20:31: fatal error: smart/smartconfig.h: No such file or directory1
2
3
4
5
6
7
8
9
10
11
12
13wifi.c:20:31: fatal error: smart/smartconfig.h: No such file or directory
include "smart/smartconfig.h"
^
compilation terminated.
../../Makefile:422: recipe for target '.output/eagle/debug/obj/wifi.o' failed
make[2]: *** [.output/eagle/debug/obj/wifi.o] Error 1
make[2]: Leaving directory '/root/workspace/app/modules'
../Makefile:380: recipe for target '.subdirs' failed
make[1]: *** [.subdirs] Error 2
make[1]: Leaving directory '/root/workspace/app'
Makefile:380: recipe for target '.subdirs' failed
make: *** [.subdirs] Error 2
script returned exit code 2解决方法:
目前看来,这是 nodemcu-firmware 的一个 bug,官方已经在 dev 分支修复了这个问题,如果你不想使用 dev 分支,可以手动修改 app/modules/wifi.c 文件,将#include "smart/smartconfig.h"
修改为#include "smartconfig.h"
。更多信息请参考这个 issues 2928。
recipe for target ‘.subdirs’ failed
报错信息:
Makefile:380: recipe for target ‘.subdirs’ failed1
2
3
4
5
6
7
8
9Traceback (most recent call last):
File "/root/workspace/tools/toolchains/esptool.py", line 37, in <module>
import serial
ImportError: No module named serial
../Makefile:264: recipe for target '.output/eagle/debug/bin/eagle.app.v6.bin' failed
make[1]: *** [.output/eagle/debug/bin/eagle.app.v6.bin] Error 1
make[1]: Leaving directory '/root/workspace/app'
Makefile:380: recipe for target '.subdirs' failed
make: *** [.subdirs] Error 2解决方法:
很可能是编译链工具不完整,请重新克隆 nodemcu-firmware 仓库,一定要使用 git clone 而不是 zip download。
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 弹霄博科!