From 25fce0e9616b43ff29a5522f1be8610c1c8ca90e Mon Sep 17 00:00:00 2001 From: chrysn Date: Mon, 26 Aug 2024 16:23:58 +0200 Subject: [PATCH] examples/rust-gcoap: Update stack size Tests with a particle-xenon show 5KiB free stack now; before, that would have been an overflow by 3KiB. --- examples/rust-gcoap/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/rust-gcoap/Makefile b/examples/rust-gcoap/Makefile index 418cfb0608739..2137478bcdcbb 100644 --- a/examples/rust-gcoap/Makefile +++ b/examples/rust-gcoap/Makefile @@ -34,10 +34,9 @@ DEVELHELP ?= 1 # Change this to 0 show compiler invocation lines by default: QUIET ?= 1 -# Add 8k extra stack: The Rust examples take more of it than gcoap expects, -# presumably because the example use the standard library's sting formatting -# instead of one of the more optimized formatters. -CFLAGS += -DGCOAP_STACK_SIZE='(THREAD_STACKSIZE_DEFAULT+DEBUG_EXTRA_STACKSIZE+sizeof(coap_pkt_t)+8192)' +# Add 16k extra stack: The Rust examples take more of it than gcoap expects, +# for reasons that are not fully understood (it's not the string formatter). +CFLAGS += -DGCOAP_STACK_SIZE='(THREAD_STACKSIZE_DEFAULT+DEBUG_EXTRA_STACKSIZE+sizeof(coap_pkt_t)+16384)' # This thread needs some more stack for printing the addresses, once more being # hit by string formatting. CFLAGS += -DTHREAD_STACKSIZE_MAIN='(THREAD_STACKSIZE_DEFAULT+THREAD_EXTRA_STACKSIZE_PRINTF+2048)'