From a40af493a57fa99e9383290dabdcc10e1fa9a309 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 11 Aug 2026 17:07:23 +0700 Subject: sysview: FreeRTOS trace hooks, stack high-water and heap tracking hw/bsp/sysview_freertos_hooks.h maps the FreeRTOS trace macros onto SystemView task records (task names, switches, ready/blocked) and adds heap tracking; the FreeRTOSConfig.h of the families used on the rig include it when SYSVIEW is on. The FreeRTOS examples grow their USB task stacks when CFG_TU*_SYSVIEW is enabled, the same way they already do for CFG_TUSB_DEBUG -- the instrumentation's stack cost is real (measured overflows on lpc55 before the bump). --- examples/device/usbtest/src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/device/usbtest/src') diff --git a/examples/device/usbtest/src/main.c b/examples/device/usbtest/src/main.c index e57a90161..eff564e7f 100644 --- a/examples/device/usbtest/src/main.c +++ b/examples/device/usbtest/src/main.c @@ -289,8 +289,8 @@ void led_blinking_task(void* param) { main(); } #else - // Increase stack size when debug log is enabled - #define USBD_STACK_SIZE (3*configMINIMAL_STACK_SIZE/2) * (CFG_TUSB_DEBUG ? 2 : 1) + // Increase stack size when debug log or SYSVIEW instrumentation is enabled + #define USBD_STACK_SIZE (3*configMINIMAL_STACK_SIZE/2) * ((CFG_TUSB_DEBUG || CFG_TUD_SYSVIEW) ? 2 : 1) #endif // static task allocation -- cgit v1.3.1