Hi everyone!
I’m trying to make this project [1] work with this board [2] using PlatformIO.
My setup looks like this:
PLATFORM: Espressif 32 (4.4.0) > TTGO T-Camera
HARDWARE: ESP32 240MHz, 8MB RAM, 4MB Flash
PACKAGES:
- framework-espidf @ 3.40302.0 (4.3.2)
- tool-cmake @ 3.16.4
- tool-esptoolpy @ 1.30300.0 (3.3.0)
- tool-mkfatfs @ 2.0.1
- tool-mklittlefs @ 1.203.210628 (2.3)
- tool-mkspiffs @ 2.230.0 (2.30)
- tool-ninja @ 1.7.1
- toolchain-esp32ulp @ 1.22851.191205 (2.28.51)
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
It compiles like this:
Reading CMake configuration...
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in debug mode
Retrieving maximum program size .pio/build/ttgo_demo/firmware.elf
Checking size .pio/build/ttgo_demo/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 1.3% (used 108820 bytes from 8388608 bytes)
Flash: [===== ] 48.9% (used 1539657 bytes from 3145728 bytes)
Rebooting...
ets Jul 29 2019 12:21:46
And will reboot every 30 seconds stating this:
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:2
load:0x3fff0030,len:7916
ho 0 tail 12 room 4
load:0x40078000,len:16064
load:0x40080400,len:4452
entry 0x4008069c
I (29) boot: ESP-IDF 4.3.2 2nd stage bootloader
I (29) boot: compile time 17:30:50
I (29) boot: chip revision: 3
I (32) boot_comm: chip revision: 3, min. bootloader chip revision: 0
I (39) qio_mode: Enabling default flash chip QIO
I (44) boot.esp32: SPI Speed : 40MHz
I (49) boot.esp32: SPI Mode : QIO
I (53) boot.esp32: SPI Flash Size : 4MB
I (58) boot: Enabling RNG early entropy source...
I (63) boot: Partition Table:
I (67) boot: ## Label Usage Type ST Offset Length
I (74) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (82) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (89) boot: 2 factory factory app 00 00 00010000 00300000
I (96) boot: 3 storage Unknown data 01 82 00310000 00096000
I (104) boot: End of partition table
I (108) boot_comm: chip revision: 3, min. application chip revision: 0
I (115) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=56514h (353556) map
I (240) esp_image: segment 1: paddr=0006653c vaddr=3ffb0000 size=085f4h ( 34292) load
I (253) esp_image: segment 2: paddr=0006eb38 vaddr=40080000 size=014e0h ( 5344) load
I (255) esp_image: segment 3: paddr=00070020 vaddr=400d0020 size=10483ch (1067068) map
I (610) esp_image: segment 4: paddr=00174864 vaddr=400814e0 size=13728h ( 79656) load
I (641) esp_image: segment 5: paddr=00187f94 vaddr=50000000 size=00010h ( 16) load
I (653) boot: Loaded app from partition at offset 0x10000
I (653) boot: Disabling RNG early entropy source...
I (665) psram: This chip is ESP32-D0WD
I (665) spiram: Found 64MBit SPI RAM device
I (666) spiram: SPI RAM mode: flash 80m sram 80m
I (670) spiram: PSRAM initialized, cache is in low/high (2-core) mode.
I (677) cpu_start: Pro cpu up.
I (681) cpu_start: Starting app cpu, entry point is 0x4008330c
I (673) cpu_start: App cpu up.
I (1181) spiram: SPI SRAM memory test OK
I (1188) cpu_start: Pro cpu start user code
I (1188) cpu_start: cpu freq: 240000000
I (1189) cpu_start: Application information:
I (1192) cpu_start: Project name: ttgo_demo
I (1197) cpu_start: App version: 1
I (1201) cpu_start: Compile time: Jun 20 2022 17:19:51
I (1207) cpu_start: ELF file SHA256: 83ea3e4fbc8144e1...
I (1213) cpu_start: ESP-IDF: 4.3.2
I (1218) heap_init: Initializing. RAM available for dynamic allocation:
I (1226) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (1232) heap_init: At 3FFCA918 len 000156E8 (85 KiB): DRAM
I (1238) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (1244) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (1251) heap_init: At 40094C08 len 0000B3F8 (44 KiB): IRAM
I (1257) spiram: Adding pool of 4096K of external SPI memory to heap allocator
I (1266) spi_flash: detected chip: generic
I (1270) spi_flash: flash io: qio
I (1277) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (1290) main: Starting main
I (1293) gpio: GPIO[13]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1303) sccb: pin_sda 18 pin_scl 23
I (1425) camera: Detected OV2640 camera
I (1425) gpio: GPIO[36]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1428) gpio: GPIO[37]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1438) gpio: GPIO[38]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1447) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1456) gpio: GPIO[35]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1466) gpio: GPIO[26]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1475) gpio: GPIO[13]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1484) gpio: GPIO[34]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1494) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1503) gpio: GPIO[27]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1512) gpio: GPIO[25]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1522) camera: Allocating 1 frame buffers (150 KB total)
I (1528) camera: Allocating 150 KB frame buffer in PSRAM
I (1804) gpio: GPIO[12]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (5148) SYSTEM: task main stack high watermark: 1728 Bytes
I (5148) SYSTEM: heap left: 4212971 Bytes
I (5148) main: Display width = 240, height = 240
I (5153) main: Starting demo_task
I (5157) SYSTEM: task demo stack high watermark: 7184 Bytes
I (5163) SYSTEM: heap left: 4203411 Bytes
abort() was called at PC 0x401adc92 on core 0
Backtrace:0x400837ea:0x3ffd5c70 0x4008db11:0x3ffd5c90 0x40093952:0x3ffd5cb0 0x401adc92:0x3ffd5d20 0x401adcbf:0x3ffd5d40 0x4018f45b:0x3ffd5d60 0x40153822:0x3ffd5d80 0x4015417d:0x3ffd5dc0 0x4012c283:0x3ffd5e80 0x4012c2b1:0x3ffd5ec0 0x401425ed:0x3ffd5ee0 0x40151fed:0x3ffd5fc0 0x4013fe25:0x3ffd6010 0x400d2237:0x3ffd6180 0x400d2a47:0x3ffd61f0 0x400907f5:0x3ffd6370
#0 0x400837ea:0x3ffd5c70 in panic_abort at /home/mongoq/.platformio/packages/framework-espidf/components/esp_system/panic.c:393
#1 0x4008db11:0x3ffd5c90 in esp_system_abort at /home/mongoq/.platformio/packages/framework-espidf/components/esp_system/system_api.c:112
#2 0x40093952:0x3ffd5cb0 in abort at /home/mongoq/.platformio/packages/framework-espidf/components/newlib/abort.c:46
#3 0x401adc92:0x3ffd5d20 in int abort_return<int>() at /home/mongoq/.platformio/packages/framework-espidf/components/cxx/cxx_exception_stubs.cpp:28
#4 0x401adcbf:0x3ffd5d40 in __wrap__Unwind_RaiseException at /home/mongoq/.platformio/packages/framework-espidf/components/cxx/cxx_exception_stubs.cpp:153
#5 0x4018f45b:0x3ffd5d60 in __cxa_throw at /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc:90
#6 0x40153822:0x3ffd5d80 in cv::error(cv::Exception const&) at ??:?
#7 0x4015417d:0x3ffd5dc0 in cv::error(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, char const*, int) at ??:?
#8 0x4012c283:0x3ffd5e80 in cv::OutOfMemoryError(unsigned int) at alloc.cpp:?
#9 0x4012c2b1:0x3ffd5ec0 in cv::fastMalloc(unsigned int) at ??:?
#10 0x401425ed:0x3ffd5ee0 in cv::Mat::create(int, int const*, int) at ??:?
#11 0x40151fed:0x3ffd5fc0 in cv::_OutputArray::create(int, int, int, int, bool, cv::_OutputArray::DepthMask) const at ??:?
#12 0x4013fe25:0x3ffd6010 in cv::Mat::copyTo(cv::_OutputArray const&) const at ??:?
#13 0x400d2237:0x3ffd6180 in updateCameraImage(cv::Mat const&) at main/main.cpp:88
#14 0x400d2a47:0x3ffd61f0 in demo_task(void*) at main/main.cpp:179 (discriminator 1)
#15 0x400907f5:0x3ffd6370 in vPortTaskWrapper at /home/mongoq/.platformio/packages/framework-espidf/components/freertos/port/xtensa/port.c:168
ELF file SHA256: 83ea3e4fbc8144e1
Rebooting...
I can’t find any solution …
The sdkconfig I used is from the original project [3].
Thank you for any help and suggestions.
mongoq
[1] TTGO T-Camera Plus ESP32 Development Board - Review, Pinout, and Libraries - Maker Advisor
[2] https://github.com/joachimBurket/esp32-opencv
[3] esp32-opencv/sdkconfig at master · joachimBurket/esp32-opencv · GitHub