-
Notifications
You must be signed in to change notification settings - Fork 0
/
platformio.ini
94 lines (86 loc) · 2.51 KB
/
platformio.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
; PlatformIO Project Configuration File https://docs.platformio.org/page/projectconf.html
[platformio]
default_envs = STM32F1
[env]
framework = arduino
lib_deps =
greiman/SdFat @ 2.2.0
upload_protocol = stlink
; Different gcc versions produce much different binaries in terms of speed.
platform_packages = platformio/[email protected]
build_flags =
-DARDUINO_GENERIC_STM32F103C
-DARDUINO_LIB_DISCOVERY_PHASE
-DARDUINO=10813
-DARDUINO_ARCH_STM32
-DDEBUG_LEVEL=DEBUG_NONE
-O2
-D BUILD_TAGS="\"\""
build_unflags =
-Os
-DARDUINO_ARCH_STM32F1
upload_flags = -c set CPUTAPID 0
[env:STM32F1]
platform = ststm32
board = genericSTM32F103C8
board_build.mcu = stm32f103c8t6
board_build.core = maple
[env:STM32F1-XCVR]
extends = env:STM32F1
build_flags = ${env.build_flags}
-DXCVR
-D BUILD_TAGS="\"-XCVR\""
[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\""
-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
# 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.2.0
upload_protocol = dfu
; Different gcc versions produce much different binaries in terms of speed.
platform_packages = platformio/[email protected]
build_flags =
-D BUILD_TAGS="\"-USB\""
-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
-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
; [env:debug]
; build_type = debug
; debug_tool = stlink