Comments (12)
You need module with external SPI RAM and you need to enable it in configuration: "Components -> ESP32-specific -> Support for external, SPI-connected RAM"
from esp32-homekit-camera.
Thank you.
Ok, I changed in configuration: "Component config -> ESP32-specific -> Support for external, SPI-connected RAM" to "*" and I didn't change any other configuration.
I got an error: .iram0.text will not fit in region iram0_0_seg
Generating esp32.common.ld
LD build/esp32-homekit-camera.elf
/Users/myname/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: /Users/myname/esp/esp32-homekit-camera/build/esp32-homekit-camera.elf section `.iram0.text' will not fit in region `iram0_0_seg'
/Users/myname/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: IRAM0 segment data does not fit.
/Users/myname/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: region `iram0_0_seg' overflowed by 25192 bytes
collect2: error: ld returned 1 exit status
make: *** [/Users/myname/esp/esp32-homekit-camera/build/esp32-homekit-camera.elf] Error 1
Pg1:esp32-homekit-camera myname$
I used a TTGO T-Kamera ESP32 WROVER & PSRAM Camera with PSRAM: 8MBytes.
I suspect that another parameter needs to be changed.
from esp32-homekit-camera.
You need to update eps-idf SDK to a more recent version
from esp32-homekit-camera.
Thank you for your great help, I can compile and download the software. Now I used SPI Flash Size with 4MB.
At homekit I saw images and this worked fine. If I like to get videos I got an ' Core 1 panic'ed (LoadProhibited). Exception was unhandled' error:
>>> HomeKit: [Client 55] Update Characteristics
>>> HomeKit: [Client 55] Resource
I (27501) esp32_camera: Resource payload: {"image-width":640,"image-height":480,"resource-type":"image"}
>>> HomeKit: [Client 55] Resource
I (71231) esp32_camera: Resource payload: {"image-width":640,"image-height":480,"resource-type":"image"}
>>> HomeKit: [Client 55] Get Characteristics
>>> HomeKit: [Client 55] Update Characteristics
>>> HomeKit: [Client 55] Get Characteristics
I (77451) esp32_camera: Creating setup endpoints response
>>> HomeKit: [Client 55] Update Characteristics
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x4008ee8f PS : 0x00060630 A0 : 0x80084d04 A1 : 0x3ffeba10
0x4008ee8f: is_free at /Users/myname/esp/esp-idf/components/heap/multi_heap.c:380
(inlined by) multi_heap_malloc_impl at /Users/myname/esp/esp-idf/components/heap/multi_heap.c:432
A2 : 0x3f800000 A3 : 0x000e1000 A4 : 0x00000000 A5 : 0x3ffdec30
A6 : 0x00000003 A7 : 0x00060023 A8 : 0x00000000 A9 : 0xffffffff
A10 : 0x3f800010 A11 : 0x3ffbcd14 A12 : 0x3f800014 A13 : 0x00000000
A14 : 0xffffffff A15 : 0x00000000 SAR : 0x00000001 EXCCAUSE: 0x0000001c
EXCVADDR: 0xffffffff LBEG : 0x4008fd80 LEND : 0x4008fd8b LCOUNT : 0x00000000
0x4008fd80: memset at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/memset.S:142
0x4008fd8b: memset at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/memset.S:152
ELF file SHA256: 15af80b002dee1e2696864daa7ea98116bd7f210e96a49d49b313214726fa5a4
Backtrace: 0x4008ee8f:0x3ffeba10 0x40084d01:0x3ffeba30 0x40084d53:0x3ffeba50 0x4008b34d:0x3ffeba70 0x400d7cd5:0x3ffeba90 0x400915f5:0x3ffec2e0
0x4008ee8f: is_free at /Users/myname/esp/esp-idf/components/heap/multi_heap.c:380
(inlined by) multi_heap_malloc_impl at /Users/myname/esp/esp-idf/components/heap/multi_heap.c:432
0x40084d01: heap_caps_malloc at /Users/myname/esp/esp-idf/components/heap/heap_caps.c:354
0x40084d53: heap_caps_malloc_default at /Users/myname/esp/esp-idf/components/heap/heap_caps.c:354
0x4008b34d: malloc at /Users/myname/esp/esp-idf/components/newlib/heap.c:32
0x400d7cd5: camera_stream_task at /Users/myname/esp/esp32-homekit-camera/main/app_main.c:589
0x400915f5: vPortTaskWrapper at /Users/myname/esp/esp-idf/components/freertos/port.c:435
Rebooting...
I (12) boot: ESP-IDF v4.0-dev-728-g826ff7186 2nd stage bootloader
I (12) boot: compile time 10:13:57
I (12) boot: Enabling RNG early entropy source...
I (17) boot: SPI Speed : 40MHz
I (21) boot: SPI Mode : DIO
I (25) boot: SPI Flash Size : 4MB
I (29) boot: Partition Table:
I (33) boot: ## Label Usage Type ST Offset Length
I (40) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (47) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (55) boot: 2 factory factory app 00 00 00010000 001f0000
I (62) boot: End of partition table
from esp32-homekit-camera.
DId you enable SPI RAM in menuconfig?
from esp32-homekit-camera.
Yes, I think I did it. Here are some lines from sdkconfig:
CONFIG_ESP32_SPIRAM_SUPPORT=y
CONFIG_SPIRAM_BOOT_INIT=y
from esp32-homekit-camera.
I'm getting the same error, logs below:
>>> HomeKit: [Client 55] Update Characteristics
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x4008ba82 PS : 0x00060333 A0 : 0x8008dbad A1 : 0x3ffeb9c0
0x4008ba82: uxPortCompareSet at /home/lockpicker/esp/esp-idf/components/freertos/tasks.c:3537
(inlined by) vPortCPUAcquireMutexIntsDisabledInternal at /home/lockpicker/esp/esp-idf/components/freertos/portmux_impl.inc.h:86
(inlined by) vPortCPUAcquireMutexIntsDisabled at /home/lockpicker/esp/esp-idf/components/freertos/portmux_impl.h:98
(inlined by) vTaskEnterCritical at /home/lockpicker/esp/esp-idf/components/freertos/tasks.c:4231
A2 : 0xffff0000 A3 : 0x0000abab A4 : 0xb33fffff A5 : 0x00000001
A6 : 0x00060320 A7 : 0x0000cdcd A8 : 0x0000abab A9 : 0x3ffeb9b0
A10 : 0x3ffe0fc0 A11 : 0x00060923 A12 : 0x00060920 A13 : 0x00000000
A14 : 0x00000000 A15 : 0x00000000 SAR : 0x00000001 EXCCAUSE: 0x0000001d
EXCVADDR: 0xffff0000 LBEG : 0x40095d3c LEND : 0x40095d47 LCOUNT : 0x00000000
0x40095d3c: memset at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/memset.S:142
0x40095d47: memset at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/memset.S:152
Backtrace: 0x4008ba82:0x3ffeb9c0 0x4008dbaa:0x3ffeb9f0 0x40085270:0x3ffeba10 0x400852c1:0x3ffeba30 0x400857c5:0x3ffeba50 0x4000beaf:0x3ffeba70 0x400d7c8c:0x3ffeba90 0x4008ad59:0x3ffec2e0
0x4008ba82: uxPortCompareSet at /home/lockpicker/esp/esp-idf/components/freertos/tasks.c:3537
(inlined by) vPortCPUAcquireMutexIntsDisabledInternal at /home/lockpicker/esp/esp-idf/components/freertos/portmux_impl.inc.h:86
(inlined by) vPortCPUAcquireMutexIntsDisabled at /home/lockpicker/esp/esp-idf/components/freertos/portmux_impl.h:98
(inlined by) vTaskEnterCritical at /home/lockpicker/esp/esp-idf/components/freertos/tasks.c:4231
0x4008dbaa: multi_heap_internal_lock at /home/lockpicker/esp/esp-idf/components/heap/multi_heap.c:380
(inlined by) multi_heap_malloc_impl at /home/lockpicker/esp/esp-idf/components/heap/multi_heap.c:416
0x40085270: heap_caps_malloc at /home/lockpicker/esp/esp-idf/components/heap/heap_caps.c:354
0x400852c1: heap_caps_malloc_default at /home/lockpicker/esp/esp-idf/components/heap/heap_caps.c:354
0x400857c5: _malloc_r at /home/lockpicker/esp/esp-idf/components/newlib/syscalls.c:37
0x400d7c8c: camera_stream_task at /home/lockpicker/Developer/esp32-homekit-camera/main/app_main.c:589
0x4008ad59: vPortTaskWrapper at /home/lockpicker/esp/esp-idf/components/freertos/port.c:435
Rebooting...
from esp32-homekit-camera.
Make sure you follow configuration instructions in README that I added recently.
from esp32-homekit-camera.
@maximkulkin: I started new from scratch:
- I deleted directory 'esp32-homekit-camera'
- Download the whole software: 'git clone --recursive https://github.com/maximkulkin/esp32-homekit-camera.git'
- Partition Table = Custom partition table CSV, Custom partition CSV file = partitions.csv
- Component config: ESP32-specific
- Support for external, SPI-connected RAM = ok
- SPI RAM config: Initialize SPI RAM when booting the ESP32 = ok
- SPI RAM access method = Make RAM allocatable using malloc() as well = ok
- Camera configuration: OV2640 Support = ok
- ESP32 HomeKit Camera: STA
- Camera Pins = custom camera pinout:
#define CAMERA_PIN_PWDN 26
#define CAMERA_PIN_RESET -1
#define CAMERA_PIN_SIOD 13
#define CAMERA_PIN_SIOC 12
#define CAMERA_PIN_XCLK 32
#define CAMERA_PIN_D0 5
#define CAMERA_PIN_D1 14
#define CAMERA_PIN_D2 4
#define CAMERA_PIN_D3 15
#define CAMERA_PIN_D4 18
#define CAMERA_PIN_D5 23
#define CAMERA_PIN_D6 36
#define CAMERA_PIN_D7 39
#define CAMERA_PIN_VSYNC 27
#define CAMERA_PIN_HREF 25
#define CAMERA_PIN_PCLK 19
This is a WROVER_Kit from TTgo (exactly: TTGO T-Kamera ESP32 WROVER & PSRAM Kamera Modul ESP32-WROVER-B OV2640 Kamera Modul 0,96 OLED).
Results:
a.) Program started, Wifi worked, homekit pairing worked, image loading every 10 seconds worked very well!
b.) If I touch the picture to get the stream I got the 'Guru Meditation Error: Core 1 panic'ed'
I (414330) esp32_camera: Creating setup endpoints response
>>> HomeKit: [Client 56] Update Characteristics
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x4008f34b PS : 0x00060330 A0 : 0x80084dc8 A1 : 0x3ffeba10
0x4008f34b: is_free at /Users/myname/esp/esp-idf/components/heap/multi_heap.c:380
(inlined by) multi_heap_malloc_impl at /Users/myname/esp/esp-idf/components/heap/multi_heap.c:432
A2 : 0x3f800000 A3 : 0x000e1000 A4 : 0x00000000 A5 : 0x3ffc36d8
A6 : 0x00ff0000 A7 : 0xff000000 A8 : 0x00000000 A9 : 0xffffffff
A10 : 0x3f800010 A11 : 0x3ff96354 A12 : 0x3f800014 A13 : 0x00000000
A14 : 0xffffffff A15 : 0x00000057 SAR : 0x00000001 EXCCAUSE: 0x0000001c
EXCVADDR: 0xffffffff LBEG : 0x4008e7e4 LEND : 0x4008e7ef LCOUNT : 0x00000000
0x4008e7e4: memset at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/memset.S:142
0x4008e7ef: memset at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/memset.S:152
ELF file SHA256: 681ccb6492e90ad4b7bddfe5fa454ba0111d4055c7330e8530024ec1748525c5
Backtrace: 0x4008f348:0x3ffeba10 0x40084dc5:0x3ffeba30 0x40084e17:0x3ffeba50 0x400931fd:0x3ffeba70 0x400d7d2d:0x3ffeba90 0x40093499:0x3ffec2e0
0x4008f348: multi_heap_assert at /Users/myname/esp/esp-idf/components/heap/multi_heap.c:380
(inlined by) multi_heap_malloc_impl at /Users/myname/esp/esp-idf/components/heap/multi_heap.c:431
0x40084dc5: heap_caps_malloc at /Users/myname/esp/esp-idf/components/heap/heap_caps.c:354
0x40084e17: heap_caps_malloc_default at /Users/myname/esp/esp-idf/components/heap/heap_caps.c:354
0x400931fd: malloc at /Users/myname/esp/esp-idf/components/newlib/heap.c:32
0x400d7d2d: camera_stream_task at /Users/myname/esp/esp32-homekit-camera/main/app_main.c:589
0x40093499: vPortTaskWrapper at /Users/myname/esp/esp-idf/components/freertos/port.c:435
Rebooting...
From my point of view, I suspect no problem with type of camera or with the pins. I suspect a problem with heap. Is there any way to get more debugging informations?
Is it possible to get your 'sdkconfig'?
I tested with other SPI RAM access methods, for example with 'Integrate RAM into ESP32 memory map':
>>> HomeKit: [Client 56] Update Characteristics
I (1047965) esp32_camera: Initializing encoder
I (1047965) esp32_camera: Total free memory: 99372
I (1047965) esp32_camera: Largest free block: 81032
x264 [info]: using cpu capabilities: none!
x264 [error]: malloc of size 4098 failed
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.
At the first error messages I missed
I (1047965) esp32_camera: Initializing encoder
I (1047965) esp32_camera: Total free memory: 99372
I (1047965) esp32_camera: Largest free block: 81032
after the message 'Update Characteristics'!
@lockpicker: What kind of camera did you use?
from esp32-homekit-camera.
Streaming does not work (Yet). See #11 and #22
from esp32-homekit-camera.
@AchimPieters
Thanks a lot for this information.
I saw that Issue #11 is closed and suspects that streaming is now working. I did not found Issue #22.
So, now I'm waiting with Maxim...
from esp32-homekit-camera.
@GermanSheepDog I am also getting same problem
from esp32-homekit-camera.
Related Issues (20)
- Failed to setup endpoints: no session ID field HOT 8
- ESP32 S2 USB Webcam, much better quality HOT 1
- Build with errors HOT 5
- Can't apply patch in MacOS HOT 17
- Compile error - esp_event_loop_init HOT 3
- Error applying Patch? HOT 1
- mdns component moved from idf 5.0 HOT 3
- wifi:bcn_timeout,ap_probe_send_start
- Code is broken? Failed to dump SPR public key (code -199) HOT 3
- Environment for successful build? HOT 19
- Compile Issue: make: *** [all] Error 2 HINT: The issue is better to resolve by replacing format specifiers to 'PRI'-family macros (include <inttypes.h> header file). HOT 7
- Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled. HOT 1
- esp_random.h header file is not included by esp_system.h anymore.
- ESP32D0WDQ6 - only can see picture no video HOT 2
- can not build with esp-idf v5
- make flash issues
- this accessory cannot be used
- errors HOT 1
- Failed to dump SPR public key (code -199) HOT 3
- Failed to dump SPR public key (code -199) HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp32-homekit-camera.