Espressif ESP32-S2 Programming Manual page 1416

Table of Contents

Advertisement

Chapter 4. API Guides
336 #endif
337
//Enable allocation in region where the startup stacks were located.
338
heap_caps_enable_nonos_stack_heaps();
339
app_main();
340
vTaskDelete(NULL);
341 }
342
(gdb)
By listing some lines before, you will see the function name main_task we have been looking for:
(gdb) l 326, 341
326 static void main_task(void* args)
327 {
328
// Now that the application is about to start, disable boot watchdogs
329
REG_CLR_BIT(TIMG_WDTCONFIG0_REG(0), TIMG_WDT_FLASHBOOT_MOD_EN_S);
330
REG_CLR_BIT(RTC_CNTL_WDTCONFIG0_REG, RTC_CNTL_WDT_FLASHBOOT_MOD_EN);
331 #if !CONFIG_FREERTOS_UNICORE
332
// Wait for FreeRTOS initialization to finish on APP CPU, before
its startup stack
333
while (port_xSchedulerRunning[1] == 0) {
334
;
335
}
336 #endif
337
//Enable allocation in region where the startup stacks were located.
338
heap_caps_enable_nonos_stack_heaps();
339
app_main();
340
vTaskDelete(NULL);
341 }
(gdb)
To see the other code, enter i threads. This will show the list of threads running on target:
(gdb) i threads
Id
Target Id
8
Thread 1073411336 (dport) 0x400d0848 in dport_access_init_core (arg=
<optimized out>)
at /home/user-name/esp/esp-idf/components/esp32s2/./dport_access.c:170
7
Thread 1073408744 (ipc0) xQueueGenericReceive
pvBuffer=0x0, xTicksToWait=1644638200,
xJustPeeking=0) at /home/user-name/esp/esp-idf/components/freertos/./queue.
c:1452
6
Thread 1073431096 (Tmr Svc) prvTimerTask (pvParameters=0x0)
at /home/user-name/esp/esp-idf/components/freertos/./timers.c:445
5
Thread 1073410208 (ipc1 : Running) 0x4000bfea in ?? ()
4
Thread 1073432224 (dport) dport_access_init_core (arg=0x0)
at /home/user-name/esp/esp-idf/components/esp32s2/./dport_access.c:150
3
Thread 1073413156 (IDLE) prvIdleTask (pvParameters=0x0)
at /home/user-name/esp/esp-idf/components/freertos/./tasks.c:3282
2
Thread 1073413512 (IDLE) prvIdleTask (pvParameters=0x0)
at /home/user-name/esp/esp-idf/components/freertos/./tasks.c:3282
* 1
Thread 1073411772 (main : Running) app_main () at /home/user-name/esp/blink/
main/./blink.c:43
(gdb)
The thread list shows the last function calls per each thread together with the name of C source file if available.
You can navigate to specific thread by entering thread N, where N is the thread Id. To see how it works go to
thread thread 5:
(gdb) thread 5
Espressif Systems
Frame
1405
Submit Document Feedback
(continued from previous page)
(xQueue=0x3ffae694,␣
(continues on next page)
replacing␣
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?

Table of Contents

Save PDF