Heltec V3 on PlatformIO - Problems Flashing and Debugging with Compatible ESP-Prog

I am using open source firmware for my project on the Heltec V3 Board, and attempting to flash the firmware onto the esp32s3 via PlatformIO/VSCode via an ESP Prog debug probe. Here is the guide I have followed. During the flashing stage I am running into:

A fatal error occurred: Failed to connect to ESP32: No serial data received.

After intensive troubleshooting, I ruled out a lot of potential issues like the ESP-Prog driver installation, wiring errors, and baud rate. The debug probe is connected to one of my COM ports, and attempts to interface via a flashing LED indicator, and terminal output “Connecting with COM10…”. My feeling is that the Heltec Board is not in the proper boot mode to allow firmware flashing. I tried holding the PRG button, pushing RST, and releasing PRG, but nothing about the board indicates it is in a boot mode. Does anyone have experience with this debug setup or flashing the V3 board without a USB connection (I’m using the JTAG interface for the ESP-Prog)? Should there be an obvious indication by the OLED display about boot mode?

Is this the WiFi_LoRa_32_V3.x aka HTIT-WB32LA(F)_V3.x?

That puts the chip in to boot mode - there is nothing on any ESP board I’ve seen that indicates it is in boot mode but all the boards with a UART will display the boot loader message. You can see this if you use a serial terminal program and put the board in to boot/flash mode.

Erm, no, it’s controlled by a user program on the ESP which at this point you have running the Espressif boot loader.

Have you set the strapping pins to use JTAG mode over USB? This is not a given for this board as flashing over the USB serial is the norm so it’s up to you to set the correct boot mode for something different than the intended design.

Why can’t you download this mystery firmware via the USB port using the esptool script?

Hi Nick,

Thanks for responding here!

Yes, it is.

What are the strapping pins?

For reference, I am using the Meshtastic’s firmware, a LoRa mesh network firmware that I am using for a school project. I can flash through the USB port, but I need a debugger system working to test my modifications to the firmware.

Pin combos that need to be set high or low or floating to set the correct boot mode - the documentation for the MCU has many details.

Mostly I think people modifying Meshtastic are going to run with lots of serial debug, just so you know.

Do you have any suggestions for how people use serial debug for this modified firmware? The meshtastic firmware can be flashed from their website over USB serial, but its the default firmware.

If you’ve made changes to the code then you can add serial debug output - this is pretty standard stuff for an Arduino code base.

What sort of modifications have you made that need a full debugger for testing?

Gotcha I see you mean the Serial Arduino library.

I am attempting to interface a Blues Wireless Notecarrier XS with the Heltec via I2C. I believe I will need a full debugger to see if I am correctly parsing the LoRa messages received on the Heltec, and passing them on to the Notecarrier.

^^ this - if you have done Arduino for a few days you will see how ubiquitous this is.

I use a full debugger from many different MCU’s, but some devices don’t really facilitate this because it’s just not in the thinking of the board designers - which is a good proportion of Arduino boards.

Nick,

I may attempt the serial debug method you have described. Do you know any resources to guide me in flashing modified Meshtastic firmware over the traditional USBC connection? I figured I can undergo a similar process to the debug probe through the PlatformIO extension of VSCode.

Just flash it using PIO - it’s all setup to do this out the box. The PIO docs will help you with the details but it’s just about clicking on the Upload option.