Skip to content

Commit 813eba2

Browse files
authored
Merge pull request #3271 from karlp/pr/examplesd-freertos-stacks
examples/device/*_freertos: expand stack size when needed
2 parents 3ff5415 + ec8ef7a commit 813eba2

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 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 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 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
@@ -35,7 +35,7 @@
3535
#define USBH_STACK_SIZE 4096
3636
#else
3737
// Increase stack size when debug log is enabled
38-
#define USBH_STACK_SIZE (3*configMINIMAL_STACK_SIZE/2) * (CFG_TUSB_DEBUG ? 2 : 1)
38+
#define USBH_STACK_SIZE (configMINIMAL_STACK_SIZE * (CFG_TUSB_DEBUG ? 4 : 2))
3939
#endif
4040

4141

0 commit comments

Comments
 (0)