Closed can-caglar closed 2 years ago
unfortunately the backtrace does not give enough information on how did it get to that abort. Did you try with other IDF versions?
@me-no-dev I was able to get this to work on a Linux machine. Still unsure why this issue occurs on Windows.
I haven't tried other IDF_Versions but I will stay with Linux for now
is here any way that you can post the elfs from both machines? as long as they are the same code, there should not be a difference, but since you find such, it could help us find what is wrong :)
Do you mean the camera_web_server.elf files?
I can post my Windows .elf file but I am unsure how I can do that with my Linux machine as I only have access to it via the terminal.
Windows (non-working): camera_web_server.zip
I guess you are using SSH (PuTTY). You can also use WinSCP to access the file system on the server through SSH :) We need both files so we can diff them against each other.
Yes I was, thanks for the tip regarding WinSCP :).
Here is the .elf file from the Linux machine:
Thanks @jhancharler :)
@jhancharler could you please confirm that both computers have the exact same IDF and toolchain version? Have you done any modification to the example itself? The error hints at trying to print from within ISR.
Hey @me-no-dev sorry for delayed response. What's the best way to do this?
when you idf.py build
the project, one of the first lines will show IDF version (also while booting) and the toolchain version used.
@me-no-dev When I type idf.py build
I don't see the IDF version. This is what I see instead (Same for both Windows and my Linux machine):
Anyway, I found this command idf.py --version
and that yields the following (on the non-working Windows machine):
ESP VERSION: ESP-IDF v4.3-dev-1901-g178b122c1-dirty
With regards to the toolchain, this is the information I think might be helpful:
`Adding ESP-IDF tools to PATH... C:\DEV.espressif1\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\bin
C:\DEV\.espressif1\tools\xtensa-esp32s2-elf\esp-2020r3-8.4.0\xtensa-esp32s2-elf\bin
C:\DEV\.espressif1\tools\xtensa-esp32s3-elf\esp-2020r3-8.4.0\xtensa-esp32s3-elf\bin
C:\DEV\.espressif1\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin
C:\DEV\.espressif1\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin
C:\DEV\.espressif1\tools\cmake\3.16.4\bin
C:\DEV\.espressif1\tools\openocd-esp32\v0.10.0-esp32-20200709\openocd-esp32\bin
C:\DEV\.espressif1\tools\ninja\1.10.0\
C:\DEV\.espressif1\tools\idf-exe\1.0.1\
C:\DEV\.espressif1\tools\ccache\3.7\
C:\DEV\.espressif1\tools\dfu-util\0.9\dfu-util-0.9-win64
C:\DEV\.espressif1\python_env\idf4.3_py3.9_env\Scripts
C:\DEV\git-sdk\git-sdk-64\esp\esp-idf\tools`
Ok, now on the working machine it's this: ESP-IDF version: ESP-IDF v4.3-dev-1901-g178b122c1-dirty
Toolchain version:
I don't have much time left with this Windows machine and will be moving to another machine soon so I hope this information is enough for you guys to debug the issue.
Thanks for all of your work, really enjoying the esp32 :).
I received an ESP_EYE and was trying to run face_detection_with_command_line application. I am seeing the below back trace which looks pretty identical to this issue.
The issue seems to be coming from esp_camera_init()
ELF file SHA256: 557bbb76f7c17546
Rebooting...
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (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:0x3fff0030,len:4
load:0x3fff0034,len:7388
load:0x40078000,len:15504
load:0x40080400,len:4436
0x40080400: _init at ??:?
entry 0x40080694
I (29) boot: ESP-IDF v4.3-dev-1901-g178b122c1-dirty 2nd stage bootloader
I (29) boot: compile time 18:18:43
I (30) boot: chip revision: 1
I (34) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (41) qio_mode: Enabling default flash chip QIO
I (46) boot.esp32: SPI Speed : 80MHz
I (51) boot.esp32: SPI Mode : QIO
I (55) boot.esp32: SPI Flash Size : 4MB
I (60) boot: Enabling RNG early entropy source...
I (65) boot: Partition Table:
I (69) boot: ## Label Usage Type ST Offset Length
I (76) boot: 0 factory factory app 00 00 00010000 00200000
I (84) boot: 1 nvs WiFi data 01 02 00310000 00004000
I (91) boot: End of partition table
I (95) boot_comm: chip revision: 1, min. application chip revision: 0
I (103) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x2dd4c (187724) map
I (174) esp_image: segment 1: paddr=0x0003dd74 vaddr=0x3ffb0000 size=0x022a4 ( 8868) load
I (177) esp_image: segment 2: paddr=0x00040020 vaddr=0x400d0020 size=0x246c0 (149184) map
0x400d0020: _stext at ??:?
I (230) esp_image: segment 3: paddr=0x000646e8 vaddr=0x3ffb22a4 size=0x015e8 ( 5608) load
I (232) esp_image: segment 4: paddr=0x00065cd8 vaddr=0x40080000 size=0x00404 ( 1028) load
0x40080000: _WindowOverflow4 at /Users/praveenkjain/code/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1730
I (237) esp_image: segment 5: paddr=0x000660e4 vaddr=0x40080404 size=0x0e634 ( 58932) load
I (277) boot: Loaded app from partition at offset 0x10000
I (277) boot: Disabling RNG early entropy source...
I (289) psram: This chip is ESP32-D0WD
I (289) spiram: Found 64MBit SPI RAM device
I (289) spiram: SPI RAM mode: flash 80m sram 80m
I (292) spiram: PSRAM initialized, cache is in low/high (2-core) mode.
I (299) cpu_start: Pro cpu up.
I (303) cpu_start: Starting app cpu, entry point is 0x40081268
0x40081268: call_start_cpu1 at /Users/praveenkjain/code/esp/esp-idf/components/esp_system/port/cpu_start.c:126
I (295) cpu_start: App cpu up.
I (806) spiram: SPI SRAM memory test OK
I (814) cpu_start: Pro cpu start user code
I (814) cpu_start: cpu freq: 240000000
I (814) cpu_start: Application information:
I (817) cpu_start: Project name: face_detection_with_command_lin
I (824) cpu_start: App version: v0.9.3-60-g73d4e2d
I (829) cpu_start: Compile time: Dec 14 2020 18:18:38
I (836) cpu_start: ELF file SHA256: 557bbb76f7c17546...
I (842) cpu_start: ESP-IDF: v4.3-dev-1901-g178b122c1-dirty
I (849) heap_init: Initializing. RAM available for dynamic allocation:
I (856) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (862) heap_init: At 3FFB4EA8 len 0002B158 (172 KiB): DRAM
I (868) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (874) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (881) heap_init: At 4008EA38 len 000115C8 (69 KiB): IRAM
I (887) spiram: Adding pool of 4096K of external SPI memory to heap allocator
I (895) spi_flash: detected chip: generic
I (900) spi_flash: flash io: qio
I (904) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (914) gpio: GPIO[13]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (924) gpio: GPIO[14]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (934) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (944) gpio: GPIO[13]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (954) gpio: GPIO[14]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (964) gpio: GPIO[25]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (974) gpio: GPIO[27]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (984) gpio: GPIO[34]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (984) gpio: GPIO[35]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (994) gpio: GPIO[36]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1004) gpio: GPIO[37]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1014) gpio: GPIO[38]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1024) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1034) sccb: pin_sda 18 pin_scl 23
abort() was called at PC 0x40083b54 on core 0
0x40083b54: lock_acquire_generic at /Users/praveenkjain/code/esp/esp-idf/components/newlib/locks.c:140
Backtrace:0x40088db5:0x3ffb6d70 0x400894c9:0x3ffb6d90 0x4008dc09:0x3ffb6db0 0x40083b54:0x3ffb6e20 0x40083c9d:0x3ffb6e50 0x400ea4a5:0x3ffb6e70 0x400ed87b:0x3ffb7180 0x400f467b:0x3ffb71b0 0x4008dad3:0x3ffb71e0 0x400de979:0x3ffb7230 0x400d7220:0x3ffb7260 0x400d6163:0x3ffb72b0 0x400d6f49:0x3ffb72f0 0x400d60a5:0x3ffb7360 0x400d5d9f:0x3ffb7400 0x400f443e:0x3ffb7420
0x40088db5: panic_abort at /Users/praveenkjain/code/esp/esp-idf/components/esp_system/panic.c:378
0x400894c9: esp_system_abort at /Users/praveenkjain/code/esp/esp-idf/components/esp_system/system_api.c:106
0x4008dc09: abort at /Users/praveenkjain/code/esp/esp-idf/components/newlib/abort.c:46
0x40083b54: lock_acquire_generic at /Users/praveenkjain/code/esp/esp-idf/components/newlib/locks.c:140
0x40083c9d: _lock_acquire_recursive at /Users/praveenkjain/code/esp/esp-idf/components/newlib/locks.c:168
0x400ea4a5: _vfprintf_r at /builds/idf/crosstool-NG/.build/HOST-x86_64-apple-darwin12/xtensa-esp32-elf/src/newlib/newlib/libc/stdio/vfprintf.c:853 (discriminator 2)
0x400ed87b: vprintf at /builds/idf/crosstool-NG/.build/HOST-x86_64-apple-darwin12/xtensa-esp32-elf/src/newlib/newlib/libc/stdio/vprintf.c:34 (discriminator 5)
0x400f467b: esp_log_writev at /Users/praveenkjain/code/esp/esp-idf/components/log/log.c:189
0x4008dad3: esp_log_write at /Users/praveenkjain/code/esp/esp-idf/components/log/log.c:199
0x400de979: i2c_param_config at /Users/praveenkjain/code/esp/esp-idf/components/driver/i2c.c:667
0x400d7220: SCCB_Init at /Users/praveenkjain/code/esp/esp-who/components/esp32-camera/driver/sccb.c:52
0x400d6163: camera_probe at /Users/praveenkjain/code/esp/esp-who/components/esp32-camera/driver/camera.c:977
(inlined by) camera_probe at /Users/praveenkjain/code/esp/esp-who/components/esp32-camera/driver/camera.c:959
0x400d6f49: esp_camera_init at /Users/praveenkjain/code/esp/esp-who/components/esp32-camera/driver/camera.c:1377
0x400d60a5: app_camera_init() at /Users/praveenkjain/code/esp/esp-who/examples/single_chip/face_detection_with_command_line/build/../main/app_camera.cpp:69
0x400d5d9f: app_main at /Users/praveenkjain/code/esp/esp-who/examples/single_chip/face_detection_with_command_line/build/../main/app_main.cpp:38
0x400f443e: main_task at /Users/praveenkjain/code/esp/esp-idf/components/freertos/port/port_common.c:133
can you please pull the latest esp32-camera driver and give it another shot? I just merged a possible fix for this :)
I just tested the face_detection_with_command_line with latest code base from just now. It seems to work just fine now.
can you please pull the latest esp32-camera driver and give it another shot? I just merged a possible fix for this :)
I've tried flashing the camera_web_server example to my ESP32-CAM.
It seems to flash OK but the monitor output is very strange and I don't think it's working correctly.
I'm using the latest ESP-IDF. I connect GPIO0 to GND when flashing, and take it off for when running the application. I selected ESP32 AI-THINKER board on menuconfig.
I seem to be seeing this issue with other source codes too so there must be something I'm missing.
Hope someone can help!
Here's my monitor output: