mutexes in noinit-externa RAM
Posted: Mon Feb 20, 2023 5:26 pm
Dear all
I am trying to use the esp_ring component to store logs beyond SW-restarts or crashes (no power-resets).
defined are;
EXT_RAM_NOINIT_ATTR static StaticRingbuffer_t staticRingbuffer = {0};
EXT_RAM_NOINIT_ATTR static uint8_t buffer[RING_BUFFER_POOL_SIZE]; // 1 MB
The issue is when staticRingbuffer is defined in external none-initialized RAM, the software crashes in "xRingbufferSend",when trying to access a mutex.
When staticRingbuffer is defined in internal initialized RAM, this issue doesn't occur.
But, in this case I cannot save the logs beyond SW-restarts.
What am I missing in order to have and use "staticRingbuffer" in external none-initialized RAM, please?
Your help is much appreciated.
Thanks
Marko
assert failed: xQueueSemaphoreTake queue.c:1556 (pxQueue->uxItemSize == 0)
Backtrace: 0x40084d39:0x3ffbc380 0x400928a5:0x3ffbc3a0 0x400988c5:0x3ffbc3c0 0x400938dd:0x3ffbc4e0 0x401a5d31:0x3ffbc520 0x401a6313:0x3ffbc570 0x400da016:0x3ffbc5b0 0x401a6989:0x3ffbc6f0 0x40098647:0x3ffbc720 0x40190659:0x3ffbc770 0x400d404e:0x3ffbc7b0 0x400d3da4:0x3ffbc7d0 0x401a66ed:0x3ffbc7f0
#0 0x40084d39:0x3ffbc380 in panic_abort at /home/mhammer3/.platformio/packages/framework-espidf/components/esp_system/panic.c:412
#1 0x400928a5:0x3ffbc3a0 in esp_system_abort at /home/mhammer3/.platformio/packages/framework-espidf/components/esp_system/esp_system.c:135
#2 0x400988c5:0x3ffbc3c0 in __assert_func at /home/mhammer3/.platformio/packages/framework-espidf/components/newlib/assert.c:78
#3 0x400938dd:0x3ffbc4e0 in xQueueSemaphoreTake at /home/mhammer3/.platformio/packages/framework-espidf/components/freertos/FreeRTOS-Kernel/queue.c:1556 (discriminator 1)
#4 0x401a5d31:0x3ffbc520 in prvReceiveGeneric at /home/mhammer3/.platformio/packages/framework-espidf/components/esp_ringbuf/ringbuf.c:776
#5 0x401a6313:0x3ffbc570 in xRingbufferReceive at /home/mhammer3/.platformio/packages/framework-espidf/components/esp_ringbuf/ringbuf.c:1132
I am trying to use the esp_ring component to store logs beyond SW-restarts or crashes (no power-resets).
defined are;
EXT_RAM_NOINIT_ATTR static StaticRingbuffer_t staticRingbuffer = {0};
EXT_RAM_NOINIT_ATTR static uint8_t buffer[RING_BUFFER_POOL_SIZE]; // 1 MB
The issue is when staticRingbuffer is defined in external none-initialized RAM, the software crashes in "xRingbufferSend",when trying to access a mutex.
When staticRingbuffer is defined in internal initialized RAM, this issue doesn't occur.
But, in this case I cannot save the logs beyond SW-restarts.
What am I missing in order to have and use "staticRingbuffer" in external none-initialized RAM, please?
Your help is much appreciated.
Thanks
Marko
assert failed: xQueueSemaphoreTake queue.c:1556 (pxQueue->uxItemSize == 0)
Backtrace: 0x40084d39:0x3ffbc380 0x400928a5:0x3ffbc3a0 0x400988c5:0x3ffbc3c0 0x400938dd:0x3ffbc4e0 0x401a5d31:0x3ffbc520 0x401a6313:0x3ffbc570 0x400da016:0x3ffbc5b0 0x401a6989:0x3ffbc6f0 0x40098647:0x3ffbc720 0x40190659:0x3ffbc770 0x400d404e:0x3ffbc7b0 0x400d3da4:0x3ffbc7d0 0x401a66ed:0x3ffbc7f0
#0 0x40084d39:0x3ffbc380 in panic_abort at /home/mhammer3/.platformio/packages/framework-espidf/components/esp_system/panic.c:412
#1 0x400928a5:0x3ffbc3a0 in esp_system_abort at /home/mhammer3/.platformio/packages/framework-espidf/components/esp_system/esp_system.c:135
#2 0x400988c5:0x3ffbc3c0 in __assert_func at /home/mhammer3/.platformio/packages/framework-espidf/components/newlib/assert.c:78
#3 0x400938dd:0x3ffbc4e0 in xQueueSemaphoreTake at /home/mhammer3/.platformio/packages/framework-espidf/components/freertos/FreeRTOS-Kernel/queue.c:1556 (discriminator 1)
#4 0x401a5d31:0x3ffbc520 in prvReceiveGeneric at /home/mhammer3/.platformio/packages/framework-espidf/components/esp_ringbuf/ringbuf.c:776
#5 0x401a6313:0x3ffbc570 in xRingbufferReceive at /home/mhammer3/.platformio/packages/framework-espidf/components/esp_ringbuf/ringbuf.c:1132