From 1913cb76a5c6996c2d90107bad0a8bd0a4512327 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Fri, 18 Jun 2021 09:39:12 +0200 Subject: [PATCH] cortexm: bump default stack size to 2048 bytes Previously it was 1024 bytes, which occasionally ran into a stack overflow. I hope that 2048 bytes will be enough for most purposes. I've also removed some 2048-byte stack size settings in JSON files, which are unnecessary now that the parent (cortex-m.json) sets them. --- targets/cortex-m.json | 2 +- targets/feather-stm32f405.json | 1 - targets/grandcentral-m4.json | 3 +-- targets/p1am-100.json | 3 +-- targets/pygamer.json | 3 +-- targets/pyportal.json | 3 +-- targets/wioterminal.json | 3 +-- 7 files changed, 6 insertions(+), 12 deletions(-) diff --git a/targets/cortex-m.json b/targets/cortex-m.json index eed685c7..0021d03c 100644 --- a/targets/cortex-m.json +++ b/targets/cortex-m.json @@ -8,7 +8,7 @@ "rtlib": "compiler-rt", "libc": "picolibc", "automatic-stack-size": true, - "default-stack-size": 1024, + "default-stack-size": 2048, "cflags": [ "-Oz", "-mthumb", diff --git a/targets/feather-stm32f405.json b/targets/feather-stm32f405.json index 0e86cd4c..d3bb1dc9 100644 --- a/targets/feather-stm32f405.json +++ b/targets/feather-stm32f405.json @@ -2,7 +2,6 @@ "inherits": ["cortex-m4"], "build-tags": ["feather_stm32f405", "stm32f405", "stm32f4", "stm32"], "automatic-stack-size": false, - "default-stack-size": 1024, "linkerscript": "targets/stm32f405.ld", "extra-files": [ "src/device/stm32/stm32f405.s" diff --git a/targets/grandcentral-m4.json b/targets/grandcentral-m4.json index 6229d456..4545dfd9 100644 --- a/targets/grandcentral-m4.json +++ b/targets/grandcentral-m4.json @@ -5,6 +5,5 @@ "flash-method": "msd", "msd-volume-name": "GCM4BOOT", "msd-firmware-name": "firmware.uf2", - "openocd-interface": "jlink", - "default-stack-size": 2048 + "openocd-interface": "jlink" } diff --git a/targets/p1am-100.json b/targets/p1am-100.json index be9b0e44..fcfaff1a 100644 --- a/targets/p1am-100.json +++ b/targets/p1am-100.json @@ -2,6 +2,5 @@ "inherits": ["atsamd21g18a"], "build-tags": ["sam", "atsamd21g18a", "p1am_100"], "flash-command": "bossac -d -i -e -w -v -R --port={port} --offset=0x2000 {bin}", - "flash-1200-bps-reset": "true", - "default-stack-size": 2048 + "flash-1200-bps-reset": "true" } diff --git a/targets/pygamer.json b/targets/pygamer.json index 71244afe..63dc34a1 100644 --- a/targets/pygamer.json +++ b/targets/pygamer.json @@ -4,6 +4,5 @@ "flash-1200-bps-reset": "true", "flash-method": "msd", "msd-volume-name": "PYGAMERBOOT", - "msd-firmware-name": "arcade.uf2", - "default-stack-size": 2048 + "msd-firmware-name": "arcade.uf2" } diff --git a/targets/pyportal.json b/targets/pyportal.json index 14b95ef8..e03efcb6 100644 --- a/targets/pyportal.json +++ b/targets/pyportal.json @@ -4,6 +4,5 @@ "flash-1200-bps-reset": "true", "flash-method": "msd", "msd-volume-name": "PORTALBOOT", - "msd-firmware-name": "firmware.uf2", - "default-stack-size": 2048 + "msd-firmware-name": "firmware.uf2" } diff --git a/targets/wioterminal.json b/targets/wioterminal.json index 8595b7c9..093947e1 100644 --- a/targets/wioterminal.json +++ b/targets/wioterminal.json @@ -4,6 +4,5 @@ "flash-1200-bps-reset": "true", "flash-method": "msd", "msd-volume-name": "Arduino", - "msd-firmware-name": "firmware.uf2", - "default-stack-size": 2048 + "msd-firmware-name": "firmware.uf2" }