Forum: Mikrocontroller und Digitale Elektronik ESP32 espressif eclipse debugging


von Zo R. (hsch1978)


Lesenswert?

Hallo,

kennt sich hier jemand mit dem debugging vom esp32 aus?
Ich habe eclipse und espressif soweit erfolgreich installiert.
Nachdem ich das Beispiel Projekt blink erfolgreich bauen konnte,
hab ich den debugger gestartet.
Leider funktioniert das mit dem Debugger nicht unter eclipse.

Ich habe mal den Debugger per Console gestartet:
1
C:\Entwicklung\Esp32\Test\blink>xtensa-esp32-elf-gdb -x gdbinit build/blink.elf
2
GNU gdb (esp-gdb) 14.2_20240403
3
Copyright (C) 2023 Free Software Foundation, Inc.
4
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
5
This is free software: you are free to change and redistribute it.
6
There is NO WARRANTY, to the extent permitted by law.
7
Type "show copying" and "show warranty" for details.
8
This GDB was configured as "--host=x86_64-w64-mingw32 --target=xtensa-esp-elf".
9
Type "show configuration" for configuration details.
10
For bug reporting instructions, please see:
11
<https://www.gnu.org/software/gdb/bugs/>.
12
Find the GDB manual and other documentation resources online at:
13
    <http://www.gnu.org/software/gdb/documentation/>.
14
15
For help, type "help".
16
Type "apropos word" to search for commands related to "word"...
17
Reading symbols from build/blink.elf...
18
19
warning: could not convert 'main' from the host encoding (CP1252) to UTF-32.
20
This normally should not happen, please file a bug report.
21
gdbinit: No such file or directory.
22
(gdb)

: Bearbeitet durch User
von Christian K. (the_kirsch)


Lesenswert?

Hast du hier den Step 3 befolgt?

https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/jtag-debugging/using-debugger.html#command-line

"When launching a debugger, you will need to provide a couple of 
configuration parameters and commands. Instead of entering them one by 
one in the command line, create a configuration file and name it 
gdbinit"

von Zo R. (hsch1978)


Lesenswert?

Guten Morgen Christian,

danke für die Informationen. Ich habe die Datei gdpini angelegt.
Die gdpini Datei befindet sich im Ordner C:\Entwicklung\Esp32\Test\blink
1
target remote :3333
2
set remote hardware-watchpoint-limit 2
3
mon reset halt
4
maintenance flush register-cache
5
thb app_main
6
c
1
xtensa-esp32-elf-gdb -x gdbinit build/blink.elf

Trotzdem funktioniert der Debugger nicht.
1
C:\Entwicklung\Esp32\Test\blink>xtensa-esp32-elf-gdb -x gdbinit build/blink.elf
2
GNU gdb (esp-gdb) 14.2_20240403
3
Copyright (C) 2023 Free Software Foundation, Inc.
4
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
5
This is free software: you are free to change and redistribute it.
6
There is NO WARRANTY, to the extent permitted by law.
7
Type "show copying" and "show warranty" for details.
8
This GDB was configured as "--host=x86_64-w64-mingw32 --target=xtensa-esp-elf".
9
Type "show configuration" for configuration details.
10
For bug reporting instructions, please see:
11
<https://www.gnu.org/software/gdb/bugs/>.
12
Find the GDB manual and other documentation resources online at:
13
    <http://www.gnu.org/software/gdb/documentation/>.
14
15
For help, type "help".
16
Type "apropos word" to search for commands related to "word"...
17
Reading symbols from build/blink.elf...
18
19
warning: could not convert 'main' from the host encoding (CP1252) to UTF-32.
20
This normally should not happen, please file a bug report.
21
gdbinit: No such file or directory.
22
(gdb)

: Bearbeitet durch User
von Zo R. (hsch1978)


Lesenswert?

Ich habe nun noch folgendes getestet:
1
openocd -f esp32_devkitj_v1.cfg -f esp-wroom-32.cfg

Meldung:
1
Open On-Chip Debugger v0.12.0-esp32-20240318 (2024-03-18-18:26)
2
Licensed under GNU GPL v2
3
For bug reports, read
4
        http://openocd.org/doc/doxygen/bugs.html
5
adapter speed: 20000 kHz
6
WARNING: boards/esp-wroom-32.cfg is deprecated, and may be removed in a future release.
7
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
8
Info : Listening on port 6666 for tcl connections
9
Info : Listening on port 4444 for telnet connections
10
Error: unable to open ftdi device with description '*', serial '*' at bus location '*'
11
C:\Espressif\tools\openocd-esp32\v0.12.0-esp32-20240318\openocd-esp32\share\openocd\scripts/target/esp_common.cfg:9: Error:
12
at file "C:\Espressif\tools\openocd-esp32\v0.12.0-esp32-20240318\openocd-esp32\share\openocd\scripts/target/esp_common.cfg", line 9

von Julian L. (rommudoh)


Lesenswert?

Zo R. schrieb:
> die Datei gdpini

bitte umbenennen.

von Zo R. (hsch1978)


Lesenswert?

Kennt sich wirklich niemand damit aus?

Ich komme hier nicht weiter.

von Zo R. (hsch1978)


Lesenswert?

Hallo,

danke. Die Datei habe ich bereits umbenannt in gdpini.cfg

von Julian L. (rommudoh)


Lesenswert?

der gewünschte Name war "gdbinit".

von J. S. (jojos)


Lesenswert?

1
Error: unable to open ftdi device with description

Ist da überhaupt eine Debugprobe angeschlossen? Welcher ESP32 ist es 
genau? Nur die wenigsten haben diese eingebaut, es ist eine zusätzliche 
Hardware nötig, über den Draht zum seriellen Download läuft der Debugger 
nicht.

https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/jtag-debugging/index.html#how-it-works

: Bearbeitet durch User
von Zo R. (hsch1978)


Lesenswert?

Ich habe folgenden esp32:

=> ESP-32S ESP32-WROOM-32D

https://www.amazon.de/Entwicklungsausschuss-RUIZHI-ESP32-WROOM-32D-Bluetooth-Stromverbrauch/dp/B0CLCQ64W2/ref=mp_s_a_1_5_sspa?th=1

Also ich kann mit eclipse das Programm auch flashen. Nur das mit dem 
Debugging funktioniert nicht.
Brauch ich da noch eine weitere Hardware um auch debuggen zu können?
Wenn ja, welche Hardware brauch ich da genau?

: Bearbeitet durch User
von J. S. (jojos)


Lesenswert?


Beitrag #7776636 wurde vom Autor gelöscht.
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.