JTAG Flashing -- Reset Bootloader?

tpayne03
Posts: 19
Joined: Thu Oct 05, 2017 8:24 pm

JTAG Flashing -- Reset Bootloader?

Postby tpayne03 » Thu Oct 05, 2017 8:28 pm

Hi,

Sorry, I am not familiar with ESP32 I'm coming ARM & 8051 development. I'm looking to build a custom board, but not implement the USB to Serial portion. I get the layout, but I am a little unclear on the programming.

I understand must people are programming the thing via USB, but for your application it would be in a waterproof enclosure so we would not have an exposed USB port. I want to use JTAG ports to program the board on the assembly line.

I have one unclear situation:

1)Putting the ESP32 Into The Bootloader / Flashing Mode
If you use JTAG to flash an application using OpenOCD, do you still need to pull the ESP32 into the programming mode (the sequence you pull certain pins high and low)?

It seems like the USB tools generate the correct logic, so you don't need to mess with the button pressing. Is it the same with JTAG?

Thanks,

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: JTAG Flashing -- Reset Bootloader?

Postby ESP_Angus » Fri Oct 06, 2017 6:02 am

Hi Tim,
tpayne03 wrote: 1)Putting the ESP32 Into The Bootloader / Flashing Mode
If you use JTAG to flash an application using OpenOCD, do you still need to pull the ESP32 into the programming mode (the sequence you pull certain pins high and low)?
No, this is not necessary for JTAG flashing. These bootstrapping pins are for resetting into the serial bootloader/flashing mode (where the ESP32 resets into a mode which runs a serial bootloader located in mask ROM and communicates over serial with the host programmer.)

Provided JTAG is not disabled on the ESP32 (it can be disabled by burning an efuse) and the JTAG pins are available, openocd should be able to reset & halt the ESP32 and then program the flash.
tpayne03 wrote: I want to use JTAG ports to program the board on the assembly line.
Note that rather than breaking out JTAG, you could also choose to break out the serial UART pins and GPIO0 (for selecting bootloader mode) and connect a 3.3V TTL serial interface instead of a JTAG adapter. This would allow you to program the ESP32 in the factory using esptool.py, ie the same process used when programming a development board with an integrated USB/serial chip.

It's up to you. I suggest experimenting with both approaches on your development hardware and deciding which one is more convenient for your particular configuration.

Who is online

Users browsing this forum: No registered users and 96 guests