forked from MarlinFirmware/Marlin
-
Notifications
You must be signed in to change notification settings - Fork 17
/
stm32f1-maple.ini
448 lines (410 loc) · 15.1 KB
/
stm32f1-maple.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
447
448
#
# Marlin Firmware
# PlatformIO Configuration File
#
#################################
#
# STM32F1 Architecture with LibMaple STM32F1 HAL
#
# Naming Example: STM32F103RCT6
#
# F : Foundation (sometimes High Performance F2/F4)
# 1 : Cortex M3 core (0:M0, 1-2:M3, 3-4:M4, 7:M7)
# 03 : Line/Features
# R : 64 or 66 pins (V:100, Z:144, I:176)
# C : 256KB Flash-memory (D:384KB, E:512KB, G:1024KB)
# T : LQFP package
# 6 : -40...85°C (7: ...105°C)
#
#################################
#
# HAL/STM32F1 Common Environment values
#
[STM32F1_maple]
platform = ststm32@~12.1
board_build.core = maple
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
${common.build_flags} -DARDUINO_ARCH_STM32 -DMAPLE_STM32F1
-Wno-attributes -Wno-unused-const-variable
build_unflags = -std=gnu11 -std=gnu++11
build_src_filter = ${common.default_src_filter} +<src/HAL/STM32F1>
lib_ignore = SPI, FreeRTOS701, FreeRTOS821
lib_deps = ${common.lib_deps}
SoftwareSerialM
platform_packages = tool-stm32duino
extra_scripts = ${common.extra_scripts}
pre:buildroot/share/PlatformIO/scripts/fix_framework_weakness.py
pre:buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py
buildroot/share/PlatformIO/scripts/custom_board.py
buildroot/share/PlatformIO/scripts/offset_and_rename.py
#
# Generic STM32F103RC environment
#
[env:STM32F103RC_maple]
extends = STM32F1_maple
board = genericSTM32F103RC
monitor_speed = 115200
#
# Generic STM32F103RE environment
#
[env:STM32F103RE_maple]
extends = STM32F1_maple
board = genericSTM32F103RE
monitor_speed = 115200
#
# MEEB_3DP (STM32F103RCT6 with 512K)
#
[env:STM32F103RC_meeb_maple]
extends = env:STM32F103RC_maple
board = marlin_maple_MEEB_3DP
build_flags = ${env:STM32F103RC_maple.build_flags}
-DDEBUG_LEVEL=0
-DSS_TIMER=4
-DSTM32_FLASH_SIZE=512
-DHSE_VALUE=12000000U
-DUSE_USB_COMPOSITE
-DVECT_TAB_OFFSET=0x2000
-DGENERIC_BOOTLOADER
board_build.ldscript = STM32F103RC_MEEB_3DP.ld
extra_scripts = ${env:STM32F103RC_maple.extra_scripts}
pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py
lib_deps = ${env:STM32F103RC_maple.lib_deps}
USBComposite for STM32F1@0.91
custom_marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/ccccmagicboy/Adafruit_NeoPixel#meeb_3dp_use
debug_tool = stlink
upload_protocol = dfu
#
# FYSETC STM32F103RC
#
[env:STM32F103RC_fysetc_maple]
extends = env:STM32F103RC_maple
extra_scripts = ${env:STM32F103RC_maple.extra_scripts}
buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
build_flags = ${env:STM32F103RC_maple.build_flags} -DDEBUG_LEVEL=0
lib_ldf_mode = chain
debug_tool = stlink
upload_protocol = serial
#
# BigTreeTech SKR Mini V1.1 / SKR Mini E3 & MZ (STM32F103RCT6 ARM Cortex-M3)
#
# STM32F103RC_btt_maple ............. RCT6 with 256K
# STM32F103RC_btt_USB_maple ......... RCT6 with 256K (USB mass storage)
#
[env:STM32F103RC_btt_maple]
extends = env:STM32F103RC_maple
board_build.address = 0x08007000
board_build.ldscript = STM32F103RC_SKR_MINI_256K.ld
build_flags = ${env:STM32F103RC_maple.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4
monitor_speed = 115200
[env:STM32F103RC_btt_USB_maple]
extends = env:STM32F103RC_btt_maple
build_flags = ${env:STM32F103RC_btt_maple.build_flags} -DUSE_USB_COMPOSITE
lib_deps = ${env:STM32F103RC_btt_maple.lib_deps}
USBComposite for STM32F1@0.91
#
# Creality (STM32F103RET6)
#
[env:STM32F103RE_creality_maple]
extends = env:STM32F103RE_maple
build_flags = ${env:STM32F103RE_maple.build_flags} -DTEMP_TIMER_CHAN=4
board_build.address = 0x08007000
board_build.ldscript = creality.ld
extra_scripts = ${env:STM32F103RE_maple.extra_scripts}
pre:buildroot/share/PlatformIO/scripts/random-bin.py
debug_tool = jlink
upload_protocol = jlink
#
# Creality (STM32F103RCT6)
#
[env:STM32F103RC_creality_maple]
extends = env:STM32F103RC_maple
build_flags = ${env:STM32F103RC_maple.build_flags} -DTEMP_TIMER_CHAN=4
board_build.address = 0x08007000
board_build.ldscript = creality.ld
extra_scripts = ${env:STM32F103RC_maple.extra_scripts}
pre:buildroot/share/PlatformIO/scripts/random-bin.py
debug_tool = jlink
upload_protocol = jlink
#
# Creality 512K (STM32F103RE) for new 64KiB bootloader (CR-10 Smart Pro printer)
#
[env:STM32F103RE_creality_smartPro_maple]
extends = env:STM32F103RE_creality_maple
board_build.address = 0x08010000
board_build.ldscript = crealityPro.ld
#
# BigTreeTech SKR Mini E3 V2.0 & DIP / SKR CR6 (STM32F103RET6 ARM Cortex-M3)
#
# STM32F103RE_btt_maple ............. RET6
# STM32F103RE_btt_USB_maple ......... RET6 (USB mass storage)
#
[env:STM32F103RE_btt_maple]
extends = env:STM32F103RE_maple
board_build.address = 0x08007000
board_build.ldscript = STM32F103RE_SKR_MINI_512K.ld
build_flags = ${env:STM32F103RE_maple.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4
debug_tool = stlink
upload_protocol = stlink
[env:STM32F103RE_btt_USB_maple]
extends = env:STM32F103RE_btt_maple
build_flags = ${env:STM32F103RE_btt_maple.build_flags} -DUSE_USB_COMPOSITE
lib_deps = ${env:STM32F103RE_btt_maple.lib_deps}
USBComposite for STM32F1@0.91
#
# Geeetech GTM32 (STM32F103VET6)
#
[env:STM32F103VE_GTM32_maple]
extends = STM32F1_maple
board = genericSTM32F103VE
build_flags = ${STM32F1_maple.build_flags}
-ffunction-sections -fdata-sections -nostdlib -MMD
-DMCU_STM32F103VE -DARDUINO_GENERIC_STM32F103V -DARDUINO_ARCH_STM32F1 -DBOARD_generic_stm32f103v
-DDEBUG_LEVEL=DEBUG_NONE -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DVECT_TAB_ADDR=0x8000000
-DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
upload_protocol = serial
#
# Longer 3D board in Alfawise U20 (STM32F103VET6)
#
[env:STM32F103VE_longer_maple]
extends = STM32F1_maple
board = genericSTM32F103VE
board_build.address = 0x08010000
board_build.rename = project.bin
board_build.ldscript = STM32F103VE_longer.ld
lib_ignore = SPI, FreeRTOS701, FreeRTOS821, TMCStepper
build_flags = ${STM32F1_maple.build_flags}
-DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB
-DU20 -DTS_V12
build_unflags = ${STM32F1_maple.build_unflags}
-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
extra_scripts = ${STM32F1_maple.extra_scripts}
buildroot/share/PlatformIO/scripts/custom_board.py
#
# Alfawise U20/LK1
#
[env:alfawise_U20]
extends = env:STM32F103VE_longer_maple
build_flags = ${STM32F1_maple.build_flags}
-DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB
-DDEBUG_LEVEL=0
-DU20 -DTS_V12
# -DOVERCLOCK -DOC_BASE_MHZ=72 -DOC_TARGET_MHZ=96
#
# Alfawise U20+/LK1+
#
[env:alfawise_U20_PLUS]
extends = env:STM32F103VE_longer_maple
build_flags = ${STM32F1_maple.build_flags}
-DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB
-DDEBUG_LEVEL=0
-DU20_PLUS -DTS_V12
# -DOVERCLOCK -DOC_BASE_MHZ=72 -DOC_TARGET_MHZ=96
#
# Alfawise U30/LK2/LK4
#
[env:alfawise_U30]
extends = env:STM32F103VE_longer_maple
build_flags = ${STM32F1_maple.build_flags}
-DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB
-DDEBUG_LEVEL=1 -D__FILE__=__func__ -Wno-builtin-macro-redefined
-DU30 -DTS_V12
# -DOVERCLOCK -DOC_BASE_MHZ=72 -DOC_TARGET_MHZ=96
#upload_protocol = stlink
#board_build.address =
#board_build.ldscript =
#
# MKS Robin Mini (STM32F103VET6)
#
[env:mks_robin_mini_maple]
extends = STM32F1_maple
board = genericSTM32F103VE
board_build.address = 0x08007000
board_build.encrypt_mks = Robin_mini.bin
board_build.ldscript = mks_robin_mini.ld
build_flags = ${STM32F1_maple.build_flags} -DMCU_STM32F103VE
#
# MKS Robin Nano v1.x and v2 (STM32F103VET6)
#
[env:mks_robin_nano_v1v2_maple]
extends = STM32F1_maple
board = genericSTM32F103VE
board_build.address = 0x08007000
board_build.encrypt_mks = Robin_nano35.bin
board_build.ldscript = mks_robin_nano.ld
build_flags = ${STM32F1_maple.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4
#
# MKS Robin (STM32F103ZET6)
#
[env:mks_robin_maple]
extends = STM32F1_maple
board = genericSTM32F103ZE
board_build.address = 0x08007000
board_build.encrypt_mks = Robin.bin
board_build.ldscript = mks_robin.ld
build_flags = ${STM32F1_maple.build_flags} -DSS_TIMER=4 -DSTM32_XL_DENSITY
#
# MKS Robin Pro (STM32F103ZET6)
#
[env:mks_robin_pro_maple]
extends = env:mks_robin_maple
board_build.address = 0x08007000
board_build.encrypt_mks = Robin_pro.bin
board_build.ldscript = mks_robin_pro.ld
#
# TRIGORILLA PRO (STM32F103ZET6)
#
[env:trigorilla_pro_maple]
extends = env:mks_robin_maple
#
# MKS Robin E3D (STM32F103RCT6) and
# MKS Robin E3 with TMC2209
#
[env:mks_robin_e3_maple]
extends = STM32F1_maple
board = genericSTM32F103RC
board_build.address = 0x08005000
board_build.encrypt_mks = Robin_e3.bin
board_build.ldscript = mks_robin_e3.ld
build_flags = ${STM32F1_maple.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4
#
# MKS Robin E3p (STM32F103VET6)
# - LVGL UI
#
[env:mks_robin_e3p_maple]
extends = STM32F1_maple
board = genericSTM32F103VE
board_build.address = 0x08007000
board_build.encrypt_mks = Robin_e3p.bin
board_build.ldscript = mks_robin_e3p.ld
build_flags = ${STM32F1_maple.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4
debug_tool = jlink
upload_protocol = jlink
#
# MKS Robin Lite/Lite2 (STM32F103RCT6)
#
[env:mks_robin_lite_maple]
extends = STM32F1_maple
board = genericSTM32F103RC
board_build.address = 0x08005000
board_build.encrypt_mks = mksLite.bin
board_build.ldscript = mks_robin_lite.ld
#
# MKS ROBIN LITE3 (STM32F103RCT6)
#
[env:mks_robin_lite3_maple]
extends = STM32F1_maple
board = genericSTM32F103RC
board_build.address = 0x08005000
board_build.encrypt_mks = mksLite3.bin
board_build.ldscript = mks_robin_lite.ld
#
# JGAurora A5S A1 (STM32F103ZET6)
#
[env:jgaurora_a5s_a1_maple]
extends = STM32F1_maple
board = genericSTM32F103ZE
board_build.address = 0x0800A000
board_build.ldscript = jgaurora_a5s_a1.ld
extra_scripts = ${STM32F1_maple.extra_scripts}
buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
build_flags = ${STM32F1_maple.build_flags} -DSTM32F1xx -DSTM32_XL_DENSITY
#
# Malyan M200 (STM32F103CB)
#
[env:STM32F103CB_malyan_maple]
extends = STM32F1_maple
board = marlin_malyanM200
build_flags = ${STM32F1_maple.build_flags}
-DMCU_STM32F103CB -D__STM32F1__=1 -std=c++1y -DSERIAL_USB -ffunction-sections -fdata-sections
-Wl,--gc-sections -DDEBUG_LEVEL=0 -D__MARLIN_FIRMWARE__
lib_ignore = ${STM32F1_maple.lib_ignore}
SoftwareSerialM
#
# Chitu boards like Tronxy X5s (STM32F103ZET6)
#
[env:chitu_f103_maple]
extends = STM32F1_maple
board = marlin_maple_CHITU_F103
extra_scripts = ${STM32F1_maple.extra_scripts}
pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
buildroot/share/PlatformIO/scripts/chitu_crypt.py
build_flags = ${STM32F1_maple.build_flags} -DSTM32F1xx -DSTM32_XL_DENSITY
build_unflags = ${STM32F1_maple.build_unflags}
-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
#
# Some Chitu V5 boards have a problem with GPIO init.
# Use this target if G28 or G29 are always failing.
#
[env:chitu_v5_gpio_init_maple]
extends = env:chitu_f103_maple
build_flags = ${env:chitu_f103_maple.build_flags} -DCHITU_V5_Z_MIN_BUGFIX
#
# FLYmaker FLY Mini (STM32F103RCT6)
#
[env:FLY_MINI_maple]
extends = STM32F1_maple
board = genericSTM32F103RC
board_build.address = 0x08005000
board_build.ldscript = fly_mini.ld
build_flags = ${STM32F1_maple.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4
#
# Zonestar ZM3E2 V1.0 / ZM3E4 V1.0 / ZM3E4 V2.0
#
# STM32F103RC_ZM3E2_USB_maple ........... RCT6 with 256K
# STM32F103VC_ZM3E4_USB_maple ........... VCT6 with 256K
# STM32F103VE_ZM3E4V2_USB_maple ......... VET6 with 512K
#
[ZONESTAR_ZM3E_maple]
extends = STM32F1_maple
platform_packages = tool-stm32duino
board_build.address = 0x08005000
board_upload.maximum_size = 237568
build_flags = ${STM32F1_maple.build_flags}
-D__STM32F1__=1 -DDEBUG_LEVEL=0 -DSS_TIMER=4 -DSERIAL_USB
lib_deps = ${STM32F1_maple.lib_deps}
USBComposite for STM32F1@0.91
lib_ignore = Adafruit NeoPixel, SPI, SailfishLCD, SailfishRGB_LED, SlowSoftI2CMaster, TMCStepper
[env:STM32F103RC_ZM3E2_USB_maple]
extends = ZONESTAR_ZM3E_maple
board = genericSTM32F103RC
board_build.ldscript = ZONESTAR_ZM3E_256K.ld
[env:STM32F103VC_ZM3E4_USB_maple]
extends = ZONESTAR_ZM3E_maple
board = genericSTM32F103VC
board_build.ldscript = ZONESTAR_ZM3E_256K.ld
build_flags = ${ZONESTAR_ZM3E_maple.build_flags} -DTONE_TIMER=1 -DTONE_CHANNEL=2
[env:STM32F103VE_ZM3E4V2_USB_maple]
extends = ZONESTAR_ZM3E_maple
board = genericSTM32F103VE
board_build.ldscript = ZONESTAR_ZM3E_512K.ld
build_flags = ${ZONESTAR_ZM3E_maple.build_flags} -DTONE_TIMER=1 -DTONE_CHANNEL=2
board_upload.maximum_size = 499712
#
# ERYONE ERY32 Mini (STM32F103VET6)
#
[env:ERYONE_ERY32_MINI_maple]
extends = STM32F1_maple
board = genericSTM32F103VE
build_flags = ${STM32F1_maple.build_flags}
-ffunction-sections -fdata-sections -nostdlib -MMD
-DMCU_STM32F103VE -DARDUINO_GENERIC_STM32F103V -DARDUINO_ARCH_STM32F1
-DDEBUG_LEVEL=DEBUG_NONE -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1
-DSS_TIMER=4
board_build.variant = MARLIN_F103Vx
board_build.ldscript = eryone_ery32_mini.ld
board_build.address = 0x08004000
build_unflags = ${STM32F1_maple.build_unflags}
#
# Sovol (GD32F103RET6)
#
[env:GD32F103RET6_sovol_maple]
extends = env:STM32F103RE_maple
build_flags = ${STM32F1_maple.build_flags} -DTEMP_TIMER_CHAN=4
board_build.address = 0x08007000
board_build.ldscript = sovol.ld
extra_scripts = ${STM32F1_maple.extra_scripts}
pre:buildroot/share/PlatformIO/scripts/random-bin.py
buildroot/share/PlatformIO/scripts/custom_board.py
debug_tool = jlink
upload_protocol = jlink