Browse Source

More 'extend'ed environments (#18118)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
ellensp 4 years ago
parent
commit
a740b6b318
No account linked to committer's email address
1 changed files with 66 additions and 100 deletions
  1. 66
    100
      platformio.ini

+ 66
- 100
platformio.ini View File

56
   SlowSoftI2CMaster=https://github.com/mikeshub/SlowSoftI2CMaster/archive/master.zip
56
   SlowSoftI2CMaster=https://github.com/mikeshub/SlowSoftI2CMaster/archive/master.zip
57
   SoftwareSerialM=https://github.com/FYSETC/SoftwareSerialM/archive/master.zip
57
   SoftwareSerialM=https://github.com/FYSETC/SoftwareSerialM/archive/master.zip
58
 
58
 
59
+[common_avr8]
60
+board_build.f_cpu = 16000000L
61
+lib_deps          = ${common.lib_deps}
62
+  TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
63
+src_filter        = ${common.default_src_filter} +<src/HAL/AVR>
64
+
59
 # Globally defined properties
65
 # Globally defined properties
60
 # inherited by all environments
66
 # inherited by all environments
61
 [env]
67
 [env]
78
 # ATmega2560
84
 # ATmega2560
79
 #
85
 #
80
 [env:mega2560]
86
 [env:mega2560]
81
-platform          = atmelavr
82
-board             = megaatmega2560
83
-board_build.f_cpu = 16000000L
84
-lib_deps          = ${common.lib_deps}
85
-  TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
86
-src_filter        = ${common.default_src_filter} +<src/HAL/AVR>
87
+platform      = atmelavr
88
+extends       = common_avr8
89
+board         = megaatmega2560
87
 
90
 
88
 #
91
 #
89
 # ATmega1280
92
 # ATmega1280
90
 #
93
 #
91
 [env:mega1280]
94
 [env:mega1280]
92
-platform          = atmelavr
93
-board             = megaatmega1280
94
-board_build.f_cpu = 16000000L
95
-lib_deps          = ${common.lib_deps}
96
-  TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
97
-src_filter        = ${common.default_src_filter} +<src/HAL/AVR>
95
+platform      = atmelavr
96
+extends       = common_avr8
97
+board         = megaatmega1280
98
 
98
 
99
 #
99
 #
100
 # MightyBoard ATmega2560 (MegaCore 100 pin boards variants)
100
 # MightyBoard ATmega2560 (MegaCore 100 pin boards variants)
101
 #
101
 #
102
 [env:MightyBoard1280]
102
 [env:MightyBoard1280]
103
-platform          = atmelavr
104
-board             = ATmega1280
105
-board_build.f_cpu = 16000000L
106
-lib_deps          = ${common.lib_deps}
107
-  TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
108
-src_filter        = ${common.default_src_filter} +<src/HAL/AVR>
109
-upload_speed      = 57600
103
+platform      = atmelavr
104
+extends       = common_avr8
105
+board         = megaatmega1280
106
+upload_speed  = 57600
110
 
107
 
111
 #
108
 #
112
 # MightyBoard ATmega2560 (MegaCore 100 pin boards variants)
109
 # MightyBoard ATmega2560 (MegaCore 100 pin boards variants)
113
 #
110
 #
114
 [env:MightyBoard2560]
111
 [env:MightyBoard2560]
115
-platform          = atmelavr
116
-board             = ATmega2560
117
-board_build.f_cpu = 16000000L
118
-lib_deps          = ${common.lib_deps}
119
-  TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
120
-src_filter        = ${common.default_src_filter} +<src/HAL/AVR>
121
-upload_protocol   = wiring
122
-upload_speed      = 57600
112
+platform      = atmelavr
113
+extends       = common_avr8
114
+board         = megaatmega2560
115
+upload_protocol = wiring
116
+upload_speed  = 57600
123
 board_upload.maximum_size = 253952
117
 board_upload.maximum_size = 253952
124
 
118
 
125
 #
119
 #
126
 # RAMBo
120
 # RAMBo
127
 #
121
 #
128
 [env:rambo]
122
 [env:rambo]
129
-platform          = atmelavr
130
-board             = reprap_rambo
131
-board_build.f_cpu = 16000000L
132
-lib_deps          = ${common.lib_deps}
133
-  TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
134
-src_filter        = ${common.default_src_filter} +<src/HAL/AVR>
123
+platform      = atmelavr
124
+extends       = common_avr8
125
+board         = reprap_rambo
135
 
126
 
136
 #
127
 #
137
 # FYSETC F6 V1.3
128
 # FYSETC F6 V1.3
138
 #
129
 #
139
 [env:FYSETC_F6_13]
130
 [env:FYSETC_F6_13]
140
-platform          = atmelavr
141
-board             = fysetc_f6_13
142
-board_build.f_cpu = 16000000L
143
-lib_deps          = ${common.lib_deps}
144
-  TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
145
-src_filter        = ${common.default_src_filter} +<src/HAL/AVR>
131
+platform      = atmelavr
132
+extends       = common_avr8
133
+board         = fysetc_f6_13
146
 
134
 
147
 #
135
 #
148
 # FYSETC F6 V1.4
136
 # FYSETC F6 V1.4
149
 #
137
 #
150
 [env:FYSETC_F6_14]
138
 [env:FYSETC_F6_14]
151
-platform          = atmelavr
152
-board             = fysetc_f6_14
153
-board_build.f_cpu = 16000000L
154
-lib_deps          = ${common.lib_deps}
155
-  TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
156
-src_filter        = ${common.default_src_filter} +<src/HAL/AVR>
139
+platform      = atmelavr
140
+extends       = common_avr8
141
+board         = fysetc_f6_14
157
 
142
 
158
 #
143
 #
159
 # Sanguinololu (ATmega644p)
144
 # Sanguinololu (ATmega644p)
160
 #
145
 #
161
 [env:sanguino644p]
146
 [env:sanguino644p]
162
 platform      = atmelavr
147
 platform      = atmelavr
148
+extends       = common_avr8
163
 board         = sanguino_atmega644p
149
 board         = sanguino_atmega644p
164
-lib_deps      = ${common.lib_deps}
165
-  TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
166
-src_filter    = ${common.default_src_filter} +<src/HAL/AVR>
167
 
150
 
168
 #
151
 #
169
 # Sanguinololu (ATmega1284p)
152
 # Sanguinololu (ATmega1284p)
170
 #
153
 #
171
 [env:sanguino1284p]
154
 [env:sanguino1284p]
172
 platform      = atmelavr
155
 platform      = atmelavr
156
+extends       = common_avr8
173
 board         = sanguino_atmega1284p
157
 board         = sanguino_atmega1284p
174
-lib_deps      = ${common.lib_deps}
175
-  TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
176
-src_filter    = ${common.default_src_filter} +<src/HAL/AVR>
177
 
158
 
178
 #
159
 #
179
 # Melzi and clones (ATmega1284p)
160
 # Melzi and clones (ATmega1284p)
180
 #
161
 #
181
 [env:melzi]
162
 [env:melzi]
182
 platform      = atmelavr
163
 platform      = atmelavr
164
+extends       = common_avr8
183
 board         = sanguino_atmega1284p
165
 board         = sanguino_atmega1284p
184
-lib_deps      = ${common.lib_deps}
185
-  TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
186
-src_filter    = ${common.default_src_filter} +<src/HAL/AVR>
187
 lib_ignore    = TMCStepper
166
 lib_ignore    = TMCStepper
188
 upload_speed  = 57600
167
 upload_speed  = 57600
189
 
168
 
192
 #
171
 #
193
 [env:melzi_optiboot]
172
 [env:melzi_optiboot]
194
 platform      = atmelavr
173
 platform      = atmelavr
195
-board         = sanguino_atmega1284p
196
-lib_deps      = ${common.lib_deps}
197
-  TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
198
-src_filter    = ${common.default_src_filter} +<src/HAL/AVR>
199
-lib_ignore    = TMCStepper
174
+extends       = env:melzi
200
 upload_speed  = 115200
175
 upload_speed  = 115200
201
 
176
 
202
 #
177
 #
208
 #
183
 #
209
 [env:at90usb1286_cdc]
184
 [env:at90usb1286_cdc]
210
 platform      = teensy
185
 platform      = teensy
186
+extends       = common_avr8
211
 board         = at90usb1286
187
 board         = at90usb1286
212
-lib_deps      = ${common.lib_deps}
213
-  TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
214
 lib_ignore    = TMCStepper
188
 lib_ignore    = TMCStepper
215
-src_filter    = ${common.default_src_filter} +<src/HAL/AVR>
216
 
189
 
217
 #
190
 #
218
 # AT90USB1286 boards using DFU bootloader
191
 # AT90USB1286 boards using DFU bootloader
222
 #
195
 #
223
 [env:at90usb1286_dfu]
196
 [env:at90usb1286_dfu]
224
 platform      = teensy
197
 platform      = teensy
225
-board         = at90usb1286
226
-lib_deps      = ${common.lib_deps}
227
-lib_ignore    = TMCStepper
228
-src_filter    = ${common.default_src_filter} +<src/HAL/AVR>
198
+extends       = env:at90usb1286_cdc
229
 
199
 
230
 #
200
 #
231
 # Due (Atmel SAM3X8E ARM Cortex-M3)
201
 # Due (Atmel SAM3X8E ARM Cortex-M3)
255
 #
225
 #
256
 # Archim SAM
226
 # Archim SAM
257
 #
227
 #
258
-[env:DUE_archim]
228
+[common_DUE_archim]
259
 platform      = atmelsam
229
 platform      = atmelsam
260
 board         = due
230
 board         = due
261
 src_filter    = ${common.default_src_filter} +<src/HAL/DUE>
231
 src_filter    = ${common.default_src_filter} +<src/HAL/DUE>
263
   -DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__ -DUSBCON
233
   -DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__ -DUSBCON
264
 extra_scripts = Marlin/src/HAL/DUE/upload_extra_script.py
234
 extra_scripts = Marlin/src/HAL/DUE/upload_extra_script.py
265
 
235
 
266
-[env:DUE_archim_debug]
236
+[env:DUE_archim]
237
+platform      = ${common_DUE_archim.platform}
238
+extends       = common_DUE_archim
239
+
267
 # Used when WATCHDOG_RESET_MANUAL is enabled
240
 # Used when WATCHDOG_RESET_MANUAL is enabled
268
-platform      = atmelsam
269
-board         = due
270
-src_filter    = ${common.default_src_filter} +<src/HAL/DUE>
271
-build_flags   = ${common.build_flags}
272
-  -DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__ -DUSBCON
273
-  -funwind-tables -mpoke-function-name
274
-extra_scripts = Marlin/src/HAL/DUE/upload_extra_script.py
241
+[env:DUE_archim_debug]
242
+platform      = ${common_DUE_archim.platform}
243
+extends       = common_DUE_archim
244
+build_flags   = ${common_DUE_archim.build_flags} -funwind-tables -mpoke-function-name
275
 
245
 
276
 #
246
 #
277
 # NXP LPC176x ARM Cortex-M3
247
 # NXP LPC176x ARM Cortex-M3
278
 #
248
 #
279
-[env:LPC1768]
249
+[common_LPC]
280
 platform          = https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/0.1.2.zip
250
 platform          = https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/0.1.2.zip
281
 board             = nxp_lpc1768
251
 board             = nxp_lpc1768
282
 build_flags       = -DU8G_HAL_LINKS -IMarlin/src/HAL/LPC1768/include -IMarlin/src/HAL/LPC1768/u8g ${common.build_flags}
252
 build_flags       = -DU8G_HAL_LINKS -IMarlin/src/HAL/LPC1768/include -IMarlin/src/HAL/LPC1768/u8g ${common.build_flags}
283
-# debug options for backtrace
284
-#  -funwind-tables
285
-#  -mpoke-function-name
286
 lib_ldf_mode      = off
253
 lib_ldf_mode      = off
287
 lib_compat_mode   = strict
254
 lib_compat_mode   = strict
288
 extra_scripts     = Marlin/src/HAL/LPC1768/upload_extra_script.py
255
 extra_scripts     = Marlin/src/HAL/LPC1768/upload_extra_script.py
293
   TMCStepper@>=0.6.2
260
   TMCStepper@>=0.6.2
294
   Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/release.zip
261
   Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/release.zip
295
   SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip
262
   SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip
296
-
297
-[env:LPC1769]
298
-platform          = https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/0.1.2.zip
299
-board             = nxp_lpc1769
300
-build_flags       = -DU8G_HAL_LINKS -IMarlin/src/HAL/LPC1768/include -IMarlin/src/HAL/LPC1768/u8g ${common.build_flags}
301
 # debug options for backtrace
263
 # debug options for backtrace
302
 #  -funwind-tables
264
 #  -funwind-tables
303
 #  -mpoke-function-name
265
 #  -mpoke-function-name
304
-lib_ldf_mode      = off
305
-lib_compat_mode   = strict
306
-extra_scripts     = Marlin/src/HAL/LPC1768/upload_extra_script.py
307
-src_filter        = ${common.default_src_filter} +<src/HAL/LPC1768>
308
-lib_deps          = Servo
309
-  LiquidCrystal
310
-  U8glib-HAL=https://github.com/MarlinFirmware/U8glib-HAL/archive/bugfix.zip
311
-  TMCStepper@>=0.6.2
312
-  Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/release.zip
313
-  SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip
266
+
267
+#
268
+# NXP LPC176x ARM Cortex-M3
269
+#
270
+[env:LPC1768]
271
+platform  = ${common_LPC.platform}
272
+extends   = common_LPC
273
+board     = nxp_lpc1768
274
+
275
+[env:LPC1769]
276
+platform  = ${common_LPC.platform}
277
+extends   = common_LPC
278
+board     = nxp_lpc1769
314
 
279
 
315
 #
280
 #
316
 # STM32F103RC
281
 # STM32F103RC
610
 platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver}
575
 platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver}
611
 board             = STEVAL_STM32F401VE
576
 board             = STEVAL_STM32F401VE
612
 build_flags       = ${common.build_flags}
577
 build_flags       = ${common.build_flags}
613
-  -DTARGET_STM32F4 -DARDUINO_STEVAL -DSTM32F401xE
614
-  -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 -DUSB_PRODUCT=\"STEVAL_F401VE\"
615
-  -DDISABLE_GENERIC_SERIALUSB -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
578
+  -DTARGET_STM32F4 -DSTM32F401xE -DUSBCON
579
+  -DUSBD_USE_CDC -DUSBD_VID=0x0483 -DUSB_PRODUCT=\"STEVAL_F401VE\"
580
+  -DARDUINO_STEVAL -DDISABLE_GENERIC_SERIALUSB
581
+  -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
616
   -IMarlin/src/HAL/STM32
582
   -IMarlin/src/HAL/STM32
617
 build_unflags     = -std=gnu++11
583
 build_unflags     = -std=gnu++11
618
 extra_scripts     = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
584
 extra_scripts     = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
628
 platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver}
594
 platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver}
629
 board             = FLYF407ZG
595
 board             = FLYF407ZG
630
 build_flags       = ${common.build_flags}
596
 build_flags       = ${common.build_flags}
631
-  -DSTM32F4 -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 -DUSB_PRODUCT=\"STM32F407ZG\"
632
-  -DTARGET_STM32F4 -DVECT_TAB_OFFSET=0x8000
633
-  -IMarlin/src/HAL/STM32
597
+  -DTARGET_STM32F4 -DSTM32F4 -DUSBCON
598
+  -DUSBD_USE_CDC -DUSBD_VID=0x0483 -DUSB_PRODUCT=\"STM32F407ZG\"
599
+  -DVECT_TAB_OFFSET=0x8000 -IMarlin/src/HAL/STM32
634
 build_unflags     = -std=gnu++11
600
 build_unflags     = -std=gnu++11
635
 extra_scripts     = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
601
 extra_scripts     = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
636
 lib_ignore        = Adafruit NeoPixel, SailfishLCD, SlowSoftI2CMaster, SoftwareSerial
602
 lib_ignore        = Adafruit NeoPixel, SailfishLCD, SlowSoftI2CMaster, SoftwareSerial

Loading…
Cancel
Save