-
Notifications
You must be signed in to change notification settings - Fork 31
/
platformio.ini
447 lines (401 loc) · 22.9 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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
;
; SMuFF PlatformIO Project Configuration File
;
#=======================================================================================================================
# IMPORTANT: From version 3.24 on you don't have to deal with these settings anymore, since those can all be
# modified in the new Firmware-Build Configurator dialog. Simply start the build and pick the options
# you want.
# Although, changes made here will be shown in the dialog window.
# Setting the config_defaults allows you to define a customized standard set of options.
#=======================================================================================================================
[config_defaults]
# add your Firmware-Build Configurator defaults for the according controller here,
# each separated by a ',' and without the preceding '-D'
#SKR_E3_30_RET6 = USE_DDE, USE_CREALITY_DISPLAY, USE_FAST_SW_SPI, USE_FASTLED_TOOLS, USE_MULTISERVO, USE_SPOOLMOTOR
SKR_E3_30_RET6 = USE_MINI12864_PANEL_V21, USE_MULTISERVO, USE_MULTISERVO_RELAY, USE_DRYER
SKR_E3DIP_RET6 = USE_MINI12864_PANEL_V21, USE_FASTLED_BACKLIGHT
SKR_E3_20_RET6 = USE_LEONERD_DISPLAY, USE_FASTLED_TOOLS
#-----------------------------------------------------------------------------------------------------------------------
# NECESSARY SETTINGS
#
# Pick the display type you're using by removing the comment char (;) accordingly
# For details about software/hardware SPI see:
# https://sites.google.com/view/the-smuff/tips-hints/using-other-displays
#-----------------------------------------------------------------------------------------------------------------------
[display]
build_flags = #======================================================================
# FYSETC / MKS / BTT mini panel 12864 (recommended)
# Only hardware SPI is available
#
# This setting has become the default now, because those displays are the
# easiest to source and mostly the cheapest option
#======================================================================
;-D USE_MINI12864_PANEL_V21 -D USE_FASTLED_BACKLIGHT
#======================================================================
# Creality or BTT-TFT 2.4 / 3.5 displays
# Pick either (fast) software SPI or hardware SPI
#======================================================================
;-D USE_CREALITY_DISPLAY
;-D USE_FAST_SW_SPI # uncomment for using fast software SPI
;-D CREALITY_HW_SPI # uncomment for using hardware SPI instead
# Be aware that you'll need a special cable for the latter option
#======================================================================
# Standard RepRap Full Graphics Display (i.e. MKS mini 12864)
# Only hardware SPI is available
#======================================================================
;-D USE_DEFAULT_DISPLAY
#======================================================================
# My DIY OLED display (uses I2C/TWI interface)
#======================================================================
;-D USE_TWI_DISPLAY
;-D USE_SW_TWI # for SKR V2.0 only!
#======================================================================
# LeoNerd's/GMagicians OLED Module display (uses I2C/TWI interface)
# Enable USE_SW_TWI only on SKR E3 V2.0 board!
#======================================================================
;-D USE_LEONERD_DISPLAY
;-D USE_SW_TWI # for SKR V2.0 only!
#======================================================================
# SMuFF-TFT display attached to TTL serial port on EXP1
# Such display is not available yet. If you enable this, the only way
# to control the SMuFF is via SMuFF WebInterface!
#======================================================================
;-D USE_SERIAL_DISPLAY -D DISPLAY_SERIAL_PORT=1
[other]
build_flags = #----------------------------------------------------------------------
# These build options are now integrated into the according build environments
# (SKR_E3_30_RET6__xxx) and don't have to be set here anymore, unless you're
# using a different board than the SKR Mini E3 V3.0:
#
# Build Environment suffixes are:
# -------------------------------
# _NPX - use NeoPixels for tools
# _MS - use Multiservo board (i.e. FeatherWing Servo)
# _SPM - use the Spool-Motor option
# _DDE - build for Direct Drive Extruder
#
# More than one suffix means it's a combination of the according options.
#----------------------------------------------------------------------
#======================================================================
# defines whether or not you're going to use NeoPixels on tools.
#
# Please notice: The USE_NUM_PIXELS definition has moved into the
# SMuFF-Config and is now configureable at runtime!
#======================================================================
; ${neopixels.build_flags}
#======================================================================
# The following defines determine whether or not you're going to use the
# Adafruit Multiservo option.
#======================================================================
; ${multiservo.build_flags}
#======================================================================
# The following defines determine whether or not you're going to use the
# Spool-Motor option.
#======================================================================
; ${spoolmotor.build_flags}
; [neopixels]
; build_flags = -D USE_FASTLED_TOOLS
; [multiservo]
; build_flags = # Do not change the PCA9685_FREQ unless you have an osciloscope to verify the new frequency setting!
; -D USE_MULTISERVO -D USE_PCA9685_SW_I2C -D PCA9685_FREQ=27750000
; # Do not enable the USE_MULTISERVO_RELAY option unless you have the custom Backbone PCB installed!
; ; -D USE_MULTISERVO_RELAY # Relay is controlled by the SMuFF-Backbone board
; [spoolmotor]
; build_flags = # Do not change the PCA9685_FREQ_MOTORx unless you have an osciloscope to verify the new frequency setting!
; -D USE_SPOOLMOTOR -D USE_PCA9685_SW_I2C -D PCA9685_FREQ_MOTOR1=27750000 -D PCA9685_FREQ_MOTOR2=27750000 -D PCA9685_FREQ_MOTOR3=27750000
; [dryer]
; build_flags = USE_DRYER
#-----------------------------------------------------------------------------------------------------------------------
# SPECIAL OPTIONS
#
# Set special options by adding or removing the comment char (;) only if you're instructed to do so!
#-----------------------------------------------------------------------------------------------------------------------
[options]
build_flags = -D SMUFF_V5 # this compiles the firmware for V5/V6
;-D USE_ZSERVO
;-D DEBUG # comment out this define to get rid of any debug messages
;-D __HW_DEBUG__ # comment out this define to disable the 500Hz signal on the debug pin
-D NEVER_DISABLE_SERVOS # don't disable servos after they have been activated (Wiper/Cutter only - ignored on Multiservo Board)
;-D MARLIN2_ONLY # uncomment this define _only_ if you're compiling for Marlin 2.0 with MMU2
;-D SOFTRESET # uncomment this define in case your bootloader sends data to (USB) serial port after RESET
;-D SWAP_Y_STEPPER # special case for E3-V2.0 / E3-V3.0 - swaps Y with E stepper driver
;-D SWAP_X_STEPPER # special case for E3-V3.0 - swaps X with E stepper driver
;-D SWAP_SELECTOR_ENDSTOP # special case for E3-V3.0 - swaps X and Y endstop signal pins
;-D USE_PCA9685_SW_I2C # common settings for Multiservo and Spool-Motors
-D PCA9685_FREQ=27750000 # Do not change the PCA9685_FREQ_x unless you have an osciloscope to verify the new frequency setting!
-D PCA9685_FREQ_MOTOR1=27750000
-D PCA9685_FREQ_MOTOR2=27750000
-D PCA9685_FREQ_MOTOR3=27750000
-D PCA9685_FREQ_MOTOR4=27750000
#-----------------------------------------------------------------------------------------------------------------------
# SPECIAL FLAGS (don't use unless you really know what they're for)
#-----------------------------------------------------------------------------------------------------------------------
[relay]
build_flags = # uncomment the following define if your relay is connected to the "PROBE" pin (old connection point)
;-D RELAY_ON_YSTOP # special case for E3-DIP (use only if instructed to)
;-D RELAY_ON_PROBE
#-----------------------------------------------------------------------------------------------------------------------
# BUILD CONFIGURATIONS
#-----------------------------------------------------------------------------------------------------------------------
[platformio]
default_envs = SKR_E3_30_RET6
#
# STM32 common build flags for USB port usage
#
[USB]
build_flags = -D ENABLE_USB_SERIAL
-D SERIAL_USB
-D USBD_USE_CDC
-D USBCON
# modified USB Manufacturer and Product strings
;-D USB_MANUFACTURER_STRING='"STMicroelectronics"' # is being set by the STM library by default
-D USB_PRODUCT_STRING='"SMuFF 3.x CDC in FS mode"'
[USB_EXTRA]
build_flags = # Mimics LeafLabs Maple USB ID. To disable that comment out the following line.
-D MIMIC_LIBMAPLE_USB_ID -D USBD_VID=0x1eaf -D USBD_PID=0x0004
#
# include these if your board is equipped with TMC stepper drivers by default
# and set the definitions accordingly
#
[TMC]
lib_deps = https://github.com/teemuatlut/TMCStepper # library being used for TMC stepper drivers
build_flags = -D HAS_TMC_SUPPORT
-D TMC_SW_BAUDRATE=19200
-D TMC_HW_BAUDRATE=250000
[common]
build_type = release
build_flags = # some compiler options to get rid of not really critical messages while compiling
-Wno-unused-variable
-Wno-format-extra-args
-Wno-misleading-indentation
# U8G2 library wrappers
-Wl,--wrap=u8g2_UserInterfaceSelectionList
-Wl,--wrap=u8x8_byte_arduino_2nd_hw_spi
-Wl,--wrap=u8g2_UserInterfaceMessage
-std=gnu++14
-Os
-g0 # generate debug information, use: -g for default, -g1 for minimal, -g3 for maximal or -g0 for no debug information
# new for Arduino_Core_STM32
-D USE_SDFAT
# new (doesn't compile without) for 'framework-arduinoststm32' V2.4.0 (a.k.a. @~4.20400)
-UNDEBUG
build_src_filter = +<*> -<.git/> -<.svn/> -<example/> -<examples/> -<test/> -<tests/>
-<Configs/> -<docs/> -<help/> -<images/> -<menus/> -<options/> -<Schematics/> -<sounds/> -<STL> -<USB-Driver>
-<src/ClockConfig/>
build_unflags = -std=gnu++11
lib_deps = https://github.com/greiman/SdFat.git#2.2.0 # SD-Card file system library
https://github.com/bblanchon/ArduinoJson.git#v6.21.2 # JSON library for the configuration file
https://github.com/olikraus/U8G2_Arduino.git#2.34.22 # LC-Display library
https://github.com/technik-gegg/SoftWireSTM32.git # library for Software I2C
https://github.com/technik-gegg/LeoNerd-OLED-Module-Library.git # my own library for LeoNerd's OLED Module
https://github.com/technik-gegg/Adafruit-PWM-Servo-Driver-Library.git @ ~2.4.0 # my modified Adafruit Multi-Servo library for software I2C
Wire # should be included by default because of the dependencies
SPI # but sometimes that doesn't happen...
[AdaNeoPx]
lib_deps = https://github.com/adafruit/Adafruit_NeoPixel.git # Adafruit Neopixel library
build_flags =
[STM32_COMMON]
platform = ststm32@=17.6.0 #17.3.0
#platform_packages = framework-arduinoststm32@=4.20000.210603 # for RCT6 (otherwise you'll get a FLASH overflow)
#platform_packages = framework-arduinoststm32@~4.20701 # for non RCT6
platform_packages = framework-arduinoststm32@~4.20801.240815 # for non RCT6
framework = arduino
board_build.core = stm32duino # using default core
extra_scripts = include/scripts/SKR_FW_RELOC.py
pre:include/scripts/FW_BUILD_CONFIG.py
#-----------------------------------------------------------------------------------------------------------------------
# BUILD ENVIRONMENTS
#-----------------------------------------------------------------------------------------------------------------------
#
# BIGTREETECH SKR E3 V3.0 RET6 MCU (flashing through SD-Card, using the default bootloader)
#
[env:SKR_E3_30_RET6]
extends = STM32_COMMON
board = STM32G0B1RE
board_build.variants_dir = variants # needed for E3 V3.0
lib_deps = ${common.lib_deps}
${TMC.lib_deps}
${AdaNeoPx.lib_deps}
build_src_filter = ${common.build_src_filter} +<src/ClockConfig/E3_G0/>
build_flags = ${common.build_flags}
${display.build_flags}
${other.build_flags}
${options.build_flags}
${USB.build_flags}
${TMC.build_flags}
${AdaNeoPx.build_flags}
-I include/SKR_mini_E3-3.0
-D __BRD_SKR_MINI_E3
-D __STM32G0XX
-D ARDUINO_ARCH_STM32
-D ENABLE_HWSERIAL1
;-D ENABLE_HWSERIAL2
-D ENABLE_HWSERIAL3
;-D ENABLE_HWSERIAL4
-D FLASH_OFFSET="0x2000" # flash memory offset for SKR bootloader
;-D USE_OLD_CLOCK_SETTINGS # remove or comment out in case the board doesn't show up on Raspberry/Windows
build_unflags = ${common.build_unflags}
debug_tool = stlink
#
# BIGTREETECH SKR MINI E3-DIP V1.1 with RET6 MCU (flashing through SD-Card, using the default bootloader)
#
[env:SKR_E3DIP_RET6] # <-- newer boards are RET6
extends = STM32_COMMON
board = genericSTM32F103RE
lib_deps = ${common.lib_deps}
${AdaNeoPx.lib_deps}
build_src_filter = ${common.build_src_filter} +<src/ClockConfig/E3_F1/>
build_flags = ${common.build_flags}
${display.build_flags}
${other.build_flags}
${options.build_flags}
${USB.build_flags}
${AdaNeoPx.build_flags}
-I include/SKR_mini_E3DIP
-D __BRD_SKR_MINI_E3DIP
-D __STM32F1XX
-D DISABLE_DEBUG_PORT
-D ARDUINO_ARCH_STM32
-D ENABLE_HWSERIAL1
-D ENABLE_HWSERIAL3
-D ENABLE_HWSERIAL4
-D FLASH_OFFSET="0x7000" # flash memory offset for SKR bootloader
${relay.build_flags}
build_unflags = ${common.build_unflags}
# The following two build evnironments have been removed from the list because
# these controller bords became outdated now.
#
# BIGTREETECH SKR E3-DIP V1.1 with RCT6 MCU (flashing through SD-Card, using the default bootloader)
#
; [env:SKR_E3DIP_RCT6] # <-- older boards are RCT6
; extends = env:SKR_E3DIP_RET6
; board = genericSTM32F103RC
#
# BIGTREETECH SKR E3 V2.0 with RET6 MCU (flashing through SD-Card, using the default bootloader)
#
[env:SKR_E3_20_RET6] # <-- newer boards are RET6
extends = STM32_COMMON
board = genericSTM32F103RE
lib_deps = ${common.lib_deps}
${TMC.lib_deps}
${AdaNeoPx.lib_deps}
build_src_filter = ${common.build_src_filter} +<src/ClockConfig/E3_F1/>
build_flags = ${common.build_flags}
${display.build_flags}
${other.build_flags}
${options.build_flags}
${USB.build_flags}
${USB_EXTRA.build_flags}
${TMC.build_flags}
${AdaNeoPx.build_flags}
-I include/SKR_mini_E3-2.0
-D __BRD_SKR_MINI_E3
-D __STM32F1XX
-D DISABLE_DEBUG_PORT
-D ARDUINO_ARCH_STM32
-D ENABLE_HWSERIAL1
-D ENABLE_HWSERIAL3
-D ENABLE_HWSERIAL4
-D FLASH_OFFSET="0x7000" # flash memory offset for SKR bootloader
build_unflags = ${common.build_unflags}
# The following two build evnironments have been removed from the list because
# these controller bords became outdated now.
#
# BIGTREETECH SKR E3 V2.0 with RCT6 MCU (flashing through SD-Card, using the default bootloader)
#
; [env:SKR_E3_20_RCT6] # <-- older boards are RCT6
; extends = env:SKR_E3_20_RET6
; board = genericSTM32F103RC
#
# Please notice:
# The SKR E3 V1.2 board has been removed from the list of supported controllers for V6
# because it lacks in some essential components. Using E3 V2.0 or better E3 V3.0 instead
# will give you less headache.
# If you need to compile for V1.2, remove comment sign down below and do it at your own risk.
#
# BIGTREETECH SKR E3 V1.2 (flashing through SD-Card, using the default bootloader)
#
; [env:SKR_E3_12_RCT6]
; extends = STM32_COMMON
; board = genericSTM32F103RC
; lib_deps = ${common.lib_deps}
; ${TMC.lib_deps}
; ${AdaNeoPx.lib_deps}
; build_src_filter = ${common.build_src_filter} +<src/ClockConfig/E3_F1/>
; build_flags = ${common.build_flags}
; ${display.build_flags}
; ${other.build_flags}
; ${options.build_flags}
; ${USB.build_flags}
; ${USB_EXTRA.build_flags}
; ${TMC.build_flags}
; ${AdaNeoPx.build_flags}
; -I include/SKR_mini_E3-1.2
; -D __BRD_SKR_MINI_E3
; -D __STM32F1XX
; -D ARDUINO_ARCH_STM32
; -D ENABLE_HWSERIAL1
; #-D ENABLE_HWSERIAL2
; -D ENABLE_HWSERIAL3
; -D ENABLE_HWSERIAL4
; -D FLASH_OFFSET="0x7000" # flash memory offset for SKR bootloader
; build_unflags = ${common.build_unflags}
#
# BIGTREETECH SKR MINI V1.1 (flashing through SD-Card, using the default bootloader)
#
; [env:SKR_MINI_RCT6]
; extends = STM32_COMMON
; board = genericSTM32F103RC
; lib_deps = ${common.lib_deps}
; ${AdaNeoPx.lib_deps}
; build_src_filter = ${common.build_src_filter} +<src/ClockConfig/E3_F1/>
; build_flags = ${common.build_flags}
; ${display.build_flags}
; ${other.build_flags}
; ${options.build_flags}
; ${USB.build_flags}
; ${USB_EXTRA.build_flags}
; ${AdaNeoPx.build_flags}
; -I include/SKR_mini
; -D __BRD_SKR_MINI
; -D __STM32F1XX
; -D ARDUINO_ARCH_STM32
; -D ENABLE_HWSERIAL1
; -D ENABLE_HWSERIAL3
; #-D ENABLE_HWSERIAL4
; -D FLASH_OFFSET="0x7000" # flash memory offset for SKR bootloader
; build_unflags = ${common.build_unflags}
#--------------------------------------------------------
# WARNING: This board has never been tested!
#--------------------------------------------------------
#
# BIGTREETECH SKR E3 RRF (flashing through SD-Card, using the default bootloader)
#
; [env:SKR_E3_RRF_VGT6]
; extends = STM32_COMMON
; board = genericSTM32F407VGT6
; lib_deps = ${common.lib_deps}
; ${TMC.lib_deps}
; ${AdaNeoPx.lib_deps}
; build_src_filter = ${common.build_src_filter} +<src/ClockConfig/E3_F4/>
; build_flags = -D WARNING_NOT_RELEASED
; ${common.build_flags}
; ${display.build_flags}
; ${other.build_flags}
; ${options.build_flags}
; ${USB.build_flags}
; ${TMC.build_flags}
; ${AdaNeoPx.build_flags}
; -I include/SKR_E3-RRF
; -D __BRD_SKR_E3_RRF
; -D __STM32F4XX
; -D STM32_HIGH_DENSITY
; -D ARDUINO_ARCH_STM32
; -D ENABLE_HWSERIAL1
; -D ENABLE_HWSERIAL2
; -D ENABLE_HWSERIAL3
; #-D ENABLE_HWSERIAL4
; -D FLASH_OFFSET="0x8000" # flash memory offset for SKR bootloader
; build_unflags = ${common.build_unflags}
; -U USE_FASTLED_TOOLS
; -U USE_FASTLED_BACKLIGHT