Closed jeroenommering closed 6 months ago
@jeroenommering Typically I set adapter speed to 5Mhz when I use jlink.
This is a custom board. So, what is your flash chip manufacturer?
Can you try below command and send us the output.
openocd-esp32\bin\openocd.exe -f interface/jlink.cfg -f target/esp32c2_fast.cfg -c "init; esp stub_log on; program_esp ESP32C2-2MB_ESP-AT_UART0_TX20_RX19_no_console_V03030000.bin 0x0 verify exit"
Hi Erhan,
Thanks for your response. The exact processor reference is the ESP8684H2. Meanwhile, I think I found the real cause of the problem which seems to be the power supplied to the board during programming. I'm seeing large fluctuations and the reset may be caused by that. I did not have the opportunity to investigate further but for now, I will close the issue.
Development Kit
Custom board
Module or chip used
ESP32-C2
Debug Adapter
J-Link / JTAG
OpenOCD version
v0.12.0-esp32-20240318
Operating System
Windows
Using an IDE ?
no, running OpenOCD32 from the command line
OpenOCD command line
openocd-esp32\bin\openocd.exe -f interface/jlink.cfg -f target/esp32c2_fast.cfg -c "init; program_esp ESP32C2-2MB_ESP-AT_UART0_TX20_RX19_no_console_V03030000.bin 0x0 verify exit"
JTAG Clock Speed
1MHz, 4MHz, ....
ESP-IDF version
not applicable
Problem Description
I am trying to (re-)program the ESP32-C2. No debugging is involved.
Today I updated to the newest version of OpenOCD32. I already had the problem with the version from april 2023.
The two configuration files specified at the command line are those that come with the latest release. The only modification is the addition of a line that set the interface speed.
1) Power on the ESP 2) Run the command line specified above. The .bin is similar to the default ESP-AT firmware.
Attached is the log file obtained by adding -d3 to the command line
openocd_log.txt
Debug Logs
Expected behavior
I expect to be able to successfully program the ESP32-C2 every time I run the programming command
Screenshots
No response