From e5c54cca0041905b04973114f8ac057f7646c743 Mon Sep 17 00:00:00 2001 From: Stacey Sheldon Date: Sun, 11 Nov 2012 22:16:00 -0500 Subject: [PATCH] freertos: change default alignment to 4-byte from 8-byte There shouldn't be any reason to need 8-byte alignment on the F1 platform. This allows better packing of all malloc'd data. Reducing this below 4-byte alignment is not recommended and will likely result in misaligned pointers being passed to peripherals. RAM savings is another 300 bytes. --- .../Libraries/FreeRTOS/Source/portable/GCC/ARM_CM3/portmacro.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/portable/GCC/ARM_CM3/portmacro.h b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/portable/GCC/ARM_CM3/portmacro.h index c2860d1e9..910ff770a 100644 --- a/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/portable/GCC/ARM_CM3/portmacro.h +++ b/flight/PiOS/STM32F10x/Libraries/FreeRTOS/Source/portable/GCC/ARM_CM3/portmacro.h @@ -92,7 +92,7 @@ extern "C" { /* Architecture specifics. */ #define portSTACK_GROWTH ( -1 ) #define portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ ) -#define portBYTE_ALIGNMENT 8 +#define portBYTE_ALIGNMENT 4 /*-----------------------------------------------------------*/