各位大侠,请教一下如何基于eclipse搭建ADF下的DuerOS这个例程的开发环境?麻烦附上详细配置过程步骤,谢谢了。
备注:基于eclipse环境搭建IDF的hello_world的例程我按照这个网页的内容操作https://blog.csdn.net/jdsnpgxj/article/details/80130138,是可以搭建好开发环境,但是ADF下的DuerOS搭建环境出现了很多编译问题,同时make menuconfig执行失败。
离线
谢谢,我重新搭建一下,看是否成功,谢谢@晕哥
离线
把你的错误贴上来看下?
按照的提供的步骤设置了eclipse,编译esp-adf下的dueros例程,报很多宏未定义错误,其中比较奇怪的是:提示CONFIG_BOOTLOADER_LOG_LEVEL未定义,这个宏已经在sdkconfig.h头文件中有定义且已经include了这个头文件。
报很多宏未定义错误,例如:
D:/ESP32/esp/esp-idf/components/log/include/esp_log.h:120:26: error: 'CONFIG_BOOTLOADER_LOG_LEVEL' undeclared (first use in this function) #define LOG_LOCAL_LEVEL CONFIG_BOOTLOADER_LOG_LEVEL
但是这个CONFIG_BOOTLOADER_LOG_LEVEL已经在sdkconfig.h头文件中有定义,且已经include进来了。
离线
我直接编译官方github上的ADF中的examples例程中的Dueros代码编译不通过,用make命令和用eclipse环境都一样。
要如何设置环境,另外需要使用哪个build脚本进行编译? 我尝试过使用“esp-adf\tools\ci下的build_examples.sh”和“esp-idf\tools\windows下的eclipse_make.sh”脚本进行编译都出现问题。
问题和错误主要有:
(1)部分宏变量CONFIG_BOOTLOADER_LOG_LEVEL未找到错误
(2)错误:“Location Type Program "g++" not found in PATH。”
已经编译通过了DuerOS这个例程的各位大侠们帮忙指点一下?甚是感谢。
离线
参考这个:
Linux版本入坑步奏: https://whycan.cn/t_1098.html#p4878
Windows编译步奏: https://whycan.cn/t_1098.html#p4879
感谢@晕哥,我马上根据这个参考重新搭建一下测试环境,看能否把ADF搞定,再次感谢!
离线
参考这个:
Linux版本入坑步奏: https://whycan.cn/t_1098.html#p4878
Windows编译步奏: https://whycan.cn/t_1098.html#p4879
晕哥,一样的,报找不到宏的错误,我已经用上面的指导过程中的git重新下clone了下面下来,还是宏未定义,抽空帮忙再看看?先谢谢了。
日志如下:
Macbook Pro@DESKTOP-N6CTQAJ MSYS /d/ESP32/esp/esp-adf/examples/dueros
$ make
D:/ESP32/esp/esp-idf/make/project.mk:63: esp-idf build system only supports MSYS2 in "MINGW32" mode. Consult the ESP-IDF documentation for details.
Toolchain path: /opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: esp32-2019r1
Compiler version: 8.2.0
Python requirements from D:/ESP32/esp/esp-idf/requirements.txt are satisfied.
/d/ESP32/esp/esp-idf/make/project.mk:63: esp-idf build system only supports MSYS2 in "MINGW32" mode. Consult the ESP-IDF documentation for details.
CC build/bootloader/bootloader_support/src/bootloader_random.o
CC build/bootloader/bootloader_support/src/flash_encrypt.o
CC build/bootloader/bootloader_support/src/esp_image_format.o
In file included from D:/ESP32/esp/esp-idf/components/bootloader_support/src/esp_image_format.c:21:
D:/ESP32/esp/esp-idf/components/bootloader_support/src/esp_image_format.c: In function 'image_load':
D:/ESP32/esp/esp-idf/components/log/include/esp_log.h:119:26: error: 'CONFIG_BOOTLOADER_LOG_LEVEL' undeclared (first use in this function); did you mean 'ESP_BOOTLOADER_OFFSET'?
#define LOG_LOCAL_LEVEL CONFIG_BOOTLOADER_LOG_LEVEL
。。。。。。(省略了其它错误的内容,都是宏未定义)
D:/ESP32/esp/esp-idf/components/log/include/esp_log.h:264:13: note: in expansion of macro 'LOG_LOCAL_LEVEL'
if (LOG_LOCAL_LEVEL >= log_level) { \
^~~~~~~~~~~~~~~
D:/ESP32/esp/esp-idf/components/log/include/esp_log.h:259:44: note: in expansion of macro 'ESP_LOG_EARLY_IMPL'
#define ESP_EARLY_LOGD( tag, format, ... ) ESP_LOG_EARLY_IMPL(tag, format, ESP_LOG_DEBUG, D, ##__VA_ARGS__)
^~~~~~~~~~~~~~~~~~
D:/ESP32/esp/esp-idf/components/log/include/esp_log.h:288:39: note: in expansion of macro 'ESP_EARLY_LOGD'
#define ESP_LOGD( tag, format, ... ) ESP_EARLY_LOGD(tag, format, ##__VA_ARGS__)
^~~~~~~~~~~~~~
D:/ESP32/esp/esp-idf/components/bootloader_support/src/esp_image_format.c:678:5: note: in expansion of macro 'ESP_LOGD'
ESP_LOGD(TAG, "%s: %s", label, hash_print);
^~~~~~~~
make[2]: *** [/d/ESP32/esp/esp-idf/make/component_wrapper.mk:292:src/esp_image_format.o] 错误 1
make[1]: *** [/d/ESP32/esp/esp-idf/make/project.mk:584:component-bootloader_support-build] 错误 2
make: *** [/d/ESP32/esp/esp-idf/components/bootloader/Makefile.projbuild:41:/d/ESP32/esp/esp-adf/examples/dueros/build/bootloader/bootloader.bin] 错误 2
离线
环境变量设置了吗?
PATH,IDF_PATH,ADF_PATH都设置了:
1、已经在.bashrc文件里边添加:
export ADF_PATH=/d/ESP32/esp/esp-adf
export PATH=/d/ESP32/msys32/mingw32/bin:$PATH/
2、在windows系统(我用的是windows系统)也添加了IDF_PATH及其目录值D:\ESP32\esp\esp-idf
3、也已经用git submodule update --init都更新了ADF和IDF了,但是IDF下面的这些宏变量还是提示未定义错误。ADF依赖IDF的是吗?环境变量等需要做什么特别的设置吗?
离线
@晕哥,我将IDF_PATH设置为adf目录下带的idf目录(而不是直接idf目录)后,编译已经不再提示这些宏未定义了,但是出现了新的编译错误,我在百度上查了一下其他人也碰到这种错误,说原因是我用MINGW32版本太高导致(我用的是最新版本),于是我又换成老一点版本的MINGW32(编译器版本5.2.0),但是出现如下新的错误:说Python不满足要求Python requirements are not satisfied
我也尝试按照下面的提示进行操作,比如执行pacman -Syu和D:/ESP32/msys32/mingw32/bin/python.exe -m pip install --user -r D:/ESP32/esp/esp-adf/esp-idf/requirements.txt等操作,但又出现新的问题,还是没有搞定。
大侠们有谁也碰到这个问题吗,你们是如何解决的?感谢!
换成老版本MINGW32后,新的错误日志如下:
Macbook Pro@DESKTOP-N6CTQAJ MINGW32 /d/ESP32/esp/esp-adf/examples/dueros
$ make
Toolchain path: /opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a5
Compiler version: 5.2.0
The following Python requirements are not satisfied:
cryptography>=2.1.4
The recommended way to install a packages is via "pacman". Please run "pacman -Ss <package_name>" for searching the package database and if found then "pacman -S mingw-w64-i686-python2-<package_name>" for installing it.
NOTE: You may need to run "pacman -Syu" if your package database is older and run twice if the previous run updated "pacman" itself.
Please read https://github.com/msys2/msys2/wiki/Using-packages for further information about using "pacman"
WARNING: The cryptography package have dependencies on system packages so please make sure you run "pacman -Syu" followed by "pacman -S mingw-w64-i686-python2-cryptography".
Alternatively, you can run "D:/ESP32/msys32/mingw32/bin/python.exe -m pip install --user -r D:/ESP32/esp/esp-adf/esp-idf/requirements.txt" for resolving the issue.
make: *** [D:\ESP32\esp\esp-adf\esp-idf/make/project.mk:479:check_python_dependencies] 错误 1
离线
@晕哥,我已经用上面的那条pacman命令执行了,还是提示python未满足要求。
若用高版本编译器来编译最新从乐鑫的github拉下来的adf下的Dueros代码,则会提示如下编译器版本错误,但是用回老版本编译器后又出现上面python不满足要求的错误,晕倒!
用最新版本编译器后,错误日志如下:
/usr/bin/gcc -o conf-idf conf.o zconf.tab.o -lncursesw -lintl
make[1]: 离开目录“/d/ESP32/esp/esp-adf/esp-idf/tools/kconfig”
GENCONFIG
WARNING: Toolchain version is not supported: esp32-2019r1
Expected to see version: crosstool-ng-1.22.0-80-g6c4433a
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
WARNING: Compiler version is not supported: 8.2.0
Expected to see version(s): 5.2.0
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
CC build/bootloader/bootloader_support/src/bootloader_random.o
CC build/bootloader/bootloader_support/src/flash_encrypt.o
CC build/bootloader/bootloader_support/src/bootloader_sha.o
完整日志如下:
Macbook Pro@DESKTOP-N6CTQAJ MINGW32 /d/ESP32/esp/esp-adf/examples/dueros
$ make
make[1]: 进入目录“/d/ESP32/esp/esp-adf/esp-idf/tools/kconfig”
/usr/bin/gcc -c -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MMD /d/ESP32/esp/esp-adf/esp-idf/tools/kconfig/mconf.c -o mconf.o
flex -L -Pzconf -ozconf.lex.c /d/ESP32/esp/esp-adf/esp-idf/tools/kconfig/zconf.l
bison -t -l -p zconf -o zconf.tab.c /d/ESP32/esp/esp-adf/esp-idf/tools/kconfig/zconf.y
sed -E "s/\\x0D$//" /d/ESP32/esp/esp-adf/esp-idf/tools/kconfig/zconf.gperf | gperf -t --output-file zconf.hash.c -a -C -E -g -k '1,3,$' -p -t
/usr/bin/gcc -I /d/ESP32/esp/esp-adf/esp-idf/tools/kconfig -c -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MMD zconf.tab.c -o zconf.tab.o
/d/ESP32/esp/esp-adf/esp-idf/tools/kconfig/lxdialog/check-lxdialog.sh -check /usr/bin/gcc -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MMD -lncursesw -lintl
/usr/bin/gcc -c -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MMD /d/ESP32/esp/esp-adf/esp-idf/tools/kconfig/lxdialog/checklist.c -o lxdialog/checklist.o
/usr/bin/gcc -c -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MMD /d/ESP32/esp/esp-adf/esp-idf/tools/kconfig/lxdialog/util.c -o lxdialog/util.o
/usr/bin/gcc -c -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MMD /d/ESP32/esp/esp-adf/esp-idf/tools/kconfig/lxdialog/inputbox.c -o lxdialog/inputbox.o
/usr/bin/gcc -c -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MMD /d/ESP32/esp/esp-adf/esp-idf/tools/kconfig/lxdialog/textbox.c -o lxdialog/textbox.o
/usr/bin/gcc -c -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MMD /d/ESP32/esp/esp-adf/esp-idf/tools/kconfig/lxdialog/yesno.c -o lxdialog/yesno.o
/usr/bin/gcc -c -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MMD /d/ESP32/esp/esp-adf/esp-idf/tools/kconfig/lxdialog/menubox.c -o lxdialog/menubox.o
/usr/bin/gcc -o mconf-idf mconf.o zconf.tab.o lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o -lncursesw -lintl
/usr/bin/gcc -c -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MMD /d/ESP32/esp/esp-adf/esp-idf/tools/kconfig/conf.c -o conf.o
/usr/bin/gcc -o conf-idf conf.o zconf.tab.o -lncursesw -lintl
make[1]: 离开目录“/d/ESP32/esp/esp-adf/esp-idf/tools/kconfig”
GENCONFIG
WARNING: Toolchain version is not supported: esp32-2019r1
Expected to see version: crosstool-ng-1.22.0-80-g6c4433a
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
WARNING: Compiler version is not supported: 8.2.0
Expected to see version(s): 5.2.0
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
CC build/bootloader/bootloader_support/src/bootloader_random.o
CC build/bootloader/bootloader_support/src/flash_encrypt.o
CC build/bootloader/bootloader_support/src/bootloader_sha.o
CC build/bootloader/bootloader_support/src/esp_image_format.o
CC build/bootloader/bootloader_support/src/flash_partitions.o
CC build/bootloader/bootloader_support/src/secure_boot_signatures.o
CC build/bootloader/bootloader_support/src/bootloader_clock.o
CC build/bootloader/bootloader_support/src/secure_boot.o
CC build/bootloader/bootloader_support/src/bootloader_common.o
CC build/bootloader/bootloader_support/src/bootloader_utility.o
CC build/bootloader/bootloader_support/src/bootloader_init.o
CC build/bootloader/bootloader_support/src/efuse.o
CC build/bootloader/bootloader_support/src/flash_qio_mode.o
CC build/bootloader/bootloader_support/src/bootloader_flash.o
AR build/bootloader/bootloader_support/libbootloader_support.a
CC build/bootloader/log/log.o
AR build/bootloader/log/liblog.a
CC build/bootloader/spi_flash/spi_flash_rom_patch.o
AR build/bootloader/spi_flash/libspi_flash.a
CC build/bootloader/micro-ecc/micro-ecc/uECC.o
AR build/bootloader/micro-ecc/libmicro-ecc.a
CC build/bootloader/soc/esp32/rtc_clk.o
CC build/bootloader/soc/esp32/rtc_time.o
CC build/bootloader/soc/esp32/rtc_sleep.o
CC build/bootloader/soc/esp32/gpio_periph.o
CC build/bootloader/soc/esp32/rtc_clk_init.o
CC build/bootloader/soc/esp32/spi_periph.o
CC build/bootloader/soc/esp32/rtc_init.o
CC build/bootloader/soc/esp32/sdio_slave_periph.o
CC build/bootloader/soc/esp32/rtc_wdt.o
CC build/bootloader/soc/esp32/sdmmc_periph.o
CC build/bootloader/soc/esp32/cpu_util.o
CC build/bootloader/soc/esp32/rtc_periph.o
CC build/bootloader/soc/esp32/rtc_pm.o
CC build/bootloader/soc/esp32/soc_memory_layout.o
CC build/bootloader/soc/src//memory_layout_utils.o
AR build/bootloader/soc/libsoc.a
CC build/bootloader/main/bootloader_start.o
AR build/bootloader/main/libmain.a
LD build/bootloader/bootloader.elf
esptool.py v2.6
Python requirements from D:/ESP32/esp/esp-adf/esp-idf/requirements.txt are satisfied.
Building partitions from /d/ESP32/esp/esp-adf/examples/dueros/partitions_dueros_example.csv...
CC build/adf_utils/json_utils.o
CC build/adf_utils/cloud_services/aws_sig_v4_signing.o
CC build/adf_utils/cloud_services/baidu_access_token.o
AR build/adf_utils/libadf_utils.a
CC build/app_trace/app_trace.o
CC build/app_trace/host_file_io.o
CC build/app_trace/app_trace_util.o
CC build/app_trace/gcov/gcov_rtio.o
AR build/app_trace/libapp_trace.a
CC build/app_update/esp_ota_ops.o
AR build/app_update/libapp_update.a
CXX build/asio/asio/asio/src/asio.o
In file included from d:\esp32\msys32-2019\opt\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\8.2.0\cstdlib:75,
from d:\esp32\msys32-2019\opt\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\8.2.0\ext\string_conversions.h:41,
from d:\esp32\msys32-2019\opt\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\8.2.0\bits\basic_string.h:6391,
from d:\esp32\msys32-2019\opt\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\8.2.0\string:52,
from D:/ESP32/esp/esp-adf/esp-idf/components/asio/asio/asio/include/asio/impl/error.ipp:19,
from D:/ESP32/esp/esp-adf/esp-idf/components/asio/asio/asio/include/asio/impl/src.hpp:22,
from D:/ESP32/esp/esp-adf/esp-idf/components/asio/asio/asio/src/asio.cpp:11:
d:\esp32\msys32-2019\opt\xtensa-esp32-elf\xtensa-esp32-elf\sys-include\stdlib.h:155:44: error: expected initializer before '__result_use_check'
void *reallocarray(void *, size_t, size_t) __result_use_check __alloc_size(2)
^~~~~~~~~~~~~~~~~~
d:\esp32\msys32-2019\opt\xtensa-esp32-elf\xtensa-esp32-elf\sys-include\stdlib.h:340:52: error: expected initializer before '__alloc_align'
void * aligned_alloc(size_t, size_t) __malloc_like __alloc_align(1)
^~~~~~~~~~~~~
make[1]: *** [/d/ESP32/esp/esp-adf/esp-idf/make/component_wrapper.mk:286:asio/asio/src/asio.o] 错误 1
make: *** [D:\ESP32\esp\esp-adf\esp-idf/make/project.mk:530:component-asio-build] 错误 2
离线
我已经用上面的那条pacman命令执行了,还是提示python未满足要求
这个提示什么错误?
执行pacman那句后,会做几个文件的更新,更新OK后,我再次make,还是出现python未满足要求:
$ make
Toolchain path: /opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a5
Compiler version: 5.2.0
The following Python requirements are not satisfied:
cryptography>=2.1.4
The recommended way to install a packages is via "pacman". Please run "pacman -Ss <package_name>" for searching the package database and if found then "pacman -S mingw-w64-i686-python2-<package_name>" for installing it.
NOTE: You may need to run "pacman -Syu" if your package database is older and run twice if the previous run updated "pacman" itself.
Please read https://github.com/msys2/msys2/wiki/Using-packages for further information about using "pacman"
WARNING: The cryptography package have dependencies on system packages so please make sure you run "pacman -Syu" followed by "pacman -S mingw-w64-i686-python2-cryptography".
Alternatively, you can run "D:/ESP32/msys32/mingw32/bin/python.exe -m pip install --user -r D:/ESP32/esp/esp-adf/esp-idf/requirements.txt" for resolving the issue.
make: *** [D:\ESP32\esp\esp-adf\esp-idf/make/project.mk:479:check_python_dependencies] 错误 1
离线
感谢朋友们的帮助和指导,问题已经得到解决。
解决方法:就是将编译器的版本降到5.2.0,但是要降到@晕哥提供的上面链接中提到的编译器5.2.0才行(我之前是从其他地方下载的5.2.0不行,有区别),一定要使用这个链接的5.2.0,切记!!:
I am not sure if this is the right windows version but you could try it: https://dl.espressif.com/dl/esp32_win32_msys2_environment_and_toolchain-20181001.zip
离线
@晕哥,编译是OK了,接下来我在执行make flash monitor打算烧固件进入ESP32开发板的时候失败了,一直在rebooting中,日志报如下错误,烧写失败。
貌似配置哪个地方有点问题,我不知道如何修改,帮忙指点一下?再次感谢!
报错的日志内容:
E (656) spiram: Expected 4096KiB chip but found 8192KiB chip. Bailing out..
E (663) cpu_start: Failed to init external RAM!
详细日志如下:
Rebooting...
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:5720
load:0x40078000,len:8796
load:0x40080400,len:6484
entry 0x40080740
I (29) boot: ESP-IDF v3.2-103-g4aa1058e8 2nd stage bootloader
I (29) boot: compile time 10:20:08
I (29) boot: Enabling RNG early entropy source...
I (35) boot: SPI Speed : 80MHz
I (39) boot: SPI Mode : DIO
I (43) boot: SPI Flash Size : 4MB
I (47) boot: Partition Table:
I (50) boot: ## Label Usage Type ST Offset Length
I (58) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (65) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (73) boot: 2 factory factory app 00 00 00010000 00300000
I (80) boot: End of partition table
I (84) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x6df38 (450360) map
I (227) esp_image: segment 1: paddr=0x0007df60 vaddr=0x3ffb0000 size=0x020b0 ( 8368) load
I (230) esp_image: segment 2: paddr=0x00080018 vaddr=0x400d0018 size=0x12735c (1209180) map
0x400d0018: _flash_cache_start at ??:?
I (591) esp_image: segment 3: paddr=0x001a737c vaddr=0x3ffb20b0 size=0x01acc ( 6860) load
I (594) esp_image: segment 4: paddr=0x001a8e50 vaddr=0x40080000 size=0x00400 ( 1024) load
0x40080000: _WindowOverflow4 at D:/ESP32/esp/esp-adf/esp-idf/components/freertos/xtensa_vectors.S:1779
I (598) esp_image: segment 5: paddr=0x001a9258 vaddr=0x40080400 size=0x17724 ( 96036) load
I (655) boot: Loaded app from partition at offset 0x10000
I (655) boot: Disabling RNG early entropy source...
E (656) spiram: Expected 4096KiB chip but found 8192KiB chip. Bailing out..
E (663) cpu_start: Failed to init external RAM!
abort() was called at PC 0x40081638 on core 0
0x40081638: call_start_cpu0 at D:/ESP32/esp/esp-adf/esp-idf/components/esp32/cpu_start.c:183 (discriminat
or 1)
Backtrace: 0x4008e197:0x3ffe3c20 0x4008e4c9:0x3ffe3c40 0x40081638:0x3ffe3c60 0x40078e43:0x3ffe3c80 0x4007
9219:0x3ffe3cc0 0x4008078e:0x3ffe3df0 0x40007c31:0x3ffe3eb0 0x4000073d:0x3ffe3f20
0x4008e197: invoke_abort at D:/ESP32/esp/esp-adf/esp-idf/components/esp32/panic.c:707
0x4008e4c9: abort at D:/ESP32/esp/esp-adf/esp-idf/components/esp32/panic.c:707
0x40081638: call_start_cpu0 at D:/ESP32/esp/esp-adf/esp-idf/components/esp32/cpu_start.c:183 (discriminat
or 1)
离线
E (656) spiram: Expected 4096KiB chip but found 8192KiB chip. Bailing out..
E (663) cpu_start: Failed to init external RAM!期望4M的spiram, 实际上是8M的, 是不是menuconfig 里面可以选择8M ?
的确可以在menuconfig里边修改为8M,晕哥厉害!
但修改后,重新make,居然出现新的错误了:
# make
Toolchain path: /opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a5
Compiler version: 5.2.0
GENCONFIG
make: *** 没有规则可制作目标“/d/ESP32/esp/esp-adf/examples/dueros/build/include/config/auto.conf”,由“/d/ESP32/esp/esp-adf/examples/dueros/build/bootloader/bootloader.bin” 需求。 停止。
离线
晕哥 说:E (656) spiram: Expected 4096KiB chip but found 8192KiB chip. Bailing out..
E (663) cpu_start: Failed to init external RAM!期望4M的spiram, 实际上是8M的, 是不是menuconfig 里面可以选择8M ?
的确可以在menuconfig里边修改为8M,晕哥厉害!
但修改后,重新make,居然出现新的错误了:
# make
Toolchain path: /opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a5
Compiler version: 5.2.0
GENCONFIG
make: *** 没有规则可制作目标“/d/ESP32/esp/esp-adf/examples/dueros/build/include/config/auto.conf”,由“/d/ESP32/esp/esp-adf/examples/dueros/build/bootloader/bootloader.bin” 需求。 停止。
我拷贝一个工程目录,在这个新的工程目录中我重新进行make menuconfig后再进行make不出现这个问题了,而且flash size也改成了8M,但是make flash monitor仍旧还是出现这个问题,该修改哪个地方呢:
E (656) spiram: Expected 4096KiB chip but found 8192KiB chip. Bailing out..
E (663) cpu_start: Failed to init external RAM!
离线
建议彻底clean 之后再编译, 你的 make menuconfig 或许只影响了 app 的生成, bootloader 还是原来的配置。
嗯,我已经make clean清除,然后再make和烧录操作,RST复位板子后,此问题仍旧出现,初始化外部RAM失败,郁闷了
离线
这就有点尴尬了
提示是外部RAM初始化失败,是不是和在make menuconfig中配置的flash size压根就不是一回事?flash就不是RAM?
离线
晕哥 说:这就有点尴尬了
提示是外部RAM初始化失败,是不是和在make menuconfig中配置的flash size压根就不是一回事?flash就不是RAM?
外部RAM初始化失败的问题已经解决!
解决办法:上面用make menuconfig修改flash size其实不是修改RAM,若要修改外部RAM,需要在sdkconfig文件中的“SPI RAM Config”这部分的这两个参数及其修改值设置如下才是8M:
#
# SPI RAM config
#
CONFIG_SPIRAM_TYPE_ESPPSRAM32= (修改前是默认这一项为y)
CONFIG_SPIRAM_TYPE_ESPPSRAM64=y (要修改这一项为y)
CONFIG_SPIRAM_SIZE=8388608 (值要设置为此值)
参考了这个网址进行的SPI RAM 设置:https://github.com/espressif/esp-idf/blob/master/components/esp32/Kconfig#L172-L178
config SPIRAM_SIZE
int
default -1 if SPIRAM_TYPE_AUTO
default 4194304 if SPIRAM_TYPE_ESPPSRAM32
default 8388608 if SPIRAM_TYPE_ESPPSRAM64
default 0
但是新的问题又出现了:
现在RST复位后已经没有报上面RAM初始化错误,但是提示“检测不到SDCARD卡”错误,有谁知道在Dueros代码中哪个文件可以修改为不默认检测SD卡吗?谢谢!
离线
看下是不是这个问题: https://whycan.cn/t_1098.html#p7337
我问了乐鑫的FAE,答复是可以在board.文件中将sd_init去掉即可系统启动时默认不检测SD卡了。
离线
我的dueros固件已经成功跑起来,按住ESP32-LyraT开发板上的SET键wifi灯也一直在正常闪烁,但是我尝试了多次配网且更换了两个路由器想尝试,均提示“EspTouch配网失败”(这块板子我是用ESPTOUCH配网成功过出厂时默认烧的固件),帮忙看一下是什么原因和解决办法?
初步看了是WIFI_SERV: WIFI_SERV_EVENT_SETTING_TIMEOUT超时。
我的串口打印日志如下:
I (266472) smartconfig: SC version: V2.8.0
I (270585) wifi: ic_enable_sniffer
[0;32mI (270586) SMART_CONFIG: SC_STATUS_FIND_CHANNEL[0m
I (273403) smartconfig: T|once 1 84
I (273403) smartconfig: save rssi:-58 ,bssid:b0:30:55:a9:c1:3e
I (273403) smartconfig: confirm rssi:-58, bssid:b0:30:55:a9:c1:3e
I (273407) smartconfig: TYPE: ESPTOUCH
I (273411) smartconfig: T|sniffer on ch:3,width:0
I (273414) smartconfig: T|AP MAC: b0:30:55:a9:c1:3e
I (273419) smartconfig: T|Head Len:84
[0;32mI (273422) SMART_CONFIG: SC_STATUS_GETTING_SSID_PSWD[0m
I (273428) smartconfig: T|SYNC STATUS
I (273543) smartconfig: TYPE: ESPTOUCH
I (273543) smartconfig: F|sniffer on ch:3,width:0
I (273543) smartconfig: F|rssi:-20, ch:3
F|head:82
[0;32mI (273545) SMART_CONFIG: SC_STATUS_GETTING_SSID_PSWD[0m
I (274752) smartconfig: T|26-0
I (274847) smartconfig: F|26-0
I (274887) smartconfig: T|8-1
I (274974) smartconfig: F|8-1
I (275019) smartconfig: T|175-2
I (275103) smartconfig: F|175-2
I (275152) smartconfig: T|115-3
I (275153) smartconfig: T|SCAN SSID: CMCC-9vTC
I (275153) smartconfig: T|all len:26,pass len:8
I (275153) smartconfig: T|scan ap: 1
I (275280) smartconfig: F|115-3
I (275280) smartconfig: F|XOR
I (275281) smartconfig: T|202-4
I (275562) smartconfig: T|192-5
I (275704) smartconfig: T|168-6
I (275852) smartconfig: T|1-7
I (276123) smartconfig: T|9-8
I (277419) smartconfig: T|0-26-2
I (277419) smartconfig: T|1-8-2
I (277419) smartconfig: T|2-175-2
I (277419) smartconfig: T|3-115-2
I (277422) smartconfig: T|4-202-1
I (277426) smartconfig: T|5-192-1
I (277429) smartconfig: T|6-168-1
I (277432) smartconfig: T|7-1-1
I (277434) smartconfig: T|8-9-1
。。。。
I (277461) smartconfig: T|pswd: xxxxxx(我处理了一下此密码字符)
I (277465) smartconfig: T|ssid: CMCC-9vTC
I (277468) smartconfig: T|bssid: b0:30:55:a9:c1:3e
I (277473) wifi: ic_disable_sniffer
[0;32mI (277476) SMART_CONFIG: SC_STATUS_LINK[0m
[0;32mI (277481) SMART_CONFIG: <link>ssid:CMCC-9vTC[0m
[0;32mI (277486) SMART_CONFIG: <link>pass:xxxxx[0m
[0;33mW (326475) WIFI_SERV: STATE type:4, pdata:0x0, len:0[0m
[0;32mI (326476) WIFI_SERV: WIFI_SERV_EVENT_SETTING_TIMEOUT[0m
离线
可以收到 EspTouch app发过来的 ssid 和 密码 ?
嗯,我看串口打印是可以收到从esptouch app发过来的ssid和密码,都是正确的,和路由器设置的一样。
离线
那理论上不会有问题的, 打印一下配网流程, 继续跟踪接下来的代码.
我还不知道如何打印配网流程,请教一下?
囧
离线
已经能联网并能语音唤醒和语音控制播放百度的故事等资源。
解决办法:
dueros在make menuconfig中要配置如下几个地方就可以了:
1、Audio HAL > 设置硬件开发板的型号(ESP_LyraT v4.3)
2、Example Configuration > 设置路由器的SSID和wifi密码 (貌似这个Dueros例程只能固定设置和这个路由器配网才成功,我一直没有通过smart config配成功过网络)
3、到百度开发平台上去注册用户并申请一个profile,选择申请到的profile文件中的某一个文件名改成duer_profile这个名字即可,并将此文件覆盖ADF_PATH/components/dueros_service/工程目录下的相同这个文件名duer_profile即可。
4、现在购买到的开发板外部RAM基本是8M的,注意在component config中的esp32 specify目录下设置RAM型号为8M的,否则烧录固件后RST板子会报错系统起不来!
另外切记:
1、IDF_PATH一定要设置为ADF目录下面带的IDF这个目录,而不能用直接git下来的IDF,否则会报一些乱七八糟的错误(估计是ADF需要对应匹配的IDF版本,其版本不能高也不能低)
2、编译器版本要用5.2.0的且要用晕哥提供的这个链接下的编译器下载使用才行(我前面也找到了另外一个5.2.0版本的编译器,就是build时一直出现不满足requirment.txt这个问题然后根据提示操作又产生更多的了一堆其它问题!):https://dl.espressif.com/dl/esp32_win32_msys2_environment_and_toolchain-20181001.zip
我总结上面几个方面内容即是我这几天被坑的地方,其他人看到后就不用再跳进这些坑里被郁闷了 :)
离线