forked from grblHAL/STM32F4xx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
platformio.ini
229 lines (219 loc) · 7.52 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
# This is the configuration file for PlatformIO, a cross-platform tool and IDE
# to build and develop software for embedded systems.
#
# To build the firmware with PlatformIO, install PlatformIO Core (CLI, no GUI):
# - https://docs.platformio.org/en/latest//core/installation.html
#
# For documentation on this file, see:
# - https://docs.platformio.org/en/latest/projectconf/index.html
#
# To add support for another STM32F1xx board, add a new [env:name..] section
# with the appropriate `board` and (optionally) `board_build.ldscript`.
# For a list of supported hardware, see:
# - https://docs.platformio.org/en/latest/platforms/ststm32.html
#
# To add support for additional grblHAL plugins or drivers, make the necessary
# changes to the common.build_flags, common.lib_deps and common.lib_extra_dirs
# below.
#
# By default this file sets the preprocessor directive `OVERRIDE_MY_MACHINE`
# to ignore all settings in `Inc/my_machine.h`. Instead, you should edit this
# file and add the necessary directives (e.g. `-D FOOBAR_ENABLE`) to either
# `common.build_flags` or the environment specific `build_flags`.
#
# Typical command line usage:
#
# # Build firmware for all defined environments
# pio run
# # Build only for specific environments with the -e option
# pio run -e BTT_SKR_MINI_E3_V20 -e BTT_SKR_MINI_E3_V20_USB
# # List the freshly built firmware ELF (.elf) and binary (.bin) files:
# ls -l .pio/build/*/firmware.*
# # If the target supports uploading (via `upload_protocol`):
# pio run -e bluepill_f103c8_128k -t upload
# # Clean up build related resources
# pio run -t clean
#
[platformio]
include_dir = Inc
src_dir = Src
[common]
build_flags =
-I .
-I FatFS
-I Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc
-I Middlewares/ST/STM32_USB_Device_Library/Core/Inc
-I USB_DEVICE/Target
# Ignore all settings in Inc/my_machine.h (and instead use the below build flags)
-D OVERRIDE_MY_MACHINE
# Uncomment to enable debug builds
#-D DEBUG
# Uncomment to enable support for keypad
#-D KEYPAD_ENABLE=1
# Uncomment to enable support for odometer
#-D ODOMETER_ENABLE=1
# Uncomment to enable support for running G-code from the microSD card
# You also need to uncomment FatFS and sdcard in lib_deps (see below)
#-D SDCARD_ENABLE=1
# Set to 1 or 2 (see Inc/my_machine.h)
#-D SPINDLE_HUANYANG=1
lib_deps =
bluetooth
grbl
keypad
laser
motors
odometer
# To enable support for SD card, you must grab a copy FatFS:
# curl -O http://elm-chan.org/fsw/ff/arc/ff14b.zip
# unzip ff14b.zip 'source/*'
# mv source/* FatFS
# rm -fr ff14b.zip source FatFS/diskio.c
# Next, apply the changes outlined in FatFS/README.md and then
# uncomment `FatFS` and `sdcard` below.
#FatFS
#sdcard
spindle
# USB serial support
Core
Class
App
Target
lib_extra_dirs =
.
FatFS
Middlewares/ST/STM32_USB_Device_Library
USB_DEVICE
[env]
platform = ststm32
platform_packages = framework-stm32cubef4 @ ~1.26.2
framework = stm32cube
# Do not produce .a files for lib deps (which would prevent them from overriding weak symbols)
lib_archive = no
lib_ldf_mode = off
[env:btt_skr_pro_1_1]
# Untested and might not boot. Please report issues at:
# https://github.com/grblHAL/STM32F4xx/issues
board = genericSTM32F407VGT6
board_build.ldscript = STM32F407VGTX_FLASH.ld
build_flags = ${common.build_flags}
# See Inc/my_machine.h for options
-D BOARD_BTT_SKR_PRO_1_1=
# 8MHz crystal
-D HSE_VALUE=25000000
# Boot loader offset (32K)
-D VECT_TAB_OFFSET=0x8000
lib_deps = ${common.lib_deps}
eeprom
lib_extra_dirs = ${common.lib_extra_dirs}
# Upload is not supported for this board since BOOT0 is tied to GND.
# With the default boot loader, you must deploy new firmware by copying
# .pio/build/<env name>/firmware.bin (produced by `pio run`) to the SD card.
[env:btt_skr_2_tmc2130]
# Untested and might not boot. Please report issues at:
# https://github.com/grblHAL/STM32F4xx/issues
board = genericSTM32F407VGT6
board_build.ldscript = STM32F407VGTX_FLASH.ld
build_flags = ${common.build_flags}
# See Inc/my_machine.h for options
-D BOARD_BTT_SKR_20=
-D HSE_VALUE=8000000
-D USB_SERIAL_CDC=1
# Boot loader offset (32K)
-D VECT_TAB_OFFSET=0x8000
# TMC2130 stepper drivers
-D TRINAMIC_ENABLE=2130
lib_deps = ${common.lib_deps}
eeprom
trinamic
lib_extra_dirs = ${common.lib_extra_dirs}
# Upload is not supported for this board since BOOT0 is tied to GND.
# With the default boot loader, you must deploy new firmware by copying
# .pio/build/<env name>/firmware.bin (produced by `pio run`) to the SD card.
[env:btt_skr_2_tmc5160]
# Untested and might not boot. Please report issues at:
# https://github.com/grblHAL/STM32F4xx/issues
board = genericSTM32F407VGT6
board_build.ldscript = STM32F407VGTX_FLASH.ld
build_flags = ${common.build_flags}
# See Inc/my_machine.h for options
-D BOARD_BTT_SKR_20=
-D HSE_VALUE=8000000
-D USB_SERIAL_CDC=1
# Boot loader offset (32K)
-D VECT_TAB_OFFSET=0x8000
# TMC5160 stepper drivers
-D TRINAMIC_ENABLE=5160
lib_deps = ${common.lib_deps}
eeprom
trinamic
lib_extra_dirs = ${common.lib_extra_dirs}
# Upload is not supported for this board since BOOT0 is tied to GND.
# With the default boot loader, you must deploy new firmware by copying
# .pio/build/<env name>/firmware.bin (produced by `pio run`) to the SD card.
[env:nucleo_f411re_morpho_cnc]
board = nucleo_f411re
board_build.ldscript = STM32F411CEUX_FLASH.ld
build_flags = ${common.build_flags}
# See Inc/my_machine.h for options
-D BOARD_MORPHO_CNC=
-D NUCLEO_F411=
lib_deps = ${common.lib_deps}
eeprom
lib_extra_dirs = ${common.lib_extra_dirs}
# Alternatively, place the .pio/build/<env name>/firmware.bin on the NODE_F4xxRE drive
upload_protocol = stlink
[env:nucleo_f411re_protoneer]
board = nucleo_f411re
board_build.ldscript = STM32F411CEUX_FLASH.ld
build_flags = ${common.build_flags}
# See Inc/my_machine.h for options
-D BOARD_PROTONEER_3XX=
-D NUCLEO_F411=
# Uncomment to enable Spindle PWM output on the SpinDir pin
#-D PROTONEER_SPINDLE_PWM=
lib_deps = ${common.lib_deps}
eeprom
lib_extra_dirs = ${common.lib_extra_dirs}
# Alternatively, place the .pio/build/<env name>/firmware.bin on the NODE_F4xxRE drive
upload_protocol = stlink
[env:nucleo_f446re_morpho_cnc]
board = nucleo_f446re
board_build.ldscript = STM32F411CEUX_FLASH.ld
build_flags = ${common.build_flags}
# See Inc/my_machine.h for options
-D BOARD_MORPHO_CNC=
-D NUCLEO_F446=
lib_deps = ${common.lib_deps}
eeprom
lib_extra_dirs = ${common.lib_extra_dirs}
# Alternatively, place the .pio/build/<env name>/firmware.bin on the NODE_F4xxRE drive
upload_protocol = stlink
[env:nucleo_f446re_protoneer]
board = nucleo_f446re
board_build.ldscript = STM32F411CEUX_FLASH.ld
build_flags = ${common.build_flags}
# See Inc/my_machine.h for options
-D BOARD_PROTONEER_3XX=
-D NUCLEO_F446=
# Uncomment to enable Spindle PWM output on the SpinDir pin
#-D PROTONEER_SPINDLE_PWM=
lib_deps = ${common.lib_deps}
eeprom
lib_extra_dirs = ${common.lib_extra_dirs}
# Alternatively, place the .pio/build/<env name>/firmware.bin on the NODE_F4xxRE drive
upload_protocol = stlink
[env:blackpill_f411ce]
board = blackpill_f411ce
board_build.ldscript = STM32F411CEUX_FLASH.ld
build_flags = ${common.build_flags}
# See Inc/my_machine.h for options
-D BOARD_BLACKPILL=
-D USB_SERIAL_CDC=1
# Uncomment to enable Spindle PWM output on the SpinDir pin
#-D PROTONEER_SPINDLE_PWM=
lib_deps = ${common.lib_deps}
lib_extra_dirs = ${common.lib_extra_dirs}
# Alternatively, place the .pio/build/<env name>/firmware.bin on the NODE_F4xxRE drive
; change MCU frequency
upload_protocol = dfu