From 91659446648a00f24b0b8af6327230658cc65c07 Mon Sep 17 00:00:00 2001 From: Luca Mannella Date: Tue, 8 Apr 2025 07:54:31 +0200 Subject: [PATCH] =?UTF-8?q?Align=20stack=20size=20to=2016-byte=20boundary?= =?UTF-8?q?=20by=20changing=20`=5F=5Fstack=5Fsize`=20from=20350=20to=20352?= =?UTF-8?q?=E2=80=8B=20(#1335)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit updates the __stack_size definition in the linker flags, changing its value from 350 to 352. This change ensures that the stack size is a multiple of 16, aligning the stack pointer (sp) to a 16-byte boundary as required by the system architecture.​ --- FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC/build/gcc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC/build/gcc/Makefile b/FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC/build/gcc/Makefile index d8be9f7e4..6a2073e7e 100644 --- a/FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC/build/gcc/Makefile +++ b/FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC/build/gcc/Makefile @@ -45,7 +45,7 @@ endif LDFLAGS += -nostartfiles -Xlinker --gc-sections -Wl,-Map,$(OUTPUT_DIR)/RTOSDemo.map \ -T./fake_rom.ld -march=$(MARCH) -mabi=$(MABI) -mcmodel=$(MCMODEL) -Xlinker \ - --defsym=__stack_size=350 -Wl,--start-group -Wl,--end-group + --defsym=__stack_size=352 -Wl,--start-group -Wl,--end-group ifeq ($(PICOLIBC),1) LDFLAGS += --specs=picolibc.specs --oslib=semihost --crt0=minimal -DPICOLIBC_INTEGER_PRINTF_SCANF