2021-01-18 21:42:03 +00:00
|
|
|
; PlatformIO Project Configuration File https://docs.platformio.org/page/projectconf.html
|
2022-04-22 01:22:48 +00:00
|
|
|
|
|
|
|
[platformio]
|
2022-05-21 18:20:53 +00:00
|
|
|
default_envs = STM32F1
|
2022-04-22 01:22:48 +00:00
|
|
|
|
2022-04-17 20:10:35 +00:00
|
|
|
[env]
|
2021-01-18 16:05:08 +00:00
|
|
|
framework = arduino
|
|
|
|
lib_deps =
|
2021-04-10 17:09:38 +00:00
|
|
|
greiman/SdFat @ ^2.0.6
|
2021-01-18 16:05:08 +00:00
|
|
|
upload_protocol = stlink
|
2021-01-19 02:22:40 +00:00
|
|
|
; Different gcc versions produce much different binaries in terms of speed.
|
2022-03-24 13:44:09 +00:00
|
|
|
platform_packages = platformio/toolchain-gccarmnoneeabi@1.90301.200702
|
2021-01-18 16:05:08 +00:00
|
|
|
build_flags =
|
2021-01-18 21:42:03 +00:00
|
|
|
-w
|
|
|
|
-DARDUINO_GENERIC_STM32F103C
|
|
|
|
-DARDUINO_LIB_DISCOVERY_PHASE
|
|
|
|
-DARDUINO=10813
|
|
|
|
-DARDUINO_ARCH_STM32
|
2021-01-20 02:36:33 +00:00
|
|
|
-DDEBUG_LEVEL=DEBUG_NONE
|
2021-06-15 21:22:19 +00:00
|
|
|
-O2
|
2022-05-21 01:45:58 +00:00
|
|
|
-D BUILD_TAGS="\"\""
|
2022-04-17 20:10:35 +00:00
|
|
|
build_unflags =
|
|
|
|
-Os
|
|
|
|
-DARDUINO_ARCH_STM32F1
|
2021-05-11 14:51:36 +00:00
|
|
|
upload_flags = -c set CPUTAPID 0
|
2021-01-18 16:05:08 +00:00
|
|
|
|
2022-05-21 01:45:58 +00:00
|
|
|
[env:STM32F1]
|
2022-04-17 20:10:35 +00:00
|
|
|
platform = ststm32
|
|
|
|
board = genericSTM32F103C8
|
|
|
|
board_build.mcu = stm32f103c8t6
|
|
|
|
board_build.core = maple
|
|
|
|
|
2022-05-21 01:45:58 +00:00
|
|
|
[env:STM32F1-XCVR]
|
|
|
|
extends = env:STM32F1
|
2022-05-22 17:53:57 +00:00
|
|
|
build_flags = ${env.build_flags}
|
2022-05-21 01:45:58 +00:00
|
|
|
-DXCVR
|
|
|
|
-D BUILD_TAGS="\"-XCVR\""
|
|
|
|
|
2022-05-22 17:53:57 +00:00
|
|
|
[env:STM32F1-USB-128MHz]
|
|
|
|
# Max overclock for STM32
|
|
|
|
# Can use for APM32F1 as well.
|
|
|
|
extends = env:STM32F1-USB
|
|
|
|
board_build.f_cpu = 128000000L
|
|
|
|
build_flags = ${env.build_flags}
|
|
|
|
-D BUILD_TAGS="\"-USB-128MHz\""
|
|
|
|
|
|
|
|
[env:STM32F1-USB-96MHz]
|
|
|
|
# Slight overclock for STM32
|
|
|
|
# Use for APM32F1's - it's default clock is 96MHz and runs unstable at 72MHz(STM32F1's default)
|
|
|
|
extends = env:STM32F1-USB
|
|
|
|
# Explicilty define the multiplier as maple only handles a few cases.
|
|
|
|
build_flags = ${env.build_flags}
|
|
|
|
-D BUILD_TAGS="\"-USB-96MHz\""
|
2022-05-21 01:45:58 +00:00
|
|
|
-D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
|
|
|
|
-D USBCON
|
|
|
|
-D USBD_VID=0x0483
|
|
|
|
-D USB_MANUFACTURER="Unknown"
|
|
|
|
-D USB_PRODUCT="\"BLUEPILL_F103C8\""
|
|
|
|
-D HAL_PCD_MODULE_ENABLED
|
|
|
|
-DBOARD_RCC_PLLMUL=RCC_PLLMUL_12 #96000000L
|
|
|
|
|
2022-05-22 17:53:57 +00:00
|
|
|
# TODO: Find out why USB build flags get trampled when extending an extended env.
|
|
|
|
[env:STM32F1-USB]
|
|
|
|
platform = ststm32
|
|
|
|
board = genericSTM32F103C8
|
|
|
|
board_build.mcu = stm32f103c8t6
|
|
|
|
board_build.core = maple
|
|
|
|
framework = arduino
|
|
|
|
lib_deps =
|
|
|
|
greiman/SdFat @ ^2.0.6
|
|
|
|
upload_protocol = dfu
|
|
|
|
; Different gcc versions produce much different binaries in terms of speed.
|
|
|
|
platform_packages = platformio/toolchain-gccarmnoneeabi@1.90301.200702
|
|
|
|
build_flags =
|
|
|
|
-D BUILD_TAGS="\"-USB\""
|
2022-05-21 01:45:58 +00:00
|
|
|
-D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
|
|
|
|
-D USBCON
|
|
|
|
-D USBD_VID=0x0483
|
|
|
|
-D USB_MANUFACTURER="Unknown"
|
|
|
|
-D USB_PRODUCT="\"BLUEPILL_F103C8\""
|
|
|
|
-D HAL_PCD_MODULE_ENABLED
|
2022-05-22 17:53:57 +00:00
|
|
|
-w
|
|
|
|
-DARDUINO_GENERIC_STM32F103C
|
|
|
|
-DARDUINO_LIB_DISCOVERY_PHASE
|
|
|
|
-DARDUINO=10813
|
|
|
|
-DARDUINO_ARCH_STM32
|
|
|
|
-DDEBUG_LEVEL=DEBUG_NONE
|
|
|
|
-O2
|
|
|
|
build_unflags =
|
|
|
|
-Os
|
|
|
|
-DARDUINO_ARCH_STM32F1
|
|
|
|
upload_flags = -c set CPUTAPID 0
|
2022-05-19 00:43:56 +00:00
|
|
|
|
2021-01-18 16:05:08 +00:00
|
|
|
; [env:debug]
|
|
|
|
; build_type = debug
|
|
|
|
; debug_tool = stlink
|