ESP8266 RTOS SDK “cannot find crt1-sim.o” 和error:‘CONFIG_AP_SSID_KEY‘ undeclared问题的解决
2023-09-11 14:21:25 时间
1. “cannot find crt1-sim.o” 问题
最近MBP换了SSD,重新装了系统,重新设置ESP8266开发环境后编译时遇到了cannot find crt1-sim.o
的问题,完整错误信息如下:
/Users/esp8266/toolchain/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.2.0/../../../../xtensa-lx106-elf/bin/ld: cannot find crt1-sim.o: No such file or directory
/Users/esp8266/toolchain/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.2.0/../../../../xtensa-lx106-elf/bin/ld: cannot find _vectors.o: No such file or directory
/Users/esp8266/toolchain/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.2.0/../../../../xtensa-lx106-elf/bin/ld: cannot find -lsim
/Users/esp8266/toolchain/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.2.0/../../../../xtensa-lx106-elf/bin/ld: cannot find -lhandlers-sim
/Users/esp8266/toolchain/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.2.0/../../../../xtensa-lx106-elf/bin/ld: cannot find -lhal
collect2: error: ld returned 1 exit status
make[1]: *** [/Users/esp8266/esp-aliyun/examples/solutions/smart_light/build/bootloader/bootloader.elf] Error 1
make: *** [/Users/esp8266/esp-aliyun/examples/solutions/smart_light/build/bootloader/bootloader.bin] Error 2
make: *** Waiting for unfinished jobs....
折腾了一天毫无结果,过了两天决定重新搜索一下ESP8266_RTOS_SDK
官方github页面的issue,终于在老旧的2018年的issue回答中找到了答案。
其实原因就是当前设置了LDFLAGS
环境变量。查看LDFlags
环境变量有两种方式:
echo ${LDFLAGS}
printenv | grep -i LDFLAGS
我运行上述命令的结果是:
LDFLAGS=-L/usr/local/opt/ruby/lib
解决办法也有两种:
3. unset LDFLAGS
– 仅对当前终端有效
4. 查找的用户profile(我用zsh,所以我的当前用户profile的是~/.zshrc),删除LDFLAGS
设定。我实际上找了半天,发现当前用户的profile里面没有这个设置。然后想了一下,当前用户是我新创建的一个专门用于编译ESP8266的新用户,终端窗口是从默认用户su esp8266
登录的,所以回到默认用户的~/.zshrc
里面删除LDFLAGS
设定,开启新的终端窗口即可。
2. error: ‘CONFIG_AP_SSID_KEY’ undeclared (first use in this function)问题
这个问题解决起来比较简单,在项目主文件夹下运行make menuconfig
,什么选项都不需要改动,然后再次编译就可以了。
相关文章
- uni-app - H5 公众号网页分享到微信朋友圈 / 转发分享给朋友好友 / 分享到手机 QQ / 分享到 QQ 空间,给微信分享卡片设置图标、标题、描述文字等(JS-SDK 通用解决方案放心用)
- 客户端SDK测试是什么?如何测?
- 用带有 Amazon Cognito Identity SDK 的 webpack 打包 JavaScript
- 【HMS Core】华为分析SDK如何申请数据导出功能?
- Unity接入华为HMS SDK获取不到agconnect-services.json文件信息
- Installed Build Tools revision 33.0.0 is corrupted. Remove and install again using the SDK Manager.
- Android SDK国内代理速度还可以
- Unity 发布安卓JDK,SDK配置
- android-sdk-windows版本号下载
- 一分钟教你构建属于你的视频会议SDK
- 移动用户隐私从何谈起:揭秘第三方SDK中夹带的私货
- RO05 - 如何编写RemObjects SDK服务端 (Delphi Version)