summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-10-30 11:16:19 +0700
committerhathach <[email protected]>2025-10-30 11:16:19 +0700
commitec8ef7a9afbab36271b2aec1624eec35e0b42900 (patch)
treedf21335e7a914f3065cb75896a0c56a612b537f8 /examples
parent1cec005f8fe9eeb0cfa8e42af9245449c18ec61b (diff)
increase freertos stack size when debug is enabled
Diffstat (limited to 'examples')
-rw-r--r--examples/device/cdc_msc_freertos/src/main.c2
-rw-r--r--examples/device/hid_composite_freertos/src/main.c2
-rw-r--r--examples/device/midi_test_freertos/src/main.c2
-rw-r--r--examples/host/cdc_msc_hid_freertos/src/main.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/examples/device/cdc_msc_freertos/src/main.c b/examples/device/cdc_msc_freertos/src/main.c
index be8482f1c..4fb209fd0 100644
--- a/examples/device/cdc_msc_freertos/src/main.c
+++ b/examples/device/cdc_msc_freertos/src/main.c
@@ -37,7 +37,7 @@
#define USBD_STACK_SIZE (3*configMINIMAL_STACK_SIZE/2) * (CFG_TUSB_DEBUG ? 2 : 1)
#endif
-#define CDC_STACK_SIZE 2*configMINIMAL_STACK_SIZE
+#define CDC_STACK_SIZE (configMINIMAL_STACK_SIZE * (CFG_TUSB_DEBUG ? 2 : 1))
#define BLINKY_STACK_SIZE configMINIMAL_STACK_SIZE
//--------------------------------------------------------------------+
diff --git a/examples/device/hid_composite_freertos/src/main.c b/examples/device/hid_composite_freertos/src/main.c
index acc8f69a0..391e3c42a 100644
--- a/examples/device/hid_composite_freertos/src/main.c
+++ b/examples/device/hid_composite_freertos/src/main.c
@@ -53,7 +53,7 @@
#define USBD_STACK_SIZE (3*configMINIMAL_STACK_SIZE/2) * (CFG_TUSB_DEBUG ? 2 : 1)
#endif
-#define HID_STACK_SZIE 2*configMINIMAL_STACK_SIZE
+#define HID_STACK_SZIE (configMINIMAL_STACK_SIZE * (CFG_TUSB_DEBUG ? 2 : 1))
//--------------------------------------------------------------------+
// MACRO CONSTANT TYPEDEF PROTYPES
diff --git a/examples/device/midi_test_freertos/src/main.c b/examples/device/midi_test_freertos/src/main.c
index 070906d0d..f5267214e 100644
--- a/examples/device/midi_test_freertos/src/main.c
+++ b/examples/device/midi_test_freertos/src/main.c
@@ -48,7 +48,7 @@
#endif
#define BLINKY_STACK_SIZE configMINIMAL_STACK_SIZE
-#define MIDI_STACK_SIZE 2*configMINIMAL_STACK_SIZE
+#define MIDI_STACK_SIZE (configMINIMAL_STACK_SIZE * (CFG_TUSB_DEBUG ? 2 : 1))
// static task
#if configSUPPORT_STATIC_ALLOCATION
diff --git a/examples/host/cdc_msc_hid_freertos/src/main.c b/examples/host/cdc_msc_hid_freertos/src/main.c
index 4a9031278..483f2344e 100644
--- a/examples/host/cdc_msc_hid_freertos/src/main.c
+++ b/examples/host/cdc_msc_hid_freertos/src/main.c
@@ -34,7 +34,7 @@
#define USBH_STACK_SIZE 4096
#else
// Increase stack size when debug log is enabled
- #define USBH_STACK_SIZE (4*configMINIMAL_STACK_SIZE/2) * (CFG_TUSB_DEBUG ? 2 : 1)
+ #define USBH_STACK_SIZE (configMINIMAL_STACK_SIZE * (CFG_TUSB_DEBUG ? 4 : 2))
#endif