Sysprogs forums › Forums › VisualGDB › Unable to flash ESP32-WROOM
- This topic has 2 replies, 2 voices, and was last updated 7 years, 2 months ago by motojake.
-
AuthorPosts
-
September 4, 2017 at 17:33 #12280motojakeParticipant
Hello VisualGDB friends,
I have a problem where I’m unable to flash the ESP32 module directly (without a devkit)
Hardware: ESP-32 WROOM
Debugger: Segger J-Link
Operating System: Windows 10
Programming software: Visual Studio 2017 w/ VisualGDBConnections:
J-LINK — ESP32-WROOM
1(VTref) — 3.3V rail
3(nTRST) — EN
4(GND) — GND
5(TDI) — IO12
7(TMS) — IO14
9(TCK) — IO13
11(RTCK) — GND
13(TDO) — IO15Nothing else is connected to the ESP32-WROOM module.
3.3V and GND are powered by a breadboard power supply adapter and 12V 750mA supply so I don’t think there are any current issues.
When attempting to program it, I receive the following message from VisualGDB: “Custom FLASH programming step failed”
The ESP32 seems to be detected, based on the logs. I get the same message whether or not IO0 is held low on boot.
Attached are my openocd logs:
<div>Open On-Chip Debugger 0.9.0 (2017-05-09)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport “jtag”.
To override use ‘transport select <transport>’.
adapter speed: 3000 kHz
Info : No device selected, using first device.
Info : J-Link V9 compiled Apr 22 2016 11:47:06
Info : Hardware version: 9.30
Info : VTarget = 3.217 V
Info : clock speed 3000 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0
x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0
x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset (pwrstat=0x5F, aft
er clear 0x0F).
Info : esp32.cpu0: Core was reset (pwrstat=0x5F, after clear 0x0
F).
Info : accepting ‘gdb’ connection on tcp/3333
Interrupt suppression during single-stepping is now enabled
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0
x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0
x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Core was reset (pwrstat=0x1F, after clear 0x0
F).
Info : esp32.cpu0: Target halted, pc=0x40000400
Warn : esp32.cpu1: target not halted
in procedure ‘reset’
in procedure ‘ocd_bouncer’
in procedure ‘ocd_process_reset’
in procedure ‘ocd_process_reset_inner’ called at file “embedded:
startup.tcl”, line 248
in procedure ‘esp32.cpu0’ called at file “embedded:startup.tcl”,
line 349
in procedure ‘ocd_bouncer’esp32.cpu0: target state: halted
Target did not halt within 5000 msecInfo : esp32.cpu0: Target halted, pc=0x40090DF8
esp32.cpu0: target state: halted
Warn : negative acknowledgment, but no packet pending
Warn : negative acknowledgment, but no packet pending
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0
x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0
x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Core was reset (pwrstat=0x1F, after clear 0x0
F).
Info : esp32.cpu0: Target halted, pc=0x40000400
Warn : esp32.cpu1: target not halted
in procedure ‘reset’
in procedure ‘ocd_bouncer’
in procedure ‘ocd_process_reset’
in procedure ‘ocd_process_reset_inner’ called at file “embedded:
startup.tcl”, line 248
in procedure ‘esp32.cpu0’ called at file “embedded:startup.tcl”,
line 349
in procedure ‘ocd_bouncer’esp32.cpu0: target state: halted
Target did not halt within 5000 msecInfo : esp32.cpu0: Target halted, pc=0x40090DF8
esp32.cpu0: target state: halted
Warn : negative acknowledgment, but no packet pending
Warn : negative acknowledgment, but no packet pending
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0
x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0
x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Core was reset (pwrstat=0x1F, after clear 0x0
F).
Info : esp32.cpu0: Target halted, pc=0x40000400
Warn : esp32.cpu1: target not halted
in procedure ‘reset’
in procedure ‘ocd_bouncer’
in procedure ‘ocd_process_reset’
in procedure ‘ocd_process_reset_inner’ called at file “embedded:
startup.tcl”, line 248
in procedure ‘esp32.cpu0’ called at file “embedded:startup.tcl”,
line 349
in procedure ‘ocd_bouncer’esp32.cpu0: target state: halted</div>
If it’s worth adding, I have been able to program the DevkitC using this programmer in the past, however I have not attempted to with another ESP32-WROOM module yet.
I’d appreciate any help that can be provided.
Thanks!
September 4, 2017 at 20:35 #12290supportKeymasterHi,
Please try updating to VisualGDB 5.3 Preview 8 and installing the latest ESP32 toolchain. It includes a FLASH programming mechanism provided by Espressif that might be more tolerant to non-typical configurations (our FLASH programming algorithm was based on undocumented API). If it doesn’t work either, please attach both OpenOCD logs and the full gdb log to see which exact command fails and what error is related to the failing command.
September 6, 2017 at 01:05 #12304motojakeParticipantFollowup for anyone that comes across this later on google, support’s advice of simply updating to the new software took care of it, for the most part. I can now flash and use breakpoints, no worries. The only problem is that it seems to randomly throw exceptions even on the built in test programs. But that isn’t too bad since it (seemingly) continues to work afterwards.
Thanks for the quick help!
-
AuthorPosts
- You must be logged in to reply to this topic.