-
Notifications
You must be signed in to change notification settings - Fork 134
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 - QIO flash configuration vs software breakpoints (OCD-940) #326
Comments
No, I didn't change the appimage offset. A completely basic "blink" project.
|
Interesting, I tried blink + QIO config, and it works well. Can you run OpenOCD like below and share the log.txt file?
|
Hi! I have attached the diary. Thank you very much for your help! |
Thanks. I will check it later today. |
It seems that there may be a hardware problem behind the strange behavior. I have attached the boot logos: "Faulty" ESP32, unable to turn on QIO mode:
Faultless ESP32 before debugging:
Faultless ESP32, after debugging and creating a software breakpoint:
|
Yes, I can confirm there is a bug related to QIO mode. Breakpoint locations in flash are being replaced with either 0xFF or 0x00, causing the following instruction fetches to fail and leading to image corruption. In the stub_flasher init maybe we should force to DIO mode and turn back to original mode, or properly init for every mode. I need to check that part. But it may take time. |
Thank you very much for your work! |
Development Kit
ESP32-DevkitC
Module or chip used
ESP32-WROOM-32
Debug Adapter
ESP-PROG
OpenOCD version
v0.12.0-esp32-20240318
Operating System
Windows 10
Using an IDE ?
Visual Studio Code, VisualGDB, custom configured Qt Creator 13
OpenOCD command line
openocd.exe -c "gdb_port 3333" -s C:/esp/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/share/openocd/scripts -f C:/esp/tools/openocd-esp32/v0.12.0-esp32-20240318/openocd-esp32/share/openocd/scripts/board/esp32-wrover-kit-1.8v.cfg
JTAG Clock Speed
default
ESP-IDF version
release/v5.2
Problem Description
Hello!
I use ESP-PROG JTAG programmer for ESP32-WROOM module and noticed an unusual phenomenon:
If I set the module flash configuration to QIO, I cannot create a software breakpoint.
In addition, several error messages appear when connecting OpenOCD in this case:
The two hardware breakpoints work perfectly, however, when creating a third - software - breakpoint, the following message appears:
If I reset the flash configuration to DIO, everything is OK; and OpenOCD errors also disappear.
By the way, the uploaded program works perfectly even with QIO mode, only debugging is problematic.
To reproduce the behavior I copied the base 'blink' project and switched the flash to QIO.
Of course, I don't use the extra GPIOs used by QIO for anything.
The Init-commands are:
This is known normal behavior for QIO; or malfunction?
Many thanks!
Debug Logs
Expected behavior
Ability to create software breakpoints as usual.
Screenshots
No response
The text was updated successfully, but these errors were encountered: