mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +00:00
Add option to automatically set a watchpoint at the end of the swapped-in task
This commit is contained in:
@@ -78,6 +78,7 @@ task.h is included from an application file. */
|
||||
|
||||
#include "rom/ets_sys.h"
|
||||
#include "esp_newlib.h"
|
||||
#include "esp_panic.h"
|
||||
|
||||
/* FreeRTOS includes. */
|
||||
#include "FreeRTOS.h"
|
||||
@@ -2809,6 +2810,12 @@ void vTaskSwitchContext( void )
|
||||
|
||||
traceTASK_SWITCHED_IN();
|
||||
|
||||
#if CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK
|
||||
//Set watchpoint 1 to watch the last 32 bytes of the stack.
|
||||
esp_set_watchpoint(1, pxCurrentTCB[xPortGetCoreID()]->pxStack, 32, ESP_WATCHPOINT_STORE);
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
portEXIT_CRITICAL_NESTED(irqstate);
|
||||
}
|
||||
|
Reference in New Issue
Block a user