From ba6279bc64407337664a1953e42e6c0d1d08588b Mon Sep 17 00:00:00 2001 From: deadprogram Date: Thu, 1 Oct 2026 23:28:26 +0200 Subject: [PATCH] targets: use an 8 KB default stack on nrf52840 The nrf52840 boards inherited the 2 KB goroutine stack from cortex-m. That is easy to overflow, for example writing machine.Flash through a FAT layer, and the overflow corrupts memory with no clear error. The RP2040 and RP2350 board targets already use 8 KB. --- targets/nrf52840.json | 1 + 1 file changed, 1 insertion(+) diff --git a/targets/nrf52840.json b/targets/nrf52840.json index 9d86a6503b..7a0957afdd 100644 --- a/targets/nrf52840.json +++ b/targets/nrf52840.json @@ -1,5 +1,6 @@ { "inherits": ["cortex-m4"], + "default-stack-size": 8192, "build-tags": ["nrf52840", "nrf"], "cflags": [ "-DNRF52840_XXAA",