Forum Replies Created
-
AuthorPosts
-
vardParticipant
I’ve re-installed everything from scratch, I no longer get that error, and the debugger seems to stop just fine at the first breakpoint! I can even step through the code!
Very nice, many thanks!
vardParticipantHi,
I’ve downloaded and installed VGDB 5.4 Preview 4 and the latest ESP32 toolchain (R10) but now I have a different issue: I can’t see the debug configuration. Under the “Debug settings” tab, I’ve selected “Debug using ESP32 Devkit” but I got a “Failed To Display Configuration” error:
System.MissingMethodException: Method not found: ‘BSPEngine.IAdvancedProjectDebugContext BSPEngine.IBSPConfiguratorHost.get_AdvancedModeContext()’.
at OpenOCDPackage.OpenOCDSettingsEditor..ctor(IBSPConfiguratorHost host, String baseDir, OpenOCDSettings settings, KnownInterfaceInstance context, Boolean autoDetectDevice)
at ESP8266DebugPackage.ESPxxOpenOCDSettingsEditor..ctor(IBSPConfiguratorHost host, String baseDir, ESPxxOpenOCDSettings settings, KnownInterfaceInstance context, Boolean isESP32)
at ESP8266DebugPackage.GUI.ESPxxOpenOCDSettingsControl.SetConfiguration(Object configuration, KnownInterfaceInstance context)
at VisualGDB.Common_GUI.WPF.DebugMethodSettingsControl.Controller.set_SelectedItem(MethodOrDeviceItemBase value)vardParticipantThat’s very nice of you, thank you for going out of your way to help with this issue!
Looking forward to trying out the new preview release.vardParticipantFair enough, thanks again for all the help!
vardParticipantHmmm…. I’m still seeing some problems, but of a more or less different kind this time around: On a clean memory ESP32 (flash erased), I can do a Debug Test Settings from VisualGDB properties page and everything works fine. Then I program the chip and run the program, no problem. But if I make any changes in the code and try to program again, the debugger fails to connect and program the ESP32. I get an error: Failed to get flash maps(-1)!
The stub log looks like this:
c:\sysgcc\esp32\esp32-bsp\OpenOCD\bin\openocd.exe -c “gdb_port 55856” -c “telnet_port 55857” -f interface/ftdi/esp32_devkitj_v1.cfg -c “adapter_khz 3000” -f target/esp32.cfg -c “echo VisualGDB_OpenOCD_Ready”
Open On-Chip Debugger 0.9.0 (2018-07-30)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 3000 kHz
Info : auto-selecting first available session transport “jtag”. To override use ‘transport select <transport>’.
force hard breakpoints
VisualGDB_OpenOCD_Ready
Info : clock speed 3000 kHz
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=0x40009070 (active) APP_CPU: PC=0x400076DD
Info : accepting ‘gdb’ connection on tcp/55856
Info : Target halted. PRO_CPU: PC=0x4009170E (active) APP_CPU: PC=0x400076DD
Error: Failed to get flash maps (-1)!
Error: Failed to get flash mappings (-4)!
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 rejectedGoing back to the VisualGDB Project Properties page, I can no longer get a successful test, the test console window displays the same message as the above stub log.
The only way I can get this back to work is to use the ESP32 Download tool to erase the flash. After erasing the flash, the test works correctly and I can go ahead an program the chip:
c:\sysgcc\esp32\esp32-bsp\OpenOCD\bin\openocd.exe -c “gdb_port 55959” -c “telnet_port 55960” -f interface/ftdi/esp32_devkitj_v1.cfg -c “adapter_khz 3000” -f target/esp32.cfg -c “echo VisualGDB_OpenOCD_Ready”
Open On-Chip Debugger 0.9.0 (2018-07-30)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 3000 kHz
Info : auto-selecting first available session transport “jtag”. To override use ‘transport select <transport>’.
force hard breakpoints
VisualGDB_OpenOCD_Ready
Info : clock speed 3000 kHz
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 : esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
Info : accepting ‘gdb’ connection on tcp/55959
Info : Target halted. PRO_CPU: PC=0x40090616 (active) APP_CPU: PC=0x00000000
Info : Target halted. PRO_CPU: PC=0x4009170E (active) APP_CPU: PC=0x00000000
Info : Target halted. PRO_CPU: PC=0x4009170E (active) APP_CPU: PC=0x00000000
Info : Auto-detected flash size 4096 KB
Info : Using flash size 4096 KB
Info : dropped ‘gdb’ connection
Info : Restore debug stubs @ 0 on core0 of target ‘esp32’All seems to be working fine after that except… it no longer wants to stop to any break points (again)!
During debug I can go into the GDB Session window and try the Diagnose Breakpoint Problems button but the answer is “No breakpoint problems detected”
So it worked beautifully the first time I tried the latest OpenOCD versions, but now it’s doing the same thing as before, plus the programming issue (I have to erase the flash to program it).
I tried it on 3 different debuggers (I tried ESP32 Devkit, Olimex and Segger Jlink) and two ESP32 boards (Devkit and ESP core V2).
Any suggestions?
Thanks again for all the help and support!
vardParticipantAwesome ! Works like a charm! And thank you for taking your time to make the exe file, much appreciated!
vardParticipantYou are quite right, it was a project specific problem. I was trying to import an older IDF 2.1 project and I had an additional #include sdkconfig.h statement in one of the older header files.
Works well, now thank you very much!
vardParticipantThank you very much for the fast response, it looks like I had an issue with the toolchain and the path on my PC. I re-installed it and everything seems to be fine now.
All the best!vardParticipantI see… thank you!
vardParticipantLeft clicked on function, it appeared in the rightmost combo box, right clicked on the same function and here’s what I got: Snap Shot 2
vardParticipantIt is hosted on my Dropbox. You can right click on the link and select Open Image in a new tab.
vardParticipantThank you kindly for your fast reply.
The Preprocess Selected Lines command appears upon mouse right-click and is functional, but the Code Map is not.
Please see snap shot
- This reply was modified 7 years, 5 months ago by vard.
vardParticipantNot sure if you’ve read this, some good information here: LIMITATIONS OF THE ESP32 DEBUGGING
vardParticipantPlease disregard question number 2 regarding the breakpoints, I read “LIMITATIONS OF THE ESP32 DEBUGGING”, 2 breakpoints (no wonder it was crashing at 3!).
Thanks!
- This reply was modified 7 years, 6 months ago by vard.
vardParticipantThank you kindly for your response, you were quite right, I had a connection problem indeed (broken wire inside the shrink tube of the test wire).
Found it with the logic analyzer, all is good now!
I can now run the ESP32 Demo as per your latest tutorial, picked up the LED blinky as suggested. The Jlink / OpenOCD seems to be working fine now, but I still have a couple of very quick questions:
1 – I get some messages in the GDB session window, and I’m too sure I understand what they mean:
Warning: could not set a breakpoint on main. ‘Step into new instance’ will not work.
Indeed, after loading the program, the debugger does not stop at main as I believe it should (I’ve got Stepping into new instance (F10) will stop in: main checked).Cannot resolve the address of _estack. Skipping stack pointer validity check.
Obviously, if I un-check the box “Validate stack pointer when starting debugging” the warning goes away, but I would still like to understand what it means.
Any suggestions?
2 – What is the maximum number of hardware breakpoints I can have with Jlink/OpenOCD on ESP32? I tried 3 breakpoints and the debugger crashed. I know I’m wasting a breakpoint stopping at main at start-up, I will un-check the stop at main box because the debugger never stops at main anyway, but I would still like to know the maximum number of breakpoints.
Thanks again for all the help and support!
-
AuthorPosts