VS Arduino
Visual Micro >> Visual Studio 2017, 2019, 2022 >> BasicOTA on ESP32 reboot loop
https://www.visualmicro.com/forums/YaBB.pl?num=1589982821

Message started by Ang on May 20th, 2020 at 1:53pm

Title: BasicOTA on ESP32 reboot loop
Post by Ang on May 20th, 2020 at 1:53pm
Hi, I am trying out BasicOTA example for arduino-esp32 1.0.4, but I have been unsuccessful at loading the uploaded firmware.

OTA using Arduino IDE is fine, but when using Visual Micro (Release 20.03.21.21) the ESP32 never recovers from a reboot loop.

Curiously, even when programmed using Visual Micro, I was able to perform OTA update via Arduino IDE without any problems. Yet it goes into a reboot loop when I perform OTA using Visual Micro.

Here's what I get from the serial monitor:

Code (]
ets JunĀ  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x17 (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:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/queue.c:1442 (xQueueGenericReceive)- assert failed!
abort() was called at PC 0x40088869 on core 1
[/code):



Decoder gives:
[code]
Decoding stack results
0x4008c434: invoke_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c line 155
0x4008c665: abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c line 170
0x40088869: xQueueGenericReceive at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/queue.c line 1442
0x4012fc22: sys_mutex_lock at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/port/esp32/freertos/sys_arch.c line 78
0x4012fefe: sys_arch_protect at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/port/esp32/freertos/sys_arch.c line 469
0x4011e8c0: do_memp_malloc_pool at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/core/memp.c line 302
0x4011e929: memp_malloc at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/core/memp.c line 398
0x4011ada6: netconn_alloc at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/api/api_msg.c line 742
0x401198d4: netconn_new_with_proto_and_callback at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/api/api_lib.c line 133
0x4011da3e: lwip_socket at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/api/sockets.c line 1580
0x400d397a: WiFiUDP::begin(IPAddress, unsigned short) at C:\Users\y.tan\AppData\Local\arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/include/lwip/lwip/sockets.h line 593
0x400d3a0d: WiFiUDP::begin(unsigned short) at C:\Users\y.tan\AppData\Local\arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi\src\WiFiUdp.cpp line 78
0x400d155c: VisualMicroDebug::begin(WiFiUDP*, unsigned long) (c:\program files at x86)\microsoft visual studio\2019\community\common7\ide\extensions\p1hbfuhp.cmm\Micro Platforms\default\debuggers\VM_DBG\VM_DBG.cpp line 884
0x400d1244: setup() at C:\Users\y.tan\Documents\Visual Studio 2015\Projects\ESP32S-WROOM32\OTA_example/OTA_example.ino line 118
0x400d4457: loopTask(void*) at C:\Users\y.tan\AppData\Local\arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32\main.cpp line 14
0x40088b7d: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 143


I have also attached the build message..

Has anyone encountered this issue? Some pointers would be very much appreciated.

Thanks!
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=build_010.txt ( 68 KB | 15 Downloads )

Title: Re: BasicOTA on ESP32 reboot loop
Post by Simon Hopkinson on May 20th, 2020 at 2:44pm
The "vMicro > Debugging > Debug" option is currently set to Serial, which may be causing an issue as it also creates a UDP connection (it shouldn't cause a conflict)

Can you try disabling this (set to Off) and rebuild and upload to see if this resolves the issue?

Upgrading Visual Micro to the latest version may also help as there were changes to the UDP Elements in March 2020.

Title: Re: BasicOTA on ESP32 reboot loop
Post by Ang on May 21st, 2020 at 12:39am
That solved my problem. Thank you very much!



VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.