From aa9280326830a2823adbc1957812415de9e0a5e1 Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Tue, 28 Sep 2021 02:27:21 +1300 Subject: [PATCH] Changed the optimisation level for ITCM RAM code to free up some ITCM RAM space on F745. --- src/main/target/common_pre.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/target/common_pre.h b/src/main/target/common_pre.h index c7fd713b5bf..8d9e3efe3a9 100644 --- a/src/main/target/common_pre.h +++ b/src/main/target/common_pre.h @@ -74,6 +74,7 @@ #ifdef STM32F7 #define USE_ITCM_RAM +#define ITCM_RAM_OPTIMISATION "-O2" #define USE_FAST_DATA #define USE_DSHOT #define USE_DSHOT_BITBANG @@ -159,7 +160,11 @@ #ifdef USE_ITCM_RAM +#if defined(ITCM_RAM_OPTIMISATION) && !defined(DEBUG) +#define FAST_CODE __attribute__((section(".tcm_code"))) __attribute__((optimize(ITCM_RAM_OPTIMISATION))) +#else #define FAST_CODE __attribute__((section(".tcm_code"))) +#endif #define FAST_CODE_NOINLINE NOINLINE #else #define FAST_CODE