Skip to content

Commit cc75fa3

Browse files
author
mean
committed
enable/disable usb depening on the amount of flash we have
1 parent 39c4a27 commit cc75fa3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

select_mcu_stm32.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
OPTION(USE_GD32F103 "Use GD32F103 MCU" FALSE)
22
OPTION(USE_GD32F303 "Use GD32F303 MCU" FALSE)
3+
OPTION(USE_USB "Enable USB MCU" FALSE)
34
# Select platform and installation for extra arduino files AND toolchain (compiler...)
45
SET(PLATFORM_ARCHITECTURE "STM32F1")
56

@@ -24,6 +25,7 @@ ELSEIF(USE_GD32F303)
2425
set(X_ARDUINO_DEFAULT_BOARD genericGD32F303C) # Default Board ID, when not specified
2526
set(X_ARDUINO_CPU GD32F303C8)
2627
SET(USE_FPU TRUE)
28+
SET(USE_USB TRUE)
2729
IF(USE_FPU )
2830
# FPU
2931
ADD_DEFINITIONS("-DUSE_FPU=1")
@@ -36,6 +38,7 @@ ELSEIF(USE_GD32F303)
3638
SET(ARDUINO_LD_SCRIPT "-T${CMAKE_CURRENT_SOURCE_DIR}/ldScript/GD32F3/gd32f3.ld -L${CMAKE_CURRENT_SOURCE_DIR}/ldScript/common ")
3739
ELSE()
3840
SET(EXTENSION "STM32F103")
41+
SET(USE_USB TRUE)
3942
set(X_ARDUINO_LD_FILE jtag) # Use that instead of default jtag-c8 to get the full 128 kB
4043
set(X_ARDUINO_DEFAULT_BOARD genericSTM32F103C) # Default Board ID, when not specified
4144
set(X_ARDUINO_CPU STM32F103C8)

0 commit comments

Comments
 (0)