espressif / esp-at

AT application for ESP32/ESP32-C2/ESP32-C3/ESP32-C6/ESP8266
Apache License 2.0
863 stars 750 forks source link

esp-at编译配置 #705

Open MrYanLK opened 1 year ago

MrYanLK commented 1 year ago

请问这是什么情况? image

ustccw commented 1 year ago

根据 https://docs.espressif.com/projects/esp-at/zh_CN/latest/esp32/Compile_and_Develop/How_to_clone_project_and_compile_it.html 文档看下呢, 似乎是第三步环境没有安装好。

MrYanLK commented 1 year ago

明明有安装pip模块,为啥还提示这个 image

MrYanLK commented 1 year ago

哦我知道了,是没有运行esp-idf下的. ./export.sh进行配置,现在可以了,但是我想编译一版8266的AT固件,我现在执行./build.py install提示如下:没有esp8266的选项? image

MrYanLK commented 1 year ago

是需要git checkout release/v2.2.0.0_esp8266 切换分支吧?但是我看乐鑫官网已经有v2.2.1版本了,是否分支也要切换到v2.2.1 image

MrYanLK commented 1 year ago

请帮忙看一下这是什么问题,编译失败了

root@DESKTOP-6TBOMGV:/home/ylk/esp/esp-at# root@DESKTOP-6TBOMGV:/home/ylk/esp/esp-at# git checkout release/v2.2.0.0_esp8266 Already on 'release/v2.2.0.0_esp8266' Your branch is up to date with 'origin/release/v2.2.0.0_esp8266'. root@DESKTOP-6TBOMGV:/home/ylk/esp/esp-at# ./build.py menuconfig Platform name:

  1. PLATFORM_ESP32
  2. PLATFORM_ESP8266
  3. PLATFORM_ESP32S2
  4. PLATFORM_ESP32C3 choose(range[1,4]):2

Module name:

  1. WROOM-02 (description: TX:15 RX:13)
  2. WROOM-5V2L (description: 5V UART level)
  3. ESP8266_1MB (description: No OTA)
  4. WROOM-02-N (description: TX:1 RX:3)
  5. WROOM-S2
  6. ESP8266_QCLOUD (description: QCLOUD TX:15 RX:13) choose(range[1,6]):1

Enable silence mode to remove some logs and reduce the firmware size?

  1. No
  2. Yes choose(range[0,1]):0 platform_name=ESP8266,module_name=WROOM-02 Redirect IDF url to https://gitee.com/EspressifSystems Please wait for the SDK download to finish... Cloning into 'esp-idf'... remote: Enumerating objects: 29431, done. remote: Counting objects: 100% (199/199), done. remote: Compressing objects: 100% (196/196), done. remote: Total 29431 (delta 99), reused 0 (delta 0), pack-reused 29232 Receiving objects: 100% (29431/29431), 63.48 MiB | 1.65 MiB/s, done. Resolving deltas: 100% (17155/17155), done. Updating files: 100% (2882/2882), done. IDF is Cloned from https://gitee.com/EspressifSystems Submodule 'components/coap/libcoap' (https://gitee.com/obgm/libcoap.git) registered for path 'components/coap/libcoap' Submodule 'components/json/cJSON' (https://gitee.com/DaveGamble/cJSON.git) registered for path 'components/json/cJSON' Submodule 'components/lwip/lwip' (https://gitee.com/espressif/esp-lwip.git) registered for path 'components/lwip/lwip' Submodule 'components/mbedtls/mbedtls' (https://gitee.com/espressif/mbedtls.git) registered for path 'components/mbedtls/mbedtls' Submodule 'components/mqtt/esp-mqtt' (https://gitee.com/espressif/esp-mqtt.git) registered for path 'components/mqtt/esp-mqtt' Redirect submodule.components/json/cJSON.url to https://gitee.com/esp-submodules/cJSON.git Redirect submodule.components/mbedtls/mbedtls.url to https://gitee.com/esp-submodules/mbedtls.git Redirect submodule.components/lwip/lwip.url to https://gitee.com/esp-submodules/esp-lwip.git Redirect submodule.components/mqtt/esp-mqtt.url to https://gitee.com/esp-submodules/esp-mqtt.git Redirect submodule.components/coap/libcoap.url to https://gitee.com/esp-submodules/libcoap.git Update submodule... Cloning into '/home/ylk/esp/esp-at/esp-idf/components/coap/libcoap'... Cloning into '/home/ylk/esp/esp-at/esp-idf/components/json/cJSON'... Cloning into '/home/ylk/esp/esp-at/esp-idf/components/lwip/lwip'... Cloning into '/home/ylk/esp/esp-at/esp-idf/components/mbedtls/mbedtls'... Cloning into '/home/ylk/esp/esp-at/esp-idf/components/mqtt/esp-mqtt'... Submodule path 'components/coap/libcoap': checked out 'cfec0d072c5b99ed3e54828ca50ea2f6b91e1f50' Submodule path 'components/json/cJSON': checked out '3c8935676a97c7c97bf006db8312875b4f292f6c' Submodule path 'components/lwip/lwip': checked out '4fd84abace0cd8a5a709c194fa54afb3cd39b3f7' Submodule path 'components/mbedtls/mbedtls': checked out '9ef92c551eb8d92677034c3ec8078a8076febf41' Submodule path 'components/mqtt/esp-mqtt': checked out '01594bf118ae502b5a0ead040446f2be75d26223' old commit:bac80c938c109561ae408245073fb6d7694fb5a3 checkout commit:e3348ac7eaf1d91d73a9de1eda2c430ef1afe4bc Please wait for the update to complete, which will take some time Already up to date. Note: switching to 'e3348ac7eaf1d91d73a9de1eda2c430ef1afe4bc'.

You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at e3348ac7 Merge branch 'bugfix/fix_scan_state_err_v3.4' into 'release/v3.4' Submodule 'ext/tinydtls' (https://git.eclipse.org/r/tinydtls/org.eclipse.tinydtls) registered for path 'components/coap/libcoap/ext/tinydtls' Cloning into '/home/ylk/esp/esp-at/esp-idf/components/coap/libcoap/ext/tinydtls'... Submodule path 'components/coap/libcoap/ext/tinydtls': checked out '3b24a701ed5b0785306aa732e739ecb1eb3d03f8' Update completed patches check completed for updates. WARNING: IDF_PATH environment variable is set to /home/ylk/esp-idf but esp-idf/tools/idf.py path indicates IDF directory /home/ylk/esp/esp-at/esp-idf. Using the environment variable directory, but results may be unexpected... Checking Python dependencies... Python requirements from /home/ylk/esp-idf/requirements.txt are satisfied. Executing action: menuconfig Running cmake in directory /home/ylk/esp/esp-at/build Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DIDF_TARGET=esp8266 -DCCACHE_ENABLE=0 /home/ylk/esp/esp-at"... silence:0 sdkconfig:/home/ylk/esp/esp-at/module_config/module_esp8266_default/sdkconfig.defaults CMake Warning at esp-idf/tools/cmake/idf.cmake:14 (message): IDF_PATH environment variable is different from inferred IDF_PATH.

                          Check if your project's top-level CMakeLists.txt includes the right
                          CMake files. Environment IDF_PATH will be used for the build.

Call Stack (most recent call first): esp-idf/tools/cmake/project.cmake:7 (include) CMakeLists.txt:53 (include)

-- Found Git: /usr/bin/git (found version "2.25.1") CMake Warning at /home/ylk/esp-idf/tools/cmake/git_submodules.cmake:52 (message): Git submodule components/esp_wifi/lib is out of date. Run 'git submodule update --init --recursive' to fix. Call Stack (most recent call first): /home/ylk/esp-idf/tools/cmake/build.cmake:77 (git_submodule_check) /home/ylk/esp-idf/tools/cmake/build.cmake:175 (build_get_idf_git_revision) esp-idf/tools/cmake/idf.cmake:43 (build_init) esp-idf/tools/cmake/project.cmake:7 (include) CMakeLists.txt:53 (include)

CMake Warning at /home/ylk/esp-idf/tools/cmake/git_submodules.cmake:52 (message): Git submodule components/esptool_py/esptool is out of date. Run 'git submodule update --init --recursive' to fix. Call Stack (most recent call first): /home/ylk/esp-idf/tools/cmake/build.cmake:77 (git_submodule_check) /home/ylk/esp-idf/tools/cmake/build.cmake:175 (build_get_idf_git_revision) esp-idf/tools/cmake/idf.cmake:43 (build_init) esp-idf/tools/cmake/project.cmake:7 (include) CMakeLists.txt:53 (include)

CMake Warning at /home/ylk/esp-idf/tools/cmake/git_submodules.cmake:52 (message): Git submodule components/expat/expat is out of date. Run 'git submodule update --init --recursive' to fix. Call Stack (most recent call first): /home/ylk/esp-idf/tools/cmake/build.cmake:77 (git_submodule_check) /home/ylk/esp-idf/tools/cmake/build.cmake:175 (build_get_idf_git_revision) esp-idf/tools/cmake/idf.cmake:43 (build_init) esp-idf/tools/cmake/project.cmake:7 (include) CMakeLists.txt:53 (include)

CMake Warning at /home/ylk/esp-idf/tools/cmake/git_submodules.cmake:52 (message): Git submodule components/ieee802154/lib is out of date. Run 'git submodule update --init --recursive' to fix. Call Stack (most recent call first): /home/ylk/esp-idf/tools/cmake/build.cmake:77 (git_submodule_check) /home/ylk/esp-idf/tools/cmake/build.cmake:175 (build_get_idf_git_revision) esp-idf/tools/cmake/idf.cmake:43 (build_init) esp-idf/tools/cmake/project.cmake:7 (include) CMakeLists.txt:53 (include)

CMake Warning at /home/ylk/esp-idf/tools/cmake/git_submodules.cmake:52 (message): Git submodule components/json/cJSON is out of date. Run 'git submodule update --init --recursive' to fix. Call Stack (most recent call first): /home/ylk/esp-idf/tools/cmake/build.cmake:77 (git_submodule_check) /home/ylk/esp-idf/tools/cmake/build.cmake:175 (build_get_idf_git_revision) esp-idf/tools/cmake/idf.cmake:43 (build_init) esp-idf/tools/cmake/project.cmake:7 (include) CMakeLists.txt:53 (include)

CMake Warning at /home/ylk/esp-idf/tools/cmake/git_submodules.cmake:52 (message): Git submodule components/libsodium/libsodium is out of date. Run 'git submodule update --init --recursive' to fix. Call Stack (most recent call first): /home/ylk/esp-idf/tools/cmake/build.cmake:77 (git_submodule_check) /home/ylk/esp-idf/tools/cmake/build.cmake:175 (build_get_idf_git_revision) esp-idf/tools/cmake/idf.cmake:43 (build_init) esp-idf/tools/cmake/project.cmake:7 (include) CMakeLists.txt:53 (include)

CMake Warning at /home/ylk/esp-idf/tools/cmake/git_submodules.cmake:52 (message): Git submodule components/lwip/lwip is out of date. Run 'git submodule update --init --recursive' to fix. Call Stack (most recent call first): /home/ylk/esp-idf/tools/cmake/build.cmake:77 (git_submodule_check) /home/ylk/esp-idf/tools/cmake/build.cmake:175 (build_get_idf_git_revision) esp-idf/tools/cmake/idf.cmake:43 (build_init) esp-idf/tools/cmake/project.cmake:7 (include) CMakeLists.txt:53 (include)

CMake Warning at /home/ylk/esp-idf/tools/cmake/git_submodules.cmake:52 (message): Git submodule components/mbedtls/mbedtls is out of date. Run 'git submodule update --init --recursive' to fix. Call Stack (most recent call first): /home/ylk/esp-idf/tools/cmake/build.cmake:77 (git_submodule_check) /home/ylk/esp-idf/tools/cmake/build.cmake:175 (build_get_idf_git_revision) esp-idf/tools/cmake/idf.cmake:43 (build_init) esp-idf/tools/cmake/project.cmake:7 (include) CMakeLists.txt:53 (include)

CMake Warning at /home/ylk/esp-idf/tools/cmake/git_submodules.cmake:52 (message): Git submodule components/mqtt/esp-mqtt is out of date. Run 'git submodule update --init --recursive' to fix. Call Stack (most recent call first): /home/ylk/esp-idf/tools/cmake/build.cmake:77 (git_submodule_check) /home/ylk/esp-idf/tools/cmake/build.cmake:175 (build_get_idf_git_revision) esp-idf/tools/cmake/idf.cmake:43 (build_init) esp-idf/tools/cmake/project.cmake:7 (include) CMakeLists.txt:53 (include)

CMake Warning at /home/ylk/esp-idf/tools/cmake/git_submodules.cmake:52 (message): Git submodule components/nghttp/nghttp2 is out of date. Run 'git submodule update --init --recursive' to fix. Call Stack (most recent call first): /home/ylk/esp-idf/tools/cmake/build.cmake:77 (git_submodule_check) /home/ylk/esp-idf/tools/cmake/build.cmake:175 (build_get_idf_git_revision) esp-idf/tools/cmake/idf.cmake:43 (build_init) esp-idf/tools/cmake/project.cmake:7 (include) CMakeLists.txt:53 (include)

CMake Warning at /home/ylk/esp-idf/tools/cmake/git_submodules.cmake:52 (message): Git submodule components/openthread/lib is out of date. Run 'git submodule update --init --recursive' to fix. Call Stack (most recent call first): /home/ylk/esp-idf/tools/cmake/build.cmake:77 (git_submodule_check) /home/ylk/esp-idf/tools/cmake/build.cmake:175 (build_get_idf_git_revision) esp-idf/tools/cmake/idf.cmake:43 (build_init) esp-idf/tools/cmake/project.cmake:7 (include) CMakeLists.txt:53 (include)

CMake Warning at /home/ylk/esp-idf/tools/cmake/git_submodules.cmake:52 (message): Git submodule components/openthread/openthread is out of date. Run 'git submodule update --init --recursive' to fix. Call Stack (most recent call first): /home/ylk/esp-idf/tools/cmake/build.cmake:77 (git_submodule_check) /home/ylk/esp-idf/tools/cmake/build.cmake:175 (build_get_idf_git_revision) esp-idf/tools/cmake/idf.cmake:43 (build_init) esp-idf/tools/cmake/project.cmake:7 (include) CMakeLists.txt:53 (include)

CMake Warning at /home/ylk/esp-idf/tools/cmake/git_submodules.cmake:52 (message): Git submodule components/protobuf-c/protobuf-c is out of date. Run 'git submodule update --init --recursive' to fix. Call Stack (most recent call first): /home/ylk/esp-idf/tools/cmake/build.cmake:77 (git_submodule_check) /home/ylk/esp-idf/tools/cmake/build.cmake:175 (build_get_idf_git_revision) esp-idf/tools/cmake/idf.cmake:43 (build_init) esp-idf/tools/cmake/project.cmake:7 (include) CMakeLists.txt:53 (include)

CMake Warning at /home/ylk/esp-idf/tools/cmake/git_submodules.cmake:52 (message): Git submodule components/spiffs/spiffs is out of date. Run 'git submodule update --init --recursive' to fix. Call Stack (most recent call first): /home/ylk/esp-idf/tools/cmake/build.cmake:77 (git_submodule_check) /home/ylk/esp-idf/tools/cmake/build.cmake:175 (build_get_idf_git_revision) esp-idf/tools/cmake/idf.cmake:43 (build_init) esp-idf/tools/cmake/project.cmake:7 (include) CMakeLists.txt:53 (include)

CMake Warning at /home/ylk/esp-idf/tools/cmake/git_submodules.cmake:52 (message): Git submodule components/tinyusb/tinyusb is out of date. Run 'git submodule update --init --recursive' to fix. Call Stack (most recent call first): /home/ylk/esp-idf/tools/cmake/build.cmake:77 (git_submodule_check) /home/ylk/esp-idf/tools/cmake/build.cmake:175 (build_get_idf_git_revision) esp-idf/tools/cmake/idf.cmake:43 (build_init) esp-idf/tools/cmake/project.cmake:7 (include) CMakeLists.txt:53 (include)

CMake Warning at /home/ylk/esp-idf/tools/cmake/git_submodules.cmake:52 (message): Git submodule components/unity/unity is out of date. Run 'git submodule update --init --recursive' to fix. Call Stack (most recent call first): /home/ylk/esp-idf/tools/cmake/build.cmake:77 (git_submodule_check) /home/ylk/esp-idf/tools/cmake/build.cmake:175 (build_get_idf_git_revision) esp-idf/tools/cmake/idf.cmake:43 (build_init) esp-idf/tools/cmake/project.cmake:7 (include) CMakeLists.txt:53 (include)

CMake Warning at /home/ylk/esp-idf/tools/cmake/git_submodules.cmake:52 (message): Git submodule examples/build_system/cmake/import_lib/main/lib/tinyxml2 is out of date. Run 'git submodule update --init --recursive' to fix. Call Stack (most recent call first): /home/ylk/esp-idf/tools/cmake/build.cmake:77 (git_submodule_check) /home/ylk/esp-idf/tools/cmake/build.cmake:175 (build_get_idf_git_revision) esp-idf/tools/cmake/idf.cmake:43 (build_init) esp-idf/tools/cmake/project.cmake:7 (include) CMakeLists.txt:53 (include)

CMake Warning at /home/ylk/esp-idf/tools/cmake/git_submodules.cmake:52 (message): Git submodule examples/peripherals/secure_element/atecc608_ecdsa/components/esp-cryptoauthlib is out of date. Run 'git submodule update --init --recursive' to fix. Call Stack (most recent call first): /home/ylk/esp-idf/tools/cmake/build.cmake:77 (git_submodule_check) /home/ylk/esp-idf/tools/cmake/build.cmake:175 (build_get_idf_git_revision) esp-idf/tools/cmake/idf.cmake:43 (build_init) esp-idf/tools/cmake/project.cmake:7 (include) CMakeLists.txt:53 (include)

CMake Error at /home/ylk/esp-idf/tools/cmake/targets.cmake:81 (message): Toolchain file /home/ylk/esp-idf/tools/cmake/toolchain-esp8266.cmake not found Call Stack (most recent call first): esp-idf/tools/cmake/project.cmake:245 (__target_set_toolchain) CMakeLists.txt:55 (project)

-- Configuring incomplete, errors occurred! cmake failed with exit code 1 idf.py build ret: 2 idf.py build failed root@DESKTOP-6TBOMGV:/home/ylk/esp/esp-at#

MrYanLK commented 1 year ago

Hi ,我这边使用esp8266-s1模块,电脑端使用tcp调试助手做TCP server,模块连接server,服务端定时下发心跳,模块端收到消息后需要做出应答。使用乐鑫官网下载的最新固件没有问题,但是使用自己编译的AT固件就会出现不稳定,模块长时间接收不到心跳或者突然接收到一大堆心跳消息等,编译的固件和官网下载的都是v2.2.1版本,只是自己编译的改了个串口而已,将烧录和发AT都设置在uart0了,其他没动过,请问下这可能是什么原因造成的不稳定呢?能否原厂帮忙编译一下,配置烧录和发AT都在同口uart0 2dfc96d2-ee34-4c08-a7ee-3fa2322f66ed 9a88d931-4037-4dd4-9255-ef518fa40d8f

MrYanLK commented 1 year ago

能否帮忙看看,此项目较为紧急

MrYanLK commented 1 year ago

我在运行esp-at目录下的esp-idf/export.sh时报如下错误 image

xcguang commented 1 year ago

You can download the firmware from https://github.com/espressif/esp-at/actions/runs/4753583231#artifacts

企业微信截图_c6cd097c-8eeb-4b41-a55e-30ada0a1c01f

These docs may be all helpful: https://docs.espressif.com/projects/esp-at/en/latest/esp32/Compile_and_Develop/How_to_download_the_latest_temporary_version_of_AT_from_github.html

https://docs.espressif.com/projects/esp-at/en/latest/esp32/Compile_and_Develop/How_to_build_project_with_web_page.html

MrYanLK commented 1 year ago

非常感谢,目前我测了一下这个固件,烧录和发AT是同口的,请问这个固件还要其他区别或者改动吗?能否给到客户作为量产固件呢?

xcguang commented 1 year ago

软件没有什么变动,如果提供给客户,请自行备份好固件,并根据产品做功能验证

MrYanLK commented 1 year ago

您好,客户反馈使用这个固件还是会出现通信不稳定,在13:11:47后又有8秒没接收到数据,请帮忙看下 4afdc8c2-2351-4a56-8254-30e4046beb53 使用下面红框中的就比较稳定,可惜这个固件烧录和发AT不是同串口,客户板子上没有预留发AT的IO13和IO15 image

MrYanLK commented 1 year ago

模块内是不是带了某个操作系统,是不是操作系统的调度问题?