OTA fails when BLE is enabled
Posted: Tue May 02, 2017 4:44 pm
I've recently starting using the BLE on my application. OTA updates were working just fine before I starting using BLE. Now, if I try to run an OTA update with the BLE code running, I get the following errors:
The ESP resets, and I capture this core dump.
The ESP constantly resets after this, and it doesn't produce a core dump. I erased the flash and uploaded the code with the BLE code commented out. OTA worked just fine. I then recompiled the code with the BLE enabled, ran the OTA. It downloads all of the code to the ESP32, but then fails at the end with
Is the image to big with the BLE code? If so, is there an easy way to reduce the size of the BLE code?
Code: Select all
I (15703) ota: Connected to server
I (15703) ota: Connected to http server
I (15703) ota: Send GET request to server succeeded
Task watchdog got triggered. The following tasks did not feed the watchdog in time:
Tasks currently running:
CPU 0: ota_update_star
CPU 1: ipc1
Code: Select all
==================== CURRENT THREAD STACK =====================
#0 0x401704b0 in rcUpdateRxDone ()
#1 0x40094605 in ppRxProtoProc ()
#2 0x40094bf0 in ppRxPkt ()
#3 0x40096c6a in ppTask ()
======================== THREADS INFO =========================
Id Target Id Frame
19 process 18 0x4008458f in xQueueGenericReceive (xQueue=0x0, pvBuffer=0x0, xTicksToWait=<unavailable>, xJustPeeking=0) at /path/to/folder/esp-idf-v2.0/components/freertos/./queue.c:1594
18 process 17 0x4008458f in xQueueGenericReceive (xQueue=0x1, pvBuffer=0x40081dd8 <spi_flash_op_block_func>, xTicksToWait=<unavailable>, xJustPeeking=0) at /path/to/folder/esp-idf-v2.0/components/freertos/./queue.c:1594
17 process 16 0x4008458f in xQueueGenericReceive (xQueue=0x3ffc7d80, pvBuffer=0x3ffc7cdd, xTicksToWait=<unavailable>, xJustPeeking=0) at /path/to/folder/esp-idf-v2.0/components/freertos/./queue.c:1594
16 process 15 0x4008458f in xQueueGenericReceive (xQueue=0x3ffeea38, pvBuffer=0x3ffd5490, xTicksToWait=2148957620, xJustPeeking=0) at /path/to/folder/esp-idf-v2.0/components/freertos/./queue.c:1594
15 process 14 0x4008458f in xQueueGenericReceive (xQueue=0x0, pvBuffer=0x40081dd8 <spi_flash_op_block_func>, xTicksToWait=<unavailable>, xJustPeeking=0) at /path/to/folder/esp-idf-v2.0/components/freertos/./queue.c:1594
14 process 13 0x4008458f in xQueueGenericReceive (xQueue=0x3ffeefb0, pvBuffer=0x3ffbd0c0, xTicksToWait=2148956440, xJustPeeking=0) at /path/to/folder/esp-idf-v2.0/components/freertos/./queue.c:1594
13 process 12 0x4008458f in xQueueGenericReceive (xQueue=0x0, pvBuffer=0x0, xTicksToWait=<unavailable>, xJustPeeking=0) at /path/to/folder/esp-idf-v2.0/components/freertos/./queue.c:1594
12 process 11 0x4008458f in xQueueGenericReceive (xQueue=0x0, pvBuffer=0x0, xTicksToWait=<unavailable>, xJustPeeking=0) at /path/to/folder/esp-idf-v2.0/components/freertos/./queue.c:1594
11 process 10 0x4008458f in xQueueGenericReceive (xQueue=0x3ffc4598, pvBuffer=0x3f403f70, xTicksToWait=<unavailable>, xJustPeeking=0) at /path/to/folder/esp-idf-v2.0/components/freertos/./queue.c:1594
10 process 9 0x4008458f in xQueueGenericReceive (xQueue=0x0, pvBuffer=0x0, xTicksToWait=<unavailable>, xJustPeeking=0) at /path/to/folder/esp-idf-v2.0/components/freertos/./queue.c:1594
9 process 8 0x40085f3a in prvProcessTimerOrBlockTask (xNextExpireTime=<optimized out>, xListWasEmpty=<optimized out>) at /path/to/folder/esp-idf-v2.0/components/freertos/./timers.c:487
8 process 7 0x4008458f in xQueueGenericReceive (xQueue=0x3ffddb58, pvBuffer=0xa, xTicksToWait=2148929590, xJustPeeking=0) at /path/to/folder/esp-idf-v2.0/components/freertos/./queue.c:1594
7 process 6 0x4008458f in xQueueGenericReceive (xQueue=0x3ffc6764 <mbox>, pvBuffer=0x3ffb7e70, xTicksToWait=2148480633, xJustPeeking=0) at /path/to/folder/esp-idf-v2.0/components/freertos/./queue.c:1594
6 process 5 0x40085288 in vTaskDelay (xTicksToDelay=<optimized out>) at /path/to/folder/esp-idf-v2.0/components/freertos/./tasks.c:1412
5 process 4 0x400d1ca8 in esp_vApplicationIdleHook () at /path/to/folder/esp-idf-v2.0/components/esp32/./freertos_hooks.c:52
4 process 3 0x400d1ca8 in esp_vApplicationIdleHook () at /path/to/folder/esp-idf-v2.0/components/esp32/./freertos_hooks.c:52
3 process 2 0x4010a64e in app_main () at /path/to/folder/workspace/cp25g1/main/./main.c:149
2 process 1 0x4008565d in xTaskResumeAll () at /path/to/folder/esp-idf-v2.0/components/freertos/./tasks.c:2193
* 1 <main task> 0x401704b0 in rcUpdateRxDone ()
Code: Select all
I (38923) ota: Have written image length 1048367
E (62473) ota: Error: esp_ota_write failed! err=104
E (62473) ota: Exiting task due to fatal error...