File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,9 @@ ELSE(TRY_CPU_FLAGS)
8
8
_get_board_property (${BOARD_ID} build .cpu_flags CPU_FLAGS )
9
9
ENDIF (TRY_CPU_FLAGS )
10
10
11
- set (COMPILE_FLAGS "-DF_CPU=${FCPU} ${CPU_FLAGS} -DARDUINO=${NORMALIZED_SDK_VERSION} " )
11
+ # dont set the mcu speed, it is done elsewhere
12
+ # set(COMPILE_FLAGS "-DF_CPU=${FCPU} ${CPU_FLAGS} -DARDUINO=${NORMALIZED_SDK_VERSION} ")
13
+ set (COMPILE_FLAGS " ${CPU_FLAGS} -DARDUINO=${NORMALIZED_SDK_VERSION} " )
12
14
# This should be derived from the arduino config files
13
15
# hardcode them for the moment
14
16
Original file line number Diff line number Diff line change @@ -7,8 +7,12 @@ ENDIF(NOT DEFINED ARDUINO_UPLOAD_METHOD)
7
7
8
8
IF (NOT DEFINED ARDUINO_CFLAGS_SET )
9
9
SET (DEFINED ARDUINO_CFLAGS_SET 1 )
10
+ IF (NOT DEFINED MCU_SPEED )
11
+ SET (MCU_SPEED 72000000L )
12
+ ENDIF (NOT DEFINED MCU_SPEED )
13
+
10
14
SET (ARDUINO_DEFAULT_CFLAGS " -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -w -mcpu=cortex-m3 -mthumb -g " )
11
- SET (ARDUINO_DEFAULT_CFLAGS " ${ARDUINO_DEFAULT_CFLAGS} -DGENERIC_BOOTLOADER -DF_CPU=72000000L -DARDUINO_ARCH_STM32F1 -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG " )
15
+ SET (ARDUINO_DEFAULT_CFLAGS " ${ARDUINO_DEFAULT_CFLAGS} -DGENERIC_BOOTLOADER -DF_CPU=${MCU_SPEED} L -DARDUINO_ARCH_STM32F1 -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG " )
12
16
#SET(ARDUINO_DEFAULT_CFLAGS " ${ARDUINO_DEFAULT_CFLAGS} -DF_CPU=72000000L -DARDUINO_ARCH_STM32F1 ")
13
17
14
18
SET (ARDUINO_DEFAULT_CXXFLAGS "${ARDUINO_DEFAULT_CFLAGS} -fno-rtti -fno-exceptions -std=gnu++11 -Werror=return-type" )
You can’t perform that action at this time.
0 commit comments