Espressif ESP32-S2 Programming Manual page 1418

Table of Contents

Advertisement

Chapter 4. API Guides
(gdb)
You will be also able to see that LED is changing the state only if you resume program execution by entering c.
To examine how many breakpoints are set and where, use command info break:
(gdb) info break
Num
Type
2
breakpoint
blink/main/./blink.c:33
breakpoint already hit 1 time
3
breakpoint
blink/main/./blink.c:36
breakpoint already hit 1 time
(gdb)
Please note that breakpoint numbers (listed under Num) start with 2. This is because first breakpoint has been
already established at function app_main() by running command thb app_main on debugger launch. As it
was a temporary breakpoint, it has been automatically deleted and now is not listed anymore.
To remove breakpoints enter delete N command (in short d N), where N is the breakpoint number:
(gdb) delete 1
No breakpoint number 1.
(gdb) delete 2
(gdb)
Read more about breakpoints under
points?
Halting and resuming the application
some event or staying in infinite loop without any break points defined. In such case, to go back to debugging mode,
you can break program execution manually by entering Ctrl+C.
To check it delete all breakpoints and enter c to resume application. Then enter Ctrl+C. Application will be halted
at some random point and LED will stop blinking. Debugger will print the following:
(gdb) c
Continuing.
^CTarget halted. PRO_CPU: PC=0x400D0C00
[New Thread 1073433352]
Program received signal SIGINT, Interrupt.
[Switching to Thread 1073413512]
0x400d0c00 in esp_vApplicationIdleHook () at /home/user-name/esp/esp-idf/
components/esp32s2/./freertos_hooks.c:52
52
asm("waiti 0");
(gdb)
In particular case above, the application has been halted in line 52 of code in file freertos_hooks.c. Now you
can resume it again by enter c or do some debugging as discussed below.
Note: In MSYS2 shell Ctrl+C does not halt the target but exists debugger. To resolve this issue consider debugging
with
Eclipse
or check a workaround under http://www.mingw.org/wiki/Workaround_for_GDB_Ctrl_C_Interrupt.
Stepping through the code
s and n). The difference is that step is entering inside subroutines calls, while next steps over the call, treating it
as a single source line.
Espressif Systems
Disp Enb Address
keep y
0x400db6f6 in blink_task at /home/user-name/esp/
keep y
0x400db704 in blink_task at /home/user-name/esp/
Breakpoints and watchpoints available
When debugging, you may resume application and enter code waiting for
It is also possible to step through the code using step and next commands (in short
1407
Submit Document Feedback
What
and
What else should I know about break-
APP_CPU: PC=0x400D0C00 (active)
(continued from previous page)
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents

Save PDF