From f05889b510212d95f6cd0461dc8e86c7fadf9ade Mon Sep 17 00:00:00 2001 From: "Pawel Spychalski (DzikuVx)" Date: Fri, 1 Feb 2019 18:03:53 +0100 Subject: [PATCH] make ITCM RAM usage target specific --- src/main/target/MATEKF722SE/target.h | 2 ++ src/main/target/common.h | 8 -------- src/main/target/common_post.h | 8 ++++++++ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/main/target/MATEKF722SE/target.h b/src/main/target/MATEKF722SE/target.h index 7d98e23a3b..c7bf92ee7f 100644 --- a/src/main/target/MATEKF722SE/target.h +++ b/src/main/target/MATEKF722SE/target.h @@ -197,3 +197,5 @@ #define MAX_PWM_OUTPUT_PORTS 8 #define USE_DSHOT + +#define USE_ITCM_RAM \ No newline at end of file diff --git a/src/main/target/common.h b/src/main/target/common.h index 7e0d9d65dd..e586c2c8d6 100755 --- a/src/main/target/common.h +++ b/src/main/target/common.h @@ -45,14 +45,6 @@ #define SKIP_CLI_RESOURCES #endif -#ifdef STM32F7 -#define FAST_CODE __attribute__((section(".tcm_code"))) -#define NOINLINE __NOINLINE -#else -#define FAST_CODE -#define NOINLINE -#endif - #define USE_ADC_AVERAGING #define USE_64BIT_TIME #define USE_BLACKBOX diff --git a/src/main/target/common_post.h b/src/main/target/common_post.h index 6cef361b99..62e5e7a2e8 100644 --- a/src/main/target/common_post.h +++ b/src/main/target/common_post.h @@ -35,3 +35,11 @@ #if !defined(USE_MSP_DISPLAYPORT) && (FLASH_SIZE > 128) && !defined(USE_OSD) #define USE_MSP_DISPLAYPORT #endif + +#ifdef USE_ITCM_RAM +#define FAST_CODE __attribute__((section(".tcm_code"))) +#define NOINLINE __NOINLINE +#else +#define FAST_CODE +#define NOINLINE +#endif