|
@@ -21,7 +21,6 @@ boards_dir = buildroot/share/PlatformIO/boards
|
21
|
21
|
default_envs = mega2560
|
22
|
22
|
|
23
|
23
|
[common]
|
24
|
|
-arduinoststm32_ver = >=4.10700,<4.10800
|
25
|
24
|
default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared>
|
26
|
25
|
extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py
|
27
|
26
|
build_flags = -fmax-errors=5 -g -D__MARLIN_FIRMWARE__ -fmerge-all-constants
|
|
@@ -36,8 +35,21 @@ lib_deps =
|
36
|
35
|
SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip
|
37
|
36
|
SlowSoftI2CMaster=https://github.com/mikeshub/SlowSoftI2CMaster/archive/master.zip
|
38
|
37
|
|
39
|
|
-[common_stm32f1]
|
|
38
|
+# Common traits for environments using HAL/STM32
|
|
39
|
+[common_stm32]
|
40
|
40
|
platform = ststm32@<6.2.0
|
|
41
|
+platform_packages = framework-arduinoststm32@>=4.10700,<4.10800
|
|
42
|
+lib_deps = ${common.lib_deps}
|
|
43
|
+lib_ignore = SoftwareSerial
|
|
44
|
+build_flags = ${common.build_flags}
|
|
45
|
+ -IMarlin/src/HAL/STM32 -std=gnu++14
|
|
46
|
+ -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
|
|
47
|
+build_unflags = -std=gnu++11
|
|
48
|
+src_filter = ${common.default_src_filter} +<src/HAL/STM32>
|
|
49
|
+
|
|
50
|
+# Common traits for environments using HAL/STM32F1
|
|
51
|
+[common_stm32f1]
|
|
52
|
+platform = ${common_stm32.platform}
|
41
|
53
|
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
|
42
|
54
|
${common.build_flags} -std=gnu++14 -DHAVE_SW_SERIAL
|
43
|
55
|
build_unflags = -std=gnu++11
|
|
@@ -386,7 +398,7 @@ lib_deps = ${common_stm32f1.lib_deps}
|
386
|
398
|
# STM32F4 with STM32GENERIC
|
387
|
399
|
#
|
388
|
400
|
[env:STM32F4]
|
389
|
|
-platform = ststm32@<6.2.0
|
|
401
|
+platform = ${common_stm32.platform}
|
390
|
402
|
board = disco_f407vg
|
391
|
403
|
build_flags = ${common.build_flags} -DUSE_STM32GENERIC -DSTM32GENERIC -DSTM32F4 -DMENU_USB_SERIAL -DMENU_SERIAL=SerialUSB -DHAL_IWDG_MODULE_ENABLED
|
392
|
404
|
lib_ignore = Adafruit NeoPixel, TMCStepper
|
|
@@ -396,7 +408,7 @@ src_filter = ${common.default_src_filter} +<src/HAL/STM32_F4_F7> -<src/HAL/ST
|
396
|
408
|
# STM32F7 with STM32GENERIC
|
397
|
409
|
#
|
398
|
410
|
[env:STM32F7]
|
399
|
|
-platform = ststm32@<6.2.0
|
|
411
|
+platform = ${common_stm32.platform}
|
400
|
412
|
board = remram_v1
|
401
|
413
|
build_flags = ${common.build_flags} -DUSE_STM32GENERIC -DSTM32GENERIC -DSTM32F7 -DMENU_USB_SERIAL -DMENU_SERIAL=SerialUSB -DHAL_IWDG_MODULE_ENABLED
|
402
|
414
|
lib_ignore = Adafruit NeoPixel, TMCStepper
|
|
@@ -406,15 +418,12 @@ src_filter = ${common.default_src_filter} +<src/HAL/STM32_F4_F7> -<src/HAL/ST
|
406
|
418
|
# ARMED (STM32)
|
407
|
419
|
#
|
408
|
420
|
[env:ARMED]
|
409
|
|
-platform = ststm32@<6.2.0
|
410
|
|
-platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver}
|
|
421
|
+platform = ${common_stm32.platform}
|
|
422
|
+extends = common_stm32
|
411
|
423
|
board = armed_v1
|
412
|
|
-build_flags = ${common.build_flags}
|
413
|
|
- -DUSBCON -DUSBD_VID=0x0483 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="ARMED_V1"' -DUSBD_USE_CDC
|
414
|
|
- -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing -std=gnu11 -std=gnu++11
|
415
|
|
- -IMarlin/src/HAL/STM32
|
416
|
|
-lib_ignore = Adafruit NeoPixel, SoftwareSerial
|
417
|
|
-src_filter = ${common.default_src_filter} +<src/HAL/STM32>
|
|
424
|
+build_flags = ${common_stm32.build_flags}
|
|
425
|
+ '-DUSB_PRODUCT="ARMED_V1"'
|
|
426
|
+ -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing
|
418
|
427
|
|
419
|
428
|
#
|
420
|
429
|
# Geeetech GTM32 (STM32F103VET6)
|
|
@@ -548,14 +557,12 @@ lib_ignore = ${common_stm32f1.lib_ignore}
|
548
|
557
|
# Malyan M200 v2 (STM32F070RB)
|
549
|
558
|
#
|
550
|
559
|
[env:STM32F070RB_malyan]
|
551
|
|
-platform = ststm32@<6.2.0
|
552
|
|
-platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver}
|
|
560
|
+platform = ${common_stm32.platform}
|
|
561
|
+extends = common_stm32
|
553
|
562
|
board = malyanM200v2
|
554
|
|
-build_flags = -DSTM32F0xx -DUSBCON -DUSBD_VID=0x0483 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="ARMED_V1"' -DUSBD_USE_CDC -DHAL_PCD_MODULE_ENABLED
|
|
563
|
+build_flags = ${common_stm32.build_flags} -DSTM32F0xx -DUSB_PRODUCT=\"STM32F070RB\" -DHAL_PCD_MODULE_ENABLED
|
555
|
564
|
-O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing -std=gnu11 -std=gnu++11
|
556
|
565
|
-DCUSTOM_STARTUP_FILE
|
557
|
|
- -IMarlin/src/HAL/STM32
|
558
|
|
-src_filter = ${common.default_src_filter} +<src/HAL/STM32>
|
559
|
566
|
lib_ignore = LiquidCrystal, LiquidTWI2, Adafruit NeoPixel, TMCStepper, U8glib-HAL, SoftwareSerial
|
560
|
567
|
|
561
|
568
|
#
|
|
@@ -588,56 +595,42 @@ build_unflags = ${common_stm32f1.build_unflags}
|
588
|
595
|
# 'STEVAL-3DP001V1' STM32F401VE board - https://www.st.com/en/evaluation-tools/steval-3dp001v1.html
|
589
|
596
|
#
|
590
|
597
|
[env:STM32F401VE_STEVAL]
|
591
|
|
-platform = ststm32@<6.2.0
|
592
|
|
-platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver}
|
|
598
|
+platform = ${common_stm32.platform}
|
|
599
|
+extends = common_stm32
|
593
|
600
|
board = STEVAL_STM32F401VE
|
594
|
|
-build_flags = ${common.build_flags}
|
595
|
|
- -DTARGET_STM32F4 -DSTM32F401xE -DUSBCON
|
596
|
|
- -DUSBD_USE_CDC -DUSBD_VID=0x0483 -DUSB_PRODUCT=\"STEVAL_F401VE\"
|
597
|
|
- -DARDUINO_STEVAL -DDISABLE_GENERIC_SERIALUSB
|
598
|
|
- -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
|
599
|
|
- -IMarlin/src/HAL/STM32
|
600
|
|
-build_unflags = -std=gnu++11
|
|
601
|
+build_flags = ${common_stm32.build_flags}
|
|
602
|
+ -DTARGET_STM32F4 -DARDUINO_STEVAL -DSTM32F401xE
|
|
603
|
+ -DUSB_PRODUCT=\"STEVAL_F401VE\"
|
|
604
|
+ -DDISABLE_GENERIC_SERIALUSB -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
|
601
|
605
|
extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
602
|
606
|
buildroot/share/PlatformIO/scripts/STEVAL__F401XX.py
|
603
|
607
|
lib_ignore = Adafruit NeoPixel, TMCStepper, SailfishLCD, SlowSoftI2CMaster, SoftwareSerial
|
604
|
|
-src_filter = ${common.default_src_filter} +<src/HAL/STM32>
|
605
|
608
|
|
606
|
609
|
#
|
607
|
610
|
# FLYF407ZG
|
608
|
611
|
#
|
609
|
612
|
[env:FLYF407ZG]
|
610
|
|
-platform = ststm32@<6.2.0
|
611
|
|
-platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver}
|
|
613
|
+platform = ${common_stm32.platform}
|
|
614
|
+extends = common_stm32
|
612
|
615
|
board = FLYF407ZG
|
613
|
|
-build_flags = ${common.build_flags}
|
614
|
|
- -DTARGET_STM32F4 -DSTM32F4 -DUSBCON
|
615
|
|
- -DUSBD_USE_CDC -DUSBD_VID=0x0483 -DUSB_PRODUCT=\"STM32F407ZG\"
|
616
|
|
- -DVECT_TAB_OFFSET=0x8000 -IMarlin/src/HAL/STM32
|
617
|
|
-build_unflags = -std=gnu++11
|
|
616
|
+build_flags = ${common_stm32.build_flags}
|
|
617
|
+ -DSTM32F4 -DUSB_PRODUCT=\"STM32F407ZG\"
|
|
618
|
+ -DTARGET_STM32F4 -DVECT_TAB_OFFSET=0x8000
|
618
|
619
|
extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
619
|
|
-lib_ignore = Adafruit NeoPixel, SailfishLCD, SlowSoftI2CMaster, SoftwareSerial
|
620
|
|
-src_filter = ${common.default_src_filter} +<src/HAL/STM32>
|
621
|
|
-
|
622
|
620
|
|
623
|
621
|
#
|
624
|
622
|
# FYSETC S6 (STM32F446VET6 ARM Cortex-M4)
|
625
|
623
|
#
|
626
|
624
|
[env:FYSETC_S6]
|
627
|
|
-platform = ststm32@<6.2.0
|
628
|
|
-platform_packages =
|
|
625
|
+platform = ${common_stm32.platform}
|
|
626
|
+extends = common_stm32
|
|
627
|
+platform_packages = ${common_stm32.platform_packages}
|
629
|
628
|
tool-stm32duino
|
630
|
|
- framework-arduinoststm32@${common.arduinoststm32_ver}
|
631
|
629
|
board = fysetc_s6
|
632
|
|
-build_flags = ${common.build_flags}
|
633
|
|
- -DTARGET_STM32F4 -std=gnu++14
|
634
|
|
- -DVECT_TAB_OFFSET=0x10000
|
635
|
|
- -DUSBCON -DUSBD_USE_CDC -DHAL_PCD_MODULE_ENABLED -DUSBD_VID=0x0483 '-DUSB_PRODUCT="FYSETC_S6"'
|
636
|
|
- -IMarlin/src/HAL/STM32
|
637
|
|
-build_unflags = -std=gnu++11
|
|
630
|
+build_flags = ${common_stm32.build_flags}
|
|
631
|
+ -DTARGET_STM32F4 -DVECT_TAB_OFFSET=0x10000
|
|
632
|
+ -DHAL_PCD_MODULE_ENABLED '-DUSB_PRODUCT="FYSETC_S6"'
|
638
|
633
|
extra_scripts = pre:buildroot/share/PlatformIO/scripts/fysetc_STM32S6.py
|
639
|
|
-src_filter = ${common.default_src_filter} +<src/HAL/STM32>
|
640
|
|
-lib_ignore = Arduino-L6470, SoftwareSerial
|
641
|
634
|
debug_tool = stlink
|
642
|
635
|
upload_protocol = dfu
|
643
|
636
|
upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE"
|
|
@@ -648,34 +641,27 @@ upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE"
|
648
|
641
|
# Shield - https://github.com/jmz52/Hardware
|
649
|
642
|
#
|
650
|
643
|
[env:STM32F407VE_black]
|
651
|
|
-platform = ststm32@<6.2.0
|
652
|
|
-platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver}
|
|
644
|
+platform = ${common_stm32.platform}
|
|
645
|
+extends = common_stm32
|
653
|
646
|
board = blackSTM32F407VET6
|
654
|
|
-build_flags = ${common.build_flags}
|
|
647
|
+build_flags = ${common_stm32.build_flags}
|
655
|
648
|
-DTARGET_STM32F4 -DARDUINO_BLACK_F407VE
|
656
|
|
- -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 -DUSB_PRODUCT=\"BLACK_F407VE\"
|
|
649
|
+ -DUSB_PRODUCT=\"BLACK_F407VE\"
|
657
|
650
|
-DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
|
658
|
|
- -IMarlin/src/HAL/STM32
|
659
|
|
-build_unflags = -std=gnu++11
|
660
|
651
|
extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
661
|
652
|
lib_ignore = Adafruit NeoPixel, TMCStepper, SailfishLCD, SlowSoftI2CMaster, SoftwareSerial
|
662
|
|
-src_filter = ${common.default_src_filter} +<src/HAL/STM32>
|
663
|
653
|
|
664
|
654
|
#
|
665
|
655
|
# BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4)
|
666
|
656
|
#
|
667
|
657
|
[env:BIGTREE_SKR_PRO]
|
668
|
|
-platform = ststm32@<6.2.0
|
669
|
|
-platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver}
|
|
658
|
+platform = ${common_stm32.platform}
|
|
659
|
+extends = common_stm32
|
670
|
660
|
board = BigTree_SKR_Pro
|
671
|
|
-build_flags = ${common.build_flags}
|
672
|
|
- -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 -DUSB_PRODUCT=\"STM32F407ZG\"
|
|
661
|
+build_flags = ${common_stm32.build_flags}
|
|
662
|
+ -DUSB_PRODUCT=\"STM32F407ZG\"
|
673
|
663
|
-DTARGET_STM32F4 -DSTM32F407_5ZX -DVECT_TAB_OFFSET=0x8000
|
674
|
|
- -IMarlin/src/HAL/STM32
|
675
|
|
-build_unflags = -std=gnu++11
|
676
|
664
|
extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
677
|
|
-lib_ignore = SoftwareSerial, SoftwareSerialM
|
678
|
|
-src_filter = ${common.default_src_filter} +<src/HAL/STM32>
|
679
|
665
|
#upload_protocol = stlink
|
680
|
666
|
#upload_command = "$PROJECT_PACKAGES_DIR/tool-stm32duino/stlink/ST-LINK_CLI.exe" -c SWD -P "$BUILD_DIR/firmware.bin" 0x8008000 -Rst -Run
|
681
|
667
|
debug_tool = stlink
|
|
@@ -686,42 +672,29 @@ debug_init_break =
|
686
|
672
|
#
|
687
|
673
|
[env:BIGTREE_GTR_V1_0]
|
688
|
674
|
platform = ststm32@>=5.7.0,<6.2.0
|
689
|
|
-platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver}
|
|
675
|
+extends = common_stm32
|
690
|
676
|
board = BigTree_GTR_v1
|
691
|
677
|
extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
692
|
|
-build_flags = ${common.build_flags}
|
693
|
|
- -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 -DUSB_PRODUCT=\"STM32F407IG\"
|
|
678
|
+build_flags = ${common_stm32.build_flags}
|
|
679
|
+ -DUSB_PRODUCT=\"STM32F407IG\"
|
694
|
680
|
-DTARGET_STM32F4 -DSTM32F407IX -DVECT_TAB_OFFSET=0x8000
|
695
|
|
- -IMarlin/src/HAL/STM32
|
696
|
|
-lib_deps =
|
697
|
|
- U8glib-HAL=https://github.com/MarlinFirmware/U8glib-HAL/archive/bugfix.zip
|
698
|
|
- LiquidCrystal
|
699
|
|
- TMCStepper@>=0.5.2,<1.0.0
|
700
|
|
- Adafruit NeoPixel
|
701
|
|
- LiquidTWI2=https://github.com/lincomatic/LiquidTWI2/archive/master.zip
|
702
|
|
- Arduino-L6470=https://github.com/ameyer/Arduino-L6470/archive/dev.zip
|
703
|
|
-lib_ignore = SoftwareSerial, SoftwareSerialM
|
704
|
|
-src_filter = ${common.default_src_filter} +<src/HAL/STM32>
|
705
|
681
|
|
706
|
682
|
#
|
707
|
683
|
# BigTreeTech BTT002 V1.0 (STM32F407VGT6 ARM Cortex-M4)
|
708
|
684
|
#
|
709
|
685
|
[env:BIGTREE_BTT002]
|
710
|
|
-platform = ststm32@5.6.0
|
711
|
|
-platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver}
|
|
686
|
+platform = ${common_stm32.platform}
|
|
687
|
+extends = common_stm32
|
712
|
688
|
board = BigTree_Btt002
|
713
|
|
-build_flags = ${common.build_flags}
|
714
|
|
- -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 -DUSB_PRODUCT=\"STM32F407VG\"
|
|
689
|
+build_flags = ${common_stm32.build_flags}
|
|
690
|
+ -DUSB_PRODUCT=\"STM32F407VG\"
|
715
|
691
|
-DTARGET_STM32F4 -DSTM32F407_5VX -DVECT_TAB_OFFSET=0x8000
|
716
|
692
|
-DHAVE_HWSERIAL2
|
717
|
693
|
-DHAVE_HWSERIAL3
|
718
|
694
|
-DPIN_SERIAL2_RX=PD_6
|
719
|
695
|
-DPIN_SERIAL2_TX=PD_5
|
720
|
|
- -IMarlin/src/HAL/STM32
|
721
|
|
-build_unflags = -std=gnu++11
|
722
|
696
|
extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
723
|
697
|
lib_ignore = Adafruit NeoPixel, SailfishLCD, SlowSoftI2CMaster, SoftwareSerial
|
724
|
|
-src_filter = ${common.default_src_filter} +<src/HAL/STM32>
|
725
|
698
|
|
726
|
699
|
#
|
727
|
700
|
# Teensy 3.1 / 3.2 (ARM Cortex-M4)
|
|
@@ -795,35 +768,26 @@ debug_tool = jlink
|
795
|
768
|
#
|
796
|
769
|
# RUMBA32
|
797
|
770
|
#
|
798
|
|
-
|
799
|
|
-[common_rumba32]
|
800
|
|
-platform = ststm32@<6.2.0
|
801
|
|
-platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver}
|
|
771
|
+[env:rumba32_f446ve]
|
|
772
|
+platform = ${common_stm32.platform}
|
|
773
|
+extends = common_stm32
|
802
|
774
|
board = rumba32_f446ve
|
803
|
|
-build_flags = ${common.build_flags} -Os -IMarlin/src/HAL/STM32
|
|
775
|
+build_flags = ${common_stm32.build_flags} -Os
|
804
|
776
|
-DSTM32F4xx -DARDUINO_RUMBA32_F446VE -DARDUINO_ARCH_STM32 "-DBOARD_NAME=\"RUMBA32_F446VE\""
|
805
|
|
- -DSTM32F446xx -DUSBCON "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"RUMBA32_F446VE\""
|
|
777
|
+ -DSTM32F446xx "-DUSB_PRODUCT=\"RUMBA32_F446VE\""
|
806
|
778
|
-DHAL_PCD_MODULE_ENABLED
|
807
|
|
- -DUSBD_USE_CDC
|
808
|
779
|
-DDISABLE_GENERIC_SERIALUSB
|
809
|
780
|
-DHAL_UART_MODULE_ENABLED
|
810
|
|
-lib_ignore = Adafruit NeoPixel, SoftwareSerial
|
811
|
|
-src_filter = ${common.default_src_filter} +<src/HAL/STM32>
|
812
|
|
-upload_protocol = dfu
|
813
|
|
-
|
814
|
|
-[env:rumba32_f446ve]
|
815
|
|
-platform = ${common_rumba32.platform}
|
816
|
|
-extends = common_rumba32
|
817
|
|
-build_flags = ${common_rumba32.build_flags} -DUSBD_VID=0x0483
|
818
|
781
|
monitor_speed = 500000
|
|
782
|
+upload_protocol = dfu
|
819
|
783
|
|
820
|
784
|
#
|
821
|
785
|
# MKS RUMBA32 (adds TMC2208/2209 UART interface and AUX-1)
|
822
|
786
|
#
|
823
|
787
|
[env:rumba32_mks]
|
824
|
|
-platform = ${common_rumba32.platform}
|
825
|
|
-extends = common_rumba32
|
826
|
|
-build_flags = ${common_rumba32.build_flags} -DUSBD_VID=0x8000
|
|
788
|
+platform = ${common_stm32.platform}
|
|
789
|
+extends = env:rumba32_f446ve
|
|
790
|
+build_flags = ${rumba32_f446ve.build_flags} -UUSBD_VID -DUSBD_VID=0x8000
|
827
|
791
|
|
828
|
792
|
#
|
829
|
793
|
# Just print the dependency tree
|