-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32-C6 Debugging with USB-Serial-Jtag (OCD-893) #315
Comments
Hi
|
Thanks for the response,
1. Yes, I have flashed the app binary to flash.
2.
After setting an application image offset explicitly with the OpenOCD command(-s openocd -f board/esp32c6-builtin.cfg -c "init; halt; esp appimage_offset 0x210000") it is not entering into debug mode and showing some errors which are mentioned below.
[cid:b0376b06-48ad-40c7-ade4-bcf9dc77e716]
1.
Being new to this I didn't understand why I am getting this type or errors. Please help me to solve this errors.
Thanks & Regards,
D. Vineetha.
…________________________________
From: Alexey Gerenkov ***@***.***>
Sent: 07 February 2024 14:50
To: espressif/openocd-esp32 ***@***.***>
Cc: vineetha D ***@***.***>; Author ***@***.***>
Subject: Re: [espressif/openocd-esp32] ESP32-C6 Debugging with USB-Serial-Jtag (OCD-893) (Issue #315)
Hi
1. Have you flash app binary to flash?
2. There is a warning message with the possible solution following the error. If your app binary or partition table were written to flash at the non-default offsets you need to specify it using appimage_offset command. See https://github.com/espressif/openocd-esp32/wiki/Troubleshooting-FAQ#openocd-reports-a-flasher-stub-running-problem-because-of-the-application-binary-location
—
Reply to this email directly, view it on GitHub<#315 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BCDFQCEQAVEML7IQL67QGUDYSNBOJAVCNFSM6AAAAABCZZNDTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZRGYYTCMBQGE>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Sorry for that . Is it clear ?.
…________________________________
From: vineetha D ***@***.***>
Sent: 08 February 2024 11:11
To: espressif/openocd-esp32 ***@***.***>
Subject: Re: [espressif/openocd-esp32] ESP32-C6 Debugging with USB-Serial-Jtag (OCD-893) (Issue #315)
Thanks for the response,
1. Yes, I have flashed the app binary to flash.
2.
After setting an application image offset explicitly with the OpenOCD command(-s openocd -f board/esp32c6-builtin.cfg -c "init; halt; esp appimage_offset 0x210000") it is not entering into debug mode and showing some errors which are mentioned below.
[cid:b0376b06-48ad-40c7-ade4-bcf9dc77e716]
1.
Being new to this I didn't understand why I am getting this type or errors. Please help me to solve this errors.
Thanks & Regards,
D. Vineetha.
________________________________
From: Alexey Gerenkov ***@***.***>
Sent: 07 February 2024 14:50
To: espressif/openocd-esp32 ***@***.***>
Cc: vineetha D ***@***.***>; Author ***@***.***>
Subject: Re: [espressif/openocd-esp32] ESP32-C6 Debugging with USB-Serial-Jtag (OCD-893) (Issue #315)
Hi
1. Have you flash app binary to flash?
2. There is a warning message with the possible solution following the error. If your app binary or partition table were written to flash at the non-default offsets you need to specify it using appimage_offset command. See https://github.com/espressif/openocd-esp32/wiki/Troubleshooting-FAQ#openocd-reports-a-flasher-stub-running-problem-because-of-the-application-binary-location
—
Reply to this email directly, view it on GitHub<#315 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BCDFQCEQAVEML7IQL67QGUDYSNBOJAVCNFSM6AAAAABCZZNDTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZRGYYTCMBQGE>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
@Vineetha1705 We couldn't see the picture. Can you attach it again? Also, can you send OpenOCD logs? You will add And it would be good to see application start log screen and partition_table.csv. |
This is the output log before adding -d3 -1 log.txt to the end of the config options. Open On-Chip Debugger v0.12.0-esp32-20230921 (2023-09-21-13:40) This is the output after adding -d3 -1 log.txt to the end of the config options. Open On-Chip Debugger v0.12.0-esp32-20230921 (2023-09-21-13:40) Debug: 84 13 command.c:151 script_debug(): command - esp32c6 configure -event examine-end Debug: 85 13 command.c:151 script_debug(): command - esp32c6 configure -event reset-assert-post Debug: 86 13 command.c:151 script_debug(): command - esp32c6 configure -event gdb-attach
Debug: 87 14 command.c:151 script_debug(): command - esp32c6 configure -event gdb-detach Debug: 88 14 command.c:151 script_debug(): command - riscv set_reset_timeout_sec 2 And most of the times I am getting error like "openocd timed out failed". Thanks & Regards, |
In summary, now you have 2 kinds of issues. Looks strange. They are not related to me. Error: esp32c6.CPU: IR capture error; saw 0x1f not 0x01 usually points to the jtag pins connection or cable problem. Might be also a driver issue. This is windows and drivers can be mixed up. Can you try the hello-world example without setting appimage_offset just to be sure your setup is OK? |
Thanks for the quick response, How can I know if it is a driver issue? #include <stdio.h> void app_main(void) Info : accepting 'gdb' connection on tcp/3333 Thread Error: [esp32c6] not halted (add breakpoint) After changing the cable also getting same errors as below. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
|
@Vineetha1705 Can you set your flash size to 4MB and try again? From SDK configuration - Serial flasher config → Flash size |
Yes, Now esp32c6 is entering into the debug mode but sometimes it is not entering into the debug mode showing some errors which are mentioned below. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html Error in final launch sequence Thanks & Regards, |
I can reproduce the issue now. Will come up with a solution soon. |
I have added additional rom symbol file to the Debugger/Commands like below. You need to change
Can you try and let us know the result? cc @alirana01 |
If I add this command "add-symbol-file C:\Espressif\tools\esp-rom-elfs\20230320\esp32c6_rev0_rom.elf" getting errors otherwise working fine. And why we need to set flash size 4MB ? |
And why we need to set flash size 4MB ? OpenOCD stub flasher access to the flash through cache. It is related to cache configuration. Some settings like mmu_page_size change according to the flash size. Stub flasher configures the cache for the 4MB or bigger flash. It is not adaptive to the smaller flash yet. In my todo list. So as I understand we can close this issue. Right? |
Yes, Thank you so much.
Thanks & Regards,
D. Vineetha.
…________________________________
From: Erhan Kurubas ***@***.***>
Sent: 22 February 2024 19:00
To: espressif/openocd-esp32 ***@***.***>
Cc: vineetha D ***@***.***>; Mention ***@***.***>
Subject: Re: [espressif/openocd-esp32] ESP32-C6 Debugging with USB-Serial-Jtag (OCD-893) (Issue #315)
And why we need to set flash size 4MB ?
OpenOCD stub flasher access to the flash through cache. It is related to cache configuration. Some settings like mmu_page_size change according to the flash size. Stub flasher configures the cache for the 4MB or bigger flash. It is not adaptive to the smaller flash yet. In my todo list.
So as I understand we can close this issue. Right?
—
Reply to this email directly, view it on GitHub<#315 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BCDFQCFQVVWTS72LCIR3RU3YU5B67AVCNFSM6AAAAABCZZNDTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJZGQ2TOOJVGA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hello , I'm using esp-idf plugin with Eclipse Ide & ESP32-C6 vboard. After updating master version to 5.3 debugging is going to failed. Info : accepting 'gdb' connection on tcp/3333 And same thing it was working with previous version 5.2. And i tried the same thing after incresing that launch timeout. |
Hello,
Can you set your flash size to 4MB and try again? From SDK configuration - Serial flasher config → Flash size.
…________________________________
From: NirajSiroya ***@***.***>
Sent: 14 March 2024 11:05
To: espressif/openocd-esp32 ***@***.***>
Cc: vineetha D ***@***.***>; Mention ***@***.***>
Subject: Re: [espressif/openocd-esp32] ESP32-C6 Debugging with USB-Serial-Jtag (OCD-893) (Issue #315)
Hello ,
@Vineetha1705<https://github.com/Vineetha1705> @erhankur<https://github.com/erhankur> can you please look on my issue too.
I'm using esp-idf plugin with Eclipse Ide & ESP32-C6 vboard.
After updating master version to 5.3 debugging is going to failed.
while using debug mode using ESP_IDF GDB OpenOCD Debugging i'm getting some issues that is listed below,
Info : accepting 'gdb' connection on tcp/3333
Error: no watchpoint at address 0x40825740 found
Error: timed out while waiting for target halted
Error executing event gdb-attach on target esp32c6:
C:\Users\user-id.espressif\tools\openocd-esp32\v0.12.0-esp32-20230921\openocd-esp32\share\openocd\scripts/target/esp_common.cfg:9: Error:
at file "C:\Users\user-id.espressif\tools\openocd-esp32\v0.12.0-esp32-20230921\openocd-esp32\share\openocd\scripts/target/esp_common.cfg", line 9
Error: Target not halted
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.
Error: attempted 'gdb' connection rejected
shutdown command invoked
And same thing it was working with previous version 5.2.
And i tried the same thing after incresing that launch timeout.
you can find that snapshot below.
image.png (view on web)<https://github.com/espressif/openocd-esp32/assets/159756945/12e458f5-eb22-4c79-96a5-ede96f786e09>
—
Reply to this email directly, view it on GitHub<#315 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BCDFQCHABADHXIZ6YWFA5WDYYEZIJAVCNFSM6AAAAABCZZNDTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJWGU3DENRVG4>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Thanks for the information . this issue arrising after updating of version to 5.3 |
Can you share debug configuration settings?
…________________________________
From: NirajSiroya ***@***.***>
Sent: 14 March 2024 12:46
To: espressif/openocd-esp32 ***@***.***>
Cc: vineetha D ***@***.***>; Mention ***@***.***>
Subject: Re: [espressif/openocd-esp32] ESP32-C6 Debugging with USB-Serial-Jtag (OCD-893) (Issue #315)
Thanks for the information .
As im using same only as 4MB.
this issue arrising after updating of version to 5.3
—
Reply to this email directly, view it on GitHub<#315 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BCDFQCD6GUKHGUDHGCOA453YYFFD3AVCNFSM6AAAAABCZZNDTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJWG4YTEMZTGM>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
You should give executable path for openocd in openocd setup->Executable path.
…________________________________
From: NirajSiroya ***@***.***>
Sent: 14 March 2024 12:50
To: espressif/openocd-esp32 ***@***.***>
Cc: vineetha D ***@***.***>; Mention ***@***.***>
Subject: Re: [espressif/openocd-esp32] ESP32-C6 Debugging with USB-Serial-Jtag (OCD-893) (Issue #315)
image.png (view on web)<https://github.com/espressif/openocd-esp32/assets/159756945/fabf496d-77ba-4828-9d23-d4d13dfae003>
—
Reply to this email directly, view it on GitHub<#315 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BCDFQCASFVFRRR6IDZQJH23YYFFVRAVCNFSM6AAAAABCZZNDTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJWG4ZDAOJRGY>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
No , im having 5.2 version in another system there it is working without path . |
once try it.
…________________________________
From: NirajSiroya ***@***.***>
Sent: 14 March 2024 13:14
To: espressif/openocd-esp32 ***@***.***>
Cc: vineetha D ***@***.***>; Mention ***@***.***>
Subject: Re: [espressif/openocd-esp32] ESP32-C6 Debugging with USB-Serial-Jtag (OCD-893) (Issue #315)
No , im having 5.2 version in another system there it is working without path .
—
Reply to this email directly, view it on GitHub<#315 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BCDFQCAU62ZFWKLHCTRTNGDYYFIMBAVCNFSM6AAAAABCZZNDTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJWG42TGMBRGE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I tried with Executable path. Launching command [F:\esp_work\dout_interrupt\build\Firmware.elf -c gdb_port 3333 -c telnet_port 4444 -c tcl_port 6666 -s C:\Users\niraj.siroya.espressif\tools\openocd-esp32\v0.12.0-esp32-20230921\openocd-esp32\bin/share/openocd/scripts -c set ESP32_FLASH_VOLTAGE 1.8 -f board/esp32c6-bridge.cfg -c program_esp_bins F:/esp_work/dout_interrupt/build flasher_args.json verify reset -c echo "Started by GNU MCU Eclipse"] failed. |
Can you send me the screenshots of which procedure are you following?.
…________________________________
From: NirajSiroya ***@***.***>
Sent: 14 March 2024 15:39
To: espressif/openocd-esp32 ***@***.***>
Cc: vineetha D ***@***.***>; Mention ***@***.***>
Subject: Re: [espressif/openocd-esp32] ESP32-C6 Debugging with USB-Serial-Jtag (OCD-893) (Issue #315)
I tried with Executable path.
after that im getting another error.
Error in services launch sequence
Launching command [F:\esp_work\dout_interrupt\build\Firmware.elf -c gdb_port 3333 -c telnet_port 4444 -c tcl_port 6666 -s C:\Users\niraj.siroya.espressif\tools\openocd-esp32\v0.12.0-esp32-20230921\openocd-esp32\bin/share/openocd/scripts -c set ESP32_FLASH_VOLTAGE 1.8 -f board/esp32c6-bridge.cfg -c program_esp_bins F:/esp_work/dout_interrupt/build flasher_args.json verify reset -c echo "Started by GNU MCU Eclipse"] failed.
Launching command [F:\esp_work\dout_interrupt\build\Firmware.elf -c gdb_port 3333 -c telnet_port 4444 -c tcl_port 6666 -s C:\Users\niraj.siroya.espressif\tools\openocd-esp32\v0.12.0-esp32-20230921\openocd-esp32\bin/share/openocd/scripts -c set ESP32_FLASH_VOLTAGE 1.8 -f board/esp32c6-bridge.cfg -c program_esp_bins F:/esp_work/dout_interrupt/build flasher_args.json verify reset -c echo "Started by GNU MCU Eclipse"] failed.
Cannot run program "F:\esp_work\dout_interrupt\build\Firmware.elf": Launching failed
—
Reply to this email directly, view it on GitHub<#315 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BCDFQCFI52HCA6NATBWWO7TYYFZOLAVCNFSM6AAAAABCZZNDTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJXGA4DOMZTGQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Are you using debugger as Esp USB bridge?.
…________________________________
From: NirajSiroya ***@***.***>
Sent: 14 March 2024 16:32
To: espressif/openocd-esp32 ***@***.***>
Cc: vineetha D ***@***.***>; Mention ***@***.***>
Subject: Re: [espressif/openocd-esp32] ESP32-C6 Debugging with USB-Serial-Jtag (OCD-893) (Issue #315)
this is my debug configuration.
image.png (view on web)<https://github.com/espressif/openocd-esp32/assets/159756945/622a8252-da83-443d-a192-0e87b73b9f53>
after changing to this one im getting below errors.
Error in final launch sequence
Failed to execute MI command:
-target-select remote localhost:3333
Error message from debugger back end:
localhost:3333: Connection timed out.
Failed to execute MI command:
-target-select remote localhost:3333
Error message from debugger back end:
localhost:3333: Connection timed out.
localhost:3333: Connection timed out.
—
Reply to this email directly, view it on GitHub<#315 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BCDFQCGRDN6BEYXJMRHKP33YYF7UFAVCNFSM6AAAAABCZZNDTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJXGE4DANRZGE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
yes , i'm using ESP_IDF usb only |
Sorry , I don't have idea about that. I worked using builtin jtag.
…________________________________
From: NirajSiroya ***@***.***>
Sent: 14 March 2024 16:56
To: espressif/openocd-esp32 ***@***.***>
Cc: vineetha D ***@***.***>; Mention ***@***.***>
Subject: Re: [espressif/openocd-esp32] ESP32-C6 Debugging with USB-Serial-Jtag (OCD-893) (Issue #315)
yes , i'm.
—
Reply to this email directly, view it on GitHub<#315 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BCDFQCE6UU4JREAAMCSR5NDYYGCNNAVCNFSM6AAAAABCZZNDTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJXGIZDSNRQGA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@NirajSiroya Please make sure that you are using onboard usb port to start debugging or bridge board as a debug probe from here. https://github.com/espressif/esp-usb-bridge For the on board usb_serial_jtag you must select And you don't need to set flash voltage as 1.8v. This parameter is only for the esp32 chips to set flash voltage via TDI pin during boot. Please select |
This is the errors , what i'm getting after enabling verbose output in debug configuration. Error in final launch sequence |
I suggest you to run debugging from the command line first. "idf.py openocd" and "idf.py gdb" commands are pretty helpful and for us it will be easier to understand what is going on. Then, you can be sure your env is working and switch to the IDE again. |
@erhankur Yes , Its working with command line . But as i'm not using command line tool So i wanted it works with eclipse ide also |
was this error specific to the c6? i'm getting something similar on the h2:
using openocd v0.12.0-esp32-20240726 |
@cmsd2 can you give a detail about the steps to reproduce the issue? |
EDIT: It turns out this was all a red herring the ESP32-C3 works find and doesn't have this issue. The real issue was leaving the D8 (GPIO8) pin floating, which was causing inconsistent behavior. Pulling it high made everything work. In my case, things just happened to work after I changed Flash Size.
|
@mnigbor Flash size issue was related to ESP32-C6 and H2 and it is fixed at this release
I am not aware that we have the same issue on ESP32-C3 and ESP32-S3. Please create a new issue with the OpenOCD logs and details of your hardware and application config. |
Development Kit
ESP32-C6-DevKitM
Module or chip used
ESP32-C6
Debug Adapter
Builtin USB-JTAG
OpenOCD version
v0.12.0-esp32-20230921
Operating System
Windows
Using an IDE ?
Espressif ide
OpenOCD command line
-s ${openocd_path}/share/openocd/scripts -f board/esp32c6-builtin.cfg
JTAG Clock Speed
Default
ESP-IDF version
v5.1.2
Problem Description
3.It is not entering into debug instead showing error like failed to get flash maps(6) in console.
Debug Logs
No response
Expected behavior
Esp32c6 should enter into debug mode without any errors.
Screenshots
The text was updated successfully, but these errors were encountered: