From 24e1612fc7dd6a6fa10b85199e2f8a7193749b53 Mon Sep 17 00:00:00 2001 From: Eric Helgeson Date: Sun, 17 Apr 2022 15:10:35 -0500 Subject: [PATCH] Add build env for xcvr --- platformio.ini | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/platformio.ini b/platformio.ini index f094f3e..6b8bde1 100644 --- a/platformio.ini +++ b/platformio.ini @@ -1,20 +1,11 @@ ; PlatformIO Project Configuration File https://docs.platformio.org/page/projectconf.html - -[env:genericSTM32F103C8] -platform = ststm32 -board = genericSTM32F103C8 -board_build.mcu = stm32f103c8t6 -board_build.core = maple +[env] framework = arduino lib_deps = greiman/SdFat @ ^2.0.6 upload_protocol = stlink ; Different gcc versions produce much different binaries in terms of speed. platform_packages = platformio/toolchain-gccarmnoneeabi@1.90301.200702 - -build_unflags = - -Os - -DARDUINO_ARCH_STM32F1 build_flags = -w -DARDUINO_GENERIC_STM32F103C @@ -23,11 +14,21 @@ build_flags = -DARDUINO_ARCH_STM32 -DDEBUG_LEVEL=DEBUG_NONE -O2 - -; Work around for clones. -; https://community.platformio.org/t/cannot-upload-to-stm32-bluepill-board-over-stlink-v2/3492/25 +build_unflags = + -Os + -DARDUINO_ARCH_STM32F1 upload_flags = -c set CPUTAPID 0 +[env:STM32F103C8] +platform = ststm32 +board = genericSTM32F103C8 +board_build.mcu = stm32f103c8t6 +board_build.core = maple + +[env:STM32F103C8-XCVR] +extends = env:STM32F103C8 +build_flags = ${env.build_flags} -DXCVR + ; [env:debug] ; build_type = debug ; debug_tool = stlink