Heltec LoRa v2 board flashes and works with OpenMQTTGateway Web Uploader, but PlatformIO build causes RTCWDT reset boot loop

Hi,

I’m having an issue with a Heltec LoRa board when flashing OpenMQTTGateway from Visual Studio Code + PlatformIO.

If I install the firmware using the official OpenMQTTGateway Web Uploader, everything works correctly and the device boots normally.

However, when I build and upload the firmware with PlatformIO, the board immediately enters a boot loop. Serial monitor output looks like this:

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (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:2

load:0x3fff0030,len:4640

load:0x40078000,len:15660

load:0x40080400,len:3164

entry 0x4008059c

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (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:2
load:0x3fff0030,len:4640
load:0x40078000,len:15660
load:0x40080400,len:3164
entry 0x4008059c
SVj�UT�����R�V���Z
���URUTQ������(UR�P�R��յ�B�$��VU���յ��TVը�T�U��␋␕�V�PQ�j�K�␋�VŭTT␔���␋QTQQ�␔��(���Q(QEUU�␔����Q��T�(�T����Q��T�␔�������Q(QQU�E␕���␋Q�U��*�E*���␋Q(QQQ
�T�(��␋Q(QQ�␔�Q␔*���␋Q(QQQ
�ԡ���Q����)�␔����Q(QQ�+�T����Q(QQQ
���Q���Q(QQU�ET���␋Q(QQU�ET���␋Q(QQQ
�TU���Q(QQ��␕ET����Q(QQQ�ET�(��Q(Q��*�U����Q(QQ�����T�UT��QQQ���R�U��U��QQQQ��R
��␋QT�*�U(�Ԥ��␋QT�*�����UZ��␋Q(QQQ��T�TETRJZT�␋QTQQ��Q��T�␔Q��TJT��U����LU�U����QTEQTEQTT
U��UTTUU�E��E(U�TRQ�U␕U-��Z�TV�W���␋�T�*�Z����P����UUJ�TP�U*U-��Z�TV�WJ��*�UTi+��XT���*�VŨ�ըUP�U�␕E␔��UB�XJ��RZ␕�j�յ-E���VŨ���P��UTm*�P�ZծUU���u��VZ�T*�P�V��ET�Q�UU�T��-�QR�պQ��U�J���u���U�␕�W*��R␕�uR5T�T��U���-QBU��j␔���T�T�Zq␔��R�Z�QRWխQ(���R�Z�QR�R�Zq␔���խQ(␕Eե�I���T�U�UZU%u��␔��(U�UVKUE���T�\EԱQ�UV+UUQQ���T�\E␔QE��jZ��␕��Z�Pq*QQ��Q�SVj�UT�����R�V���Z
���URUT��E����(UR�P�R���VաQ$��VU���յ��TVը�T�U��␋␕E��*���VU��PU�Z�T␔���␋QTQQ�␔��(���Q(QEUU�␔����QXQeV��T����Q��T�(�Q␔*���␋Q(QQU�E␕���␋Q�����(E*���␋Q(QQQ
�T�(��␋Q(QQ�␔�Q␔*���␋Q(QQQ
�ԡ���Q����)�␔����Q(QQ�␕�T����Q(QQQ
�Q␔R���␋Q(QQU�ET���␋Q(QQU�ET���␋Q(QQQ
�TU���QTQU�)�Q␔R�(��Q(QQQ�ET�(��Q(Q��*�U����Q(QQ���ʢT�UT��QQQ���R�U��U��QQQQ�␕JS��␋QT�*�U(�Ԥ��␋QT�*�����UZ��␋Q(QQQ��T�TETRJZT�␋QTQQ��Q��T�(QTQEV���U��Q��ETUUUQ��TU␔QT��U�Q(QQ�(�U�U�*RJRQTE��T�JRU��UTTUU�E��E(U�TRQ�U*U-��Z�TV�W���␋�T�*�Z����P���QUUU␕�
Q�U*U-��Z�TV�WJ��*�UTi+��XT���*�VŨ�ըUP�U�␕�
Q�U*U-��Z�TV�Wj�յ-E���VŨ���P␕�UTm*�P�ZծUU���u��VZ�T*�P�V��ET�Q�UU�T��-�QR�պQ��U�J����Z��UQU�W*��R␕�uR5T�T��U���-QBU��j���EJ�R�Z�Q�WխQ(�uT�Z�QJ-]�Z�,QR�R�Z�QڬR�Z�Q����I���T�U�UZU%�(Ք��(U�UVKUE���T�\EԱQ�UV+UUQQ���T�\E�QE��jZ��␕Ej��P�E�Q���SVj�UT���V�R������*���URUTQ������(UR�P�R���Vա�R*j+U���յ��TVը�T�U��␋␕�V�PQ�j�K�␋�VŭTT␔���␋QTQQ�␔��(���Q(QEUU�␔����QXQEV��T����Q��T�(�Q␔*���␋Q(QQU�E␕���␋Q��+��(E*���␋Q(QQQ
�T�(��␋Q(QQ�␔�Q␔*���␋Q(QQQ
�ԡ���Q���e)�␔����Q(QQ�U�T����Q(QQQ
���Q���Q(QQU�ET���␋Q(QQU�ET���␋Q(QQQ
�TU���QTQU�)�������Q(QQQ�ET�(��Q(Q��*�U����Q(QQ�����T�UT��QQQ��QT�T�R�ZQ(QQQ��TjP��QT�*�U(�Ԥ��␋QT�*����Ԫ+
�␋Q(QQQ��T�T����+R���E␔Q��Q��T�(QTQeV���U��Q��ETUUUQ��TU␔QT��U�Q(QQ�(�U�U�*RJRQT�T�TE�RU��UTTUU�E��E(U�TR���B�XJ��RZ␕����␋�T�*�Z����P���QUUU␕E␔���B�XJ��RZ␕�J��*�UTi+��XT���*�VŨ�ըUP�U�␕�
Q�U*U-��Z�TV�W�յ-E���VŨ���P␕�UTm*�P�ZծUU����Z�VZ�T*�P�V��ET�Q�UU�T��-�QRQUꢪ�U�J���u���U�␕�W*��R␕�uR5T�T��U���-QBU��j����T�T�Z�Q�WխQ(�uT�Zq␔���R�Z�Q��R�Z�QڬR�Z�Q����I���T�U�UZUE�(Ք��(U�UVKUE���T�,EԱQ�UV+UUQQ���T�,E�QE��jZ��␕��Z�P�E␔Q��Q�ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (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:2
load:0x3fff0030,len:4640
load:0x40078000,len:15660
load:0x40080400,len:3164
entry 0x4008059c
SVj�UT���V�R������*���URUTQ������(UR�P�R��յ�B�$��VU\�X�V���Z�-�U*�U��␋␕�V�PQ�j�K�␋�VŭTT␔���␋QTQQ�␔��(���Q(QEUU�␔����Q��T�(�T����Q��T�␔�������Q(QQU�E␕���␋Q�Ue�R�E*���␋Q(QQQ
�T�(��␋Q(QQ�␔�������Q(QQQ
�ԡ���Q����)�␔����QXQQ�␕�T����Q(QQQ
�Q␔R���␋Q(QQU�ET���␋Q(QQU�ET���␋Q(QQQ
�TU���Q(QQ��␕ET����Q(QQQ�ET�(��Q(Q��*�U����Q(QQ���ʢT�UT��QQQ��QT�T�R�ZQ(QQQ��TjP��QT�*�U(�Ԥ��␋QT�*����Ԫ+
�␋Q(QQQ��T�T����+R���E␔Q��Q��T�␔Q��TJT��U����LU�U������TE��TT
U��UTTUU�E��E(U�TR��UB�XJ��RZ␕����␋�T�*�Z����P���QUUU␕E␔Q�U␕U-

After that, the serial monitor displays only corrupted/random characters and the board continuously resets with: rst:0x10 (RTCWDT_RTC_RESET)
What I have tested

Flashing via OpenMQTTGateway Web Uploader → works normally

Flashing the same target via PlatformIO → boot loop

Multiple re-flashes give the same result

Board is a Heltec LoRa ESP32 board v2

Questions

  1. Could PlatformIO be building with different ESP32 core, partition table, flash settings or PSRAM settings than the Web Uploader firmware?
  2. Is there a known PlatformIO environment for Heltec LoRa boards that matches the firmware distributed through the OMG Web Uploader?
  3. Does the serial output suggest a watchdog reset caused by wrong flash settings or an incorrect board definition?

Do you use the development web upload or production one ?

It should not but I would advise to remove any .pio in your project folder so that there is no cache issues.

If you download the latest development codebase it should be the same as the configuration used by the web uploader

Also be carefull if you use a prod_env.ini you should try first with the standard environments.

from there GitHub - 1technophile/OpenMQTTGateway: MQTT gateway for ESP8266 or ESP32 with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, Bluetooth, beacons detection, mi flora, mi jia, LYWSD02, LYWSD03MMC, Mi Scale, TPMS, BBQ thermometer compatibility & LoRa. · GitHub

deleted pio folder
using standard environments

and I tried another lora board ttgo v2 and everything works with platformio install