File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ function(target_stm32h7xx)
185
185
VCP_SOURCES ${STM32H7_USB_SRC} ${STM32H7_VCP_SRC}
186
186
VCP_INCLUDE_DIRECTORIES ${STM32H7_USB_INCLUDE_DIRS} ${STM32H7_VCP_DIR}
187
187
188
- OPTIMIZATION -O2
188
+ OPTIMIZATION -Ofast
189
189
190
190
OPENOCD_TARGET stm32h7x
191
191
Original file line number Diff line number Diff line change @@ -65,13 +65,26 @@ extern uint8_t __config_end;
65
65
#endif
66
66
67
67
//Defines for compiler optimizations
68
+ #ifdef STM32H7
69
+
70
+ #define FUNCTION_COMPILE_FOR_SIZE
71
+ #define FUNCTION_COMPILE_NORMAL
72
+ #define FUNCTION_COMPILE_FOR_SPEED
73
+ #define FILE_COMPILE_FOR_SIZE
74
+ #define FILE_COMPILE_NORMAL
75
+ #define FILE_COMPILE_FOR_SPEED
76
+
77
+ #else
78
+
68
79
#define FUNCTION_COMPILE_FOR_SIZE __attribute__((optimize("-Os")))
69
80
#define FUNCTION_COMPILE_NORMAL __attribute__((optimize("-O2")))
70
81
#define FUNCTION_COMPILE_FOR_SPEED __attribute__((optimize("-Ofast")))
71
82
#define FILE_COMPILE_FOR_SIZE _Pragma("GCC optimize(\"Os\")")
72
83
#define FILE_COMPILE_NORMAL _Pragma("GCC optimize(\"O2\")")
73
84
#define FILE_COMPILE_FOR_SPEED _Pragma("GCC optimize(\"Ofast\")")
74
85
86
+ #endif
87
+
75
88
#if defined(CONFIG_IN_RAM ) || defined(CONFIG_IN_EXTERNAL_FLASH )
76
89
#ifndef EEPROM_SIZE
77
90
#define EEPROM_SIZE 8192
You can’t perform that action at this time.
0 commit comments