Skip to content

Commit ec8ef7a

Browse files
committed
increase freertos stack size when debug is enabled
1 parent 1cec005 commit ec8ef7a

File tree

4 files changed

+4
-4
lines changed
  • examples
    • device
    • host/cdc_msc_hid_freertos/src

4 files changed

+4
-4
lines changed

examples/device/cdc_msc_freertos/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#define USBD_STACK_SIZE (3*configMINIMAL_STACK_SIZE/2) * (CFG_TUSB_DEBUG ? 2 : 1)
3838
#endif
3939

40-
#define CDC_STACK_SIZE 2*configMINIMAL_STACK_SIZE
40+
#define CDC_STACK_SIZE (configMINIMAL_STACK_SIZE * (CFG_TUSB_DEBUG ? 2 : 1))
4141
#define BLINKY_STACK_SIZE configMINIMAL_STACK_SIZE
4242

4343
//--------------------------------------------------------------------+

examples/device/hid_composite_freertos/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
#define USBD_STACK_SIZE (3*configMINIMAL_STACK_SIZE/2) * (CFG_TUSB_DEBUG ? 2 : 1)
5454
#endif
5555

56-
#define HID_STACK_SZIE 2*configMINIMAL_STACK_SIZE
56+
#define HID_STACK_SZIE (configMINIMAL_STACK_SIZE * (CFG_TUSB_DEBUG ? 2 : 1))
5757

5858
//--------------------------------------------------------------------+
5959
// MACRO CONSTANT TYPEDEF PROTYPES

examples/device/midi_test_freertos/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
#endif
4949

5050
#define BLINKY_STACK_SIZE configMINIMAL_STACK_SIZE
51-
#define MIDI_STACK_SIZE 2*configMINIMAL_STACK_SIZE
51+
#define MIDI_STACK_SIZE (configMINIMAL_STACK_SIZE * (CFG_TUSB_DEBUG ? 2 : 1))
5252

5353
// static task
5454
#if configSUPPORT_STATIC_ALLOCATION

examples/host/cdc_msc_hid_freertos/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#define USBH_STACK_SIZE 4096
3535
#else
3636
// Increase stack size when debug log is enabled
37-
#define USBH_STACK_SIZE (4*configMINIMAL_STACK_SIZE/2) * (CFG_TUSB_DEBUG ? 2 : 1)
37+
#define USBH_STACK_SIZE (configMINIMAL_STACK_SIZE * (CFG_TUSB_DEBUG ? 4 : 2))
3838
#endif
3939

4040

0 commit comments

Comments
 (0)