Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: [1] 2  Send TopicPrint
Very Hot Topic (More than 25 Replies) OLIMEX J-TAG Debugger for ESP32 (Read 2479 times)
Marco (Italy)
Full Member
***
Offline


Posts: 190
Joined: Jul 12th, 2019
OLIMEX J-TAG Debugger for ESP32
Sep 22nd, 2024 at 12:12pm
Print Post  
Good morning I am thinking of buying Olimex j-tag for debugging esp32. I have tried everything to use the EPS-PROG debug but have not succeeded. I will try to see if it works with Olimex VM. What do you recommend?
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2697
Joined: Feb 13th, 2019
Re: OLIMEX J-TAG Debugger for ESP32
Reply #1 - Sep 23rd, 2024 at 11:47am
Print Post  
The Olimex ARM USB TINY probe is supported in Visual Micro and we can offer assistance for other Olimex JTAG probes.

The ESP-PROG should work well with an ESP32 board in Visual Micro, so it could be there are configuration issues or driver issues with that as opposed to it being a problem in and of itself.  Depending on the ESP32 target board there can be various additional steps to get debugging running correctly.

Could you describe what issue you run into with the ESP-PROG?

If you can enable the options shown at the top of the page, along with vMicro > Uploader > Verbose, and attach/email the complete build output after trying to use Debug > Start with the ESP-PROG we will be able to assist more easily.
  
Back to top
IP Logged
 
Marco (Italy)
Full Member
***
Offline


Posts: 190
Joined: Jul 12th, 2019
Re: OLIMEX J-TAG Debugger for ESP32
Reply #2 - Sep 23rd, 2024 at 5:23pm
Print Post  
Hi Simon
Here my attch verbose output
« Last Edit: Sep 23rd, 2024 at 6:09pm by Simon@Visual Micro »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2697
Joined: Feb 13th, 2019
Re: OLIMEX J-TAG Debugger for ESP32
Reply #3 - Sep 23rd, 2024 at 6:15pm
Print Post  
Thanks for the log, We've reformatted it to be an attachment as it makes the forum easier to read, and to review the log files (they don't always format properly when contained within forum posts).

The error shows it cannot find your ESP-PROG device to perform the upload (and this will also affect the debugging).

Have you installed the WinUSB Driver for Interface 0 of it using the Zadig tool?
Zadig Driver Installation Guide
« Last Edit: Sep 23rd, 2024 at 6:17pm by Simon@Visual Micro »  
Back to top
IP Logged
 
Marco (Italy)
Full Member
***
Offline


Posts: 190
Joined: Jul 12th, 2019
Re: OLIMEX J-TAG Debugger for ESP32
Reply #4 - Sep 24th, 2024 at 4:57am
Print Post  
Hi Simon
I have installed the FDTI driver and the outpu now is this

Debugger: ESP32 PROG
Compiling 'ESP32_WROOM_V1' for 'ESP32-WROOM-DA Module (esp32_esp32da)'
 
Program size: 240601 bytes (used 18% of a 1310720 byte maximum) (3,22 secs)
Minimum Memory Usage: 21976 bytes (7% of a 327680 byte maximum)
 
Uploading 'ESP32_WROOM_V1' to 'ESP32-WROOM-DA Module (esp32_esp32da)' using 'ESP32 PROG'
Uploader started for board ESP32-WROOM-DA Module (esp32_esp32da)
Uploader will use programmer name: esp32prog
C:\ProgramData\vmicro\tools\openocd-espressif-esp32-10.0.1\bin\openocd.exe -d2 -s s/" -f "interface/ftdi/minimodule-lowcost.cfg" -f "board/esp-wroom-32.cfg" -c "echo -n {****[vMicro]**** Uploading App :}" -c "telnet_port disabled; program s/partitions/boot_app0.bin} 0xe000" -c "echo -n {****[vMicro]**** Uploading Bootloader :}" -c "program SP32_WROOM_V1.ino.bootloader.bin} 0x1000" -c "echo -n {****[vMicro]**** Uploading Sketch :}" -c "program SP32_WROOM_V1.ino.bin} 0x10000" -c "echo -n {****[vMicro]**** Uploading Partitions :}" -c "program SP32_WROOM_V1.ino.partitions.bin} 0x8000 reset; shutdown"
Open On-Chip Debugger  v0.10.0-esp32-20190313 (2019-03-13-09:57)
Licensed under GNU GPL v2
For bug reports, read
     http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
adapter speed: 2000 kHz
Info : Configured 2 cores
esp32 interrupt mask on
****[vMicro]**** Uploading App :Info : clock speed 2000 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Error during upload using programmer
The uploader process failed

The uploader process failed
The uploader returned an error
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Debug controller 1 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 1 was reset (pwrstat=0x5F, after clear 0x0F).
Info : Listening on port 3333 for gdb connections
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : Target halted. PRO_CPU: PC=0x400F2E06 (active)    APP_CPU: PC=0x4000D02D 
Error: cpu0: xtensa_write_memory (line 802): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: xtensa_write_memory (line 802): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: xtensa_write_memory (line 802): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Warn : esp32: Failed writing 4 bytes at address 0x3ff48000, data - 00, 20, 49, 9c, 4c, 00, 00, 00
Error: xtensa_write_uint32_list: error writing to 3ff48000
Warn : esp32_soc_reset xtensa_write_uint32_list (reg_value_pairs_pre) err=-4
in procedure 'program'
embedded:startup.tcl:480: Error: ** Unable to reset target **
in procedure 'program' 
in procedure 'program_error' called at file "embedded:startup.tcl", line 505
at file "embedded:startup.tcl", line 480
Warn : Flash driver of esp32.flash does not support free_driver_priv()
Warn : Flash driver of irom does not support free_driver_priv()
Warn : Flash driver of drom does not support free_driver_priv()
  
Back to top
 
IP Logged
 
Marco (Italy)
Full Member
***
Offline


Posts: 190
Joined: Jul 12th, 2019
Re: OLIMEX J-TAG Debugger for ESP32
Reply #5 - Sep 24th, 2024 at 5:09am
Print Post  
In attach the zadig output
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2697
Joined: Feb 13th, 2019
Re: OLIMEX J-TAG Debugger for ESP32
Reply #6 - Sep 24th, 2024 at 10:09am
Print Post  
Thanks for the output, please attach it as text files to make it easier to use.

Can you try adding a local board.txt to your project (vMicro > Add Code > Add Local Board.txt), and paste in the below lines:
tools.openocd.upload.path={runtime.tools.openocd-esp32-0.10.1-2021.11.11.path}
tools.openocd.program.path={runtime.tools.openocd-esp32-0.10.1-2021.11.11.path}

Then try the build and upload again?

NOTE: The upload can be done via USB (without the ESP-PROG), and the debugging can still be started using the ESP-PROG.  Simply set the vMicro > Uploader > Hardware Programmer: No Programmer (Default) before performing the build and upload.
  
Back to top
IP Logged
 
Marco (Italy)
Full Member
***
Offline


Posts: 190
Joined: Jul 12th, 2019
Re: OLIMEX J-TAG Debugger for ESP32
Reply #7 - Sep 25th, 2024 at 6:19am
Print Post  
Hi Simon
I have add the board.txt
and this is issue report

in attach the board.txt file

Debugger: ESP32 PROG
Compiling 'ESP32_WROOM_V1' for 'ESP32-WROOM-DA Module (esp32_esp32da)'
 
Program size: 240441 bytes (used 18% of a 1310720 byte maximum) (4,82 secs)
Minimum Memory Usage: 21976 bytes (7% of a 327680 byte maximum)
 
Uploading 'ESP32_WROOM_V1' to 'ESP32-WROOM-DA Module (esp32_esp32da)' using 'ESP32 PROG'
Uploader started for board ESP32-WROOM-DA Module (esp32_esp32da)
Uploader will use programmer name: esp32prog
 
 
Downloading tool to -2021.11.11.zip
Installing tool. License: OpenOCD - (GNU GENERAL PUBLIC LICENSE 2.0)
C:\ProgramData\vmicro\tools\openocd-esp32-0.10.1-2021.11.11\bin\openocd.exe -d2 -s ts/" -f "interface/ftdi/minimodule-lowcost.cfg" -f "board/esp-wroom-32.cfg" -c "echo -n {****[vMicro]**** Uploading App :}" -c "telnet_port disabled; program s/partitions/boot_app0.bin} 0xe000" -c "echo -n {****[vMicro]**** Uploading Bootloader :}" -c "program SP32_WROOM_V1.ino.bootloader.bin} 0x1000" -c "echo -n {****[vMicro]**** Uploading Sketch :}" -c "program SP32_WROOM_V1.ino.bin} 0x10000" -c "echo -n {****[vMicro]**** Uploading Partitions :}" -c "program SP32_WROOM_V1.ino.partitions.bin} 0x8000 reset; shutdown"
Open On-Chip Debugger  v0.10.0-esp32-20211111 (2021-11-10-21:40)
Licensed under GNU GPL v2
For bug reports, read
     http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
WARNING: boards/esp-wroom-32.cfg is deprecated, and may be removed in a future release.
****[vMicro]**** Uploading App :Error: An adapter speed is not selected in the init script. Insert a call to adapter_khz or jtag_rclk to proceed.
** OpenOCD init failed **
shutdown command invoked
Assertion failed!
Program: C:\ProgramData\vmicro\tools\openocd-esp32-0.10.1-2021.11.11\bin\openocd.exe
File: ../src/jtag/core.c, Line 343
Expression: jtag_trst == 0
Error during upload using programmer
The uploader process failed

The uploader process failed
The uploader returned an error
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2697
Joined: Feb 13th, 2019
Re: OLIMEX J-TAG Debugger for ESP32
Reply #8 - Sep 25th, 2024 at 9:33am
Print Post  
Thanks for the update.

If you replace the content of your local board.txt with the attached it will set the adapter speed as required.
  

Please Register or Login to the Forum to see File Attachments
Back to top
IP Logged
 
Marco (Italy)
Full Member
***
Offline


Posts: 190
Joined: Jul 12th, 2019
Re: OLIMEX J-TAG Debugger for ESP32
Reply #9 - Sep 26th, 2024 at 11:57am
Print Post  
hi Simon
I have add the board.tx

     http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
****[vMicro]**** Uploading App :Error: An adapter speed is not selected in the init script. Insert a call to adapter_khz or jtag_rclk to proceed.
** OpenOCD init failed **
shutdown command invoked
Assertion failed!
Program: C:\ProgramData\vmicro\tools\openocd-esp32-0.10.1-2021.11.11\bin\openocd.exe
File: ../src/jtag/core.c, Line 343
Expression: jtag_trst == 0
Error during upload using programmer
The uploader process failed

The uploader process failed
The uploader returned an error
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2697
Joined: Feb 13th, 2019
Re: OLIMEX J-TAG Debugger for ESP32
Reply #10 - Sep 26th, 2024 at 1:55pm
Print Post  
Thanks for the update, apologies I had put the wrong pattern name in.

If you paste in the below content into the local board.txt, and then restart Visual Studio, it should take effect for the next upload and debugging session.
  

Please Register or Login to the Forum to see File Attachments
Back to top
IP Logged
 
Marco (Italy)
Full Member
***
Offline


Posts: 190
Joined: Jul 12th, 2019
Re: OLIMEX J-TAG Debugger for ESP32
Reply #11 - Sep 26th, 2024 at 2:22pm
Print Post  
Hi Simon
I have set f2232 dual Rs232 as reported in your web page.

not work again

debug_level: 2
adapter speed: 2000 kHz
Error during upload using programmer
The uploader process failed

The uploader process failed
The uploader returned an error
****[vMicro]**** Uploading App :Info : clock speed 2000 kHz
Info : JTAG tap: esp32s2.cpu tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: auto0.tap tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 5 -expected-id 0x120034e5"
Info : esp32s2: Debug controller was reset.
Info : esp32s2: Core was reset.
Info : Listening on port 3333 for gdb connections
Info : JTAG tap: esp32s2.cpu tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: auto0.tap tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Error: esp32s2: DSR (80208413) indicates DIR instruction generated an exception!
Info : esp32s2: Target halted, PC=0x400F06BA, debug_reason=00000000
Error: esp32s2: DSR (8000CC13) indicates DIR instruction generated an exception!
Warn : esp32s2: Failed writing 4 bytes at address 0x3f41f064
Error: Failed to write ESP32_S2_TIMG0WDT_PROTECT (-4)!
Error: esp32s2: DSR (8000CC13) indicates DIR instruction generated an exception!
Warn : esp32s2: Failed writing 4 bytes at address 0x3f4080bc
Error: Failed to write ESP32_S2_STORE4 (-4)!
embedded:startup.tcl:449: Error: ** Unable to reset target **
in procedure 'program' 
in procedure 'program_error' called at file "embedded:startup.tcl", line 486
at file "embedded:startup.tcl", line 449
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2697
Joined: Feb 13th, 2019
Re: OLIMEX J-TAG Debugger for ESP32
Reply #12 - Sep 26th, 2024 at 2:26pm
Print Post  
Please set the uploader and the debugger to ESP32-PROG as this is the probe you are trying to use.

When sending output please ensure the complete output is attached as a text file, including the build and the upload outputs.

You can perform the upload via the normal USB route when debugging, by simply setting the vMicro > Uploader > Hardware Programmer to "No Programmer (Default)".  This may be simpler to begin with to get the debugging working which I believe is the main aim.

Also please confirm which board you are working on as it was the ESP32-WROOM-DA but the latest snippet seems to show an ESP32S2.
« Last Edit: Sep 26th, 2024 at 2:27pm by Simon@Visual Micro »  
Back to top
IP Logged
 
Marco (Italy)
Full Member
***
Offline


Posts: 190
Joined: Jul 12th, 2019
Re: OLIMEX J-TAG Debugger for ESP32
Reply #13 - Sep 26th, 2024 at 2:46pm
Print Post  
Hi Simon
my board is ESP32-DevKitC V4
with ESP32-WROOM-32E

Now the upload work, there is a issue at starting debug
in attach microbuld.

  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Marco (Italy)
Full Member
***
Offline


Posts: 190
Joined: Jul 12th, 2019
Re: OLIMEX J-TAG Debugger for ESP32
Reply #14 - Sep 26th, 2024 at 2:48pm
Print Post  
in attach the debug output
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2697
Joined: Feb 13th, 2019
Re: OLIMEX J-TAG Debugger for ESP32
Reply #15 - Sep 26th, 2024 at 3:06pm
Print Post  
Thanks for the detail and glad the upload is now working.

Can you attach the "ESP32_WROOM_V1.ino_DebugOpenOCD.log" log file from the build folder?
« Last Edit: Sep 26th, 2024 at 3:06pm by Simon@Visual Micro »  
Back to top
IP Logged
 
Marco (Italy)
Full Member
***
Offline


Posts: 190
Joined: Jul 12th, 2019
Re: OLIMEX J-TAG Debugger for ESP32
Reply #16 - Sep 26th, 2024 at 3:49pm
Print Post  
Sorry Simon
but I can't find the ESP32_WROOM_V1.ino_DebugOpenOCD.log

where can i find it?

Grin
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2697
Joined: Feb 13th, 2019
Re: OLIMEX J-TAG Debugger for ESP32
Reply #17 - Sep 26th, 2024 at 4:14pm
Print Post  
If you search the output window for "Build Folder" then Ctrl+Click on the link next to it it will open the folder where the log should be.


Build Folder: file:///C:/Users/Marco/AppData/Local/Temp/VMBuilds/ESP32_WROOM_V1/esp32_esp32da/...
« Last Edit: Sep 26th, 2024 at 4:17pm by Simon@Visual Micro »  
Back to top
IP Logged
 
Marco (Italy)
Full Member
***
Offline


Posts: 190
Joined: Jul 12th, 2019
Re: OLIMEX J-TAG Debugger for ESP32
Reply #18 - Sep 26th, 2024 at 4:35pm
Print Post  
ok 
the file is in attach
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Marco (Italy)
Full Member
***
Offline


Posts: 190
Joined: Jul 12th, 2019
Re: OLIMEX J-TAG Debugger for ESP32
Reply #19 - Sep 27th, 2024 at 2:26pm
Print Post  
Hi Simon, some news? the request file is in attach below this post
Grin Grin
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint