summaryrefslogtreecommitdiff
path: root/examples/dual/dynamic_switch/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-08-11 17:07:23 +0700
committerhathach <[email protected]>2026-09-04 04:21:57 +0700
commita40af493a57fa99e9383290dabdcc10e1fa9a309 (patch)
treea2fdeea60e6cb34872a171c8a9a78eb47792104f /examples/dual/dynamic_switch/src
parent3baa7c8fbafd2cbccc5810626ebbfaa50c0ea4da (diff)
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).
Diffstat (limited to 'examples/dual/dynamic_switch/src')
-rw-r--r--examples/dual/dynamic_switch/src/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/dual/dynamic_switch/src/main.c b/examples/dual/dynamic_switch/src/main.c
index f67cd885c..6c4abb458 100644
--- a/examples/dual/dynamic_switch/src/main.c
+++ b/examples/dual/dynamic_switch/src/main.c
@@ -41,12 +41,12 @@
#define USBD_STACK_SIZE 4096
#define USBH_STACK_SIZE 4096
#else
- // Increase stack size when debug log is enabled
- #define USBD_STACK_SIZE (3*configMINIMAL_STACK_SIZE/2) * (CFG_TUSB_DEBUG ? 2 : 1)
- #define USBH_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)
+ #define USBH_STACK_SIZE (3*configMINIMAL_STACK_SIZE/2) * ((CFG_TUSB_DEBUG || CFG_TUH_SYSVIEW) ? 2 : 1)
#endif
- #define CDC_STACK_SIZE (configMINIMAL_STACK_SIZE * (CFG_TUSB_DEBUG ? 2 : 1))
+ #define CDC_STACK_SIZE (configMINIMAL_STACK_SIZE * ((CFG_TUSB_DEBUG || CFG_TUD_SYSVIEW) ? 2 : 1))
#define BLINKY_STACK_SIZE configMINIMAL_STACK_SIZE
#endif