-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TW#26714] ESP32 WROVER Porting crash #2546
Comments
Besides that option in menuconfig you have also few others related to psram. Please check those 2: |
I checked |
When I increase the value of this option |
Works as GPIOs 8 & 9 was used! |
Environment
Problem Description
I'm porting my application from ESP32_WROOM module to ESP32_Wrover to get use of external PSRAM
I enabled support for external RAM from menuconfig and ran the application then it crashed at freertos queue creation as following
`Guru Meditation Error: Core 0 panic'ed (StoreProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x4009701a PS : 0x00060433 A0 : 0x80099141 A1 : 0x3ffbb310
0x4009701a: uxPortCompareSet at /media/data/esp-srcs/esp-idf/components/freertos/tasks.c:3564
(inlined by) vPortCPUAcquireMutexIntsDisabledInternal at /media/data/esp-srcs/esp-idf/components/freertos/portmux_impl.inc.h:86
(inlined by) vPortCPUAcquireMutexIntsDisabled at /media/data/esp-srcs/esp-idf/components/freertos/portmux_impl.h:98
(inlined by) vTaskEnterCritical at /media/data/esp-srcs/esp-idf/components/freertos/tasks.c:4258
A2 : 0xcccccccc A3 : 0x0000cdcd A4 : 0xb33fffff A5 : 0x00000001
A6 : 0x00060820 A7 : 0x0000abab A8 : 0x0000cdcd A9 : 0x3ffbb400
A10 : 0x3ffd15a4 A11 : 0x00000001 A12 : 0x00000003 A13 : 0x00000008
A14 : 0x00000002 A15 : 0x00000005 SAR : 0x00000004 EXCCAUSE: 0x0000001d
EXCVADDR: 0xcccccccc LBEG : 0x4009de64 LEND : 0x4009de92 LCOUNT : 0xffffffff
0x4009de64: memcpy 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/memcpy.S:168
0x4009de92: memcpy 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/memcpy.S:201
Backtrace: 0x4009701a:0x3ffbb310 0x4009913e:0x3ffbb340 0x4008506d:0x3ffbb360 0x400850b5:0x3ffbb380 0x400855fd:0x3ffbb3a0 0x4000beaf:0x3ffbb3c0 0x40095b26:0x3ffbb3e0 0x400ef29b:0x3ffbb400 0x400d7424:0x3ffbb420 0x400d29f0:0x3ffbb440 0x40096305:0x3ffbb460
0x4009701a: uxPortCompareSet at /media/data/esp-srcs/esp-idf/components/freertos/tasks.c:3564
(inlined by) vPortCPUAcquireMutexIntsDisabledInternal at /media/data/esp-srcs/esp-idf/components/freertos/portmux_impl.inc.h:86
(inlined by) vPortCPUAcquireMutexIntsDisabled at /media/data/esp-srcs/esp-idf/components/freertos/portmux_impl.h:98
(inlined by) vTaskEnterCritical at /media/data/esp-srcs/esp-idf/components/freertos/tasks.c:4258
0x4009913e: multi_heap_internal_lock at /media/data/esp-srcs/esp-idf/components/heap/multi_heap.c:377
(inlined by) multi_heap_malloc_impl at /media/data/esp-srcs/esp-idf/components/heap/multi_heap.c:413
0x4008506d: heap_caps_malloc at /media/data/esp-srcs/esp-idf/components/heap/heap_caps.c:351
0x400850b5: heap_caps_malloc_default at /media/data/esp-srcs/esp-idf/components/heap/heap_caps.c:351
0x400855fd: _malloc_r at /media/data/esp-srcs/esp-idf/components/newlib/syscalls.c:37
0x40095b26: xQueueGenericCreate at /media/data/esp-srcs/esp-idf/components/freertos/queue.c:2037
0x400ef29b: WiFi_vInit at /media/data/eclipse-workspace/ESP32_Adapter/components/WiFi/WiFi.c:1375
0x400d7424: app_main at /media/data/eclipse-workspace/ESP32_Adapter/main/main.c:75 (discriminator 9)
0x400d29f0: main_task at /media/data/esp-srcs/esp-idf/components/esp32/cpu_start.c:482
0x40096305: vPortTaskWrapper at /media/data/esp-srcs/esp-idf/components/freertos/port.c:435`
when I ran backtrace I got
`Remote debugging using /dev/ttyUSB1
0x4009701a in uxPortCompareSet (set=, compare=3007315967, addr=0xcccccccc)
at /media/data/esp-srcs/esp-idf/components/freertos/include/freertos/portmacro.h:285
285 asm volatile (
(gdb) bt
#0 0x4009701a in uxPortCompareSet (set=, compare=3007315967, addr=0xcccccccc)
at /media/data/esp-srcs/esp-idf/components/freertos/include/freertos/portmacro.h:285
#1 vPortCPUAcquireMutexIntsDisabledInternal (timeout_cycles=-1, mux=0xcccccccc)
at /media/data/esp-srcs/esp-idf/components/freertos/portmux_impl.inc.h:86
#2 vPortCPUAcquireMutexIntsDisabled (timeout_cycles=-1, mux=0xcccccccc)
at /media/data/esp-srcs/esp-idf/components/freertos/portmux_impl.h:98
#3 vTaskEnterCritical (mux=0xcccccccc) at /media/data/esp-srcs/esp-idf/components/freertos/tasks.c:4258
#4 0x40099141 in multi_heap_internal_lock (heap=0x3f800000) at /media/data/esp-srcs/esp-idf/components/heap/multi_heap.c:372
#5 multi_heap_malloc_impl (heap=0x3f800000, size=19224) at /media/data/esp-srcs/esp-idf/components/heap/multi_heap.c:413
#6 0x40085070 in heap_caps_malloc (size=19224, caps=5120) at /media/data/esp-srcs/esp-idf/components/heap/heap_caps.c:110
#7 0x400850b8 in heap_caps_malloc_default (size=19224) at /media/data/esp-srcs/esp-idf/components/heap/heap_caps.c:145
#8 0x40085600 in _malloc_r (r=0x3ffbb560, size=19224) at /media/data/esp-srcs/esp-idf/components/newlib/syscalls.c:37
#9 0x4000beb2 in ?? ()
#10 0x40095b29 in xQueueGenericCreate (uxQueueLength=110, uxItemSize=174, ucQueueType=0 '\000')
at /media/data/esp-srcs/esp-idf/components/freertos/queue.c:391
#11 0x400ef29e in WiFi_vInit () at /media/data/eclipse-workspace/ESP32_Adapter/components/WiFi/WiFi.c:1375
#12 0x400d7427 in app_main () at /media/data/eclipse-workspace/ESP32_Adapter/main/main.c:75
#13 0x400d29f3 in main_task (args=) at /media/data/esp-srcs/esp-idf/components/esp32/cpu_start.c:482
#14 0x40096308 in vPortTaskWrapper (pxCode=0x400d296c <main_task>, pvParameters=0x0)
at /media/data/esp-srcs/esp-idf/components/freertos/port.c:143`
When I disable PSRAM from menuconfig, it works properly
Expected Behavior
The code was running properly in ESP32 WROOM
Actual Behavior
It crashes in ESP32 WROVER
The text was updated successfully, but these errors were encountered: