程序无法按照正常执行顺序执行。

learnerfranky
Posts: 6
Joined: Thu Sep 24, 2020 6:49 am

程序无法按照正常执行顺序执行。

Postby learnerfranky » Mon Jan 18, 2021 7:34 am

The attachment 5295606e1867482352b5e5845827a6a.png is no longer available
5295606e1867482352b5e5845827a6a.png
5295606e1867482352b5e5845827a6a.png (36.92 KiB) Viewed 2150 times
d2b849e59f604d04403aeb15511bbb3.png
d2b849e59f604d04403aeb15511bbb3.png (40.6 KiB) Viewed 2150 times
[第三个图见附件]



这个project是另开来测试功能的...原本的项目里面更离谱,主函数进不去外面所有的函数,都干脆不调用,只执行主函数那些LOGI

但这个测试中,我可以通过在app_main函数内直接写extern void wifi_init_sta(); 来使得编译通过,但也会出现主函数根本不调用wifi_init_sta这个函数的问题(导致串口LOG会一直提示 MQTT_CLIENT: Error transport connect),以下是编译过程的错误信息。

Code: Select all

[6/7] Linking CXX executable mqtt_tcp.elf
FAILED: mqtt_tcp.elf 
cmd.exe /C "cd . && C:\Users\Franky\.espressif\tools\xtensa-esp32-elf\esp-2020r2-8.2.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe  -mlongcalls -Wno-frame-address   @CMakeFiles\mqtt_tcp.elf.rsp  -o mqtt_tcp.elf  && cd ."
c:/users/franky/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/main/libmain.a(app_main.c.obj):(.literal.app_main+0x38): undefined reference to `wifi_init_sta'
尝试使用idf.py fullclean对编译的中间文件进行清理。但没有效果。

有没有人了解这是什么情况...因为两个项目都是这样,连idf里面用来测试的example都不能正常运行。重新安装过IDE,ESP-IDF Tool也重新安装过了。
Attachments
ff5c3e213c2097383767ee886a33b9b.png
ff5c3e213c2097383767ee886a33b9b.png (50.02 KiB) Viewed 2150 times

Who is online

Users browsing this forum: JinDing and 62 guests