Marlin 2.0 for Flying Bear 4S/5
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

403 lines
13 KiB

#
# 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
#
[common_stm32f1]
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
build_unflags = -std=gnu11 -std=gnu++11
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/offset_and_rename.py
#
# STM32F103RC
#
[common_STM32F103RC_maple]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103RC
monitor_speed = 115200
#
# MEEB_3DP (STM32F103RCT6 with 512K)
#
[env:STM32F103RC_meeb]
platform = ${common_stm32f1.platform}
extends = common_STM32F103RC_maple
board = marlin_MEEB_3DP
build_flags = ${common_stm32f1.build_flags}
-DDEBUG_LEVEL=0
-DSS_TIMER=4
-DSTM32_FLASH_SIZE=512
-DHSE_VALUE=12000000U
-DUSE_USB_COMPOSITE
-DVECT_TAB_OFFSET=0x2000
-DGENERIC_BOOTLOADER
extra_scripts = ${common_stm32f1.extra_scripts}
pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py
Squashed commit of the following: commit b18aa933d14f9761d74b19be79db64e21356c563 Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Wed Oct 13 14:28:45 2021 +1300 🐛 Fix G33 homing current (#22909) commit 0f519ebf854cdb0fd3d00828ca7a4b4d09c8d610 Author: mks-viva <1224833100@qq.com> Date: Tue Oct 12 20:01:18 2021 -0500 ✨ MKS Eagle (STM32F407VET6) board (#22897) commit 031f17b4f3dfca4a66384d40ce48b7d33315c75a Author: Minims <github@minims.fr> Date: Sun Oct 10 01:10:21 2021 +0200 🩹 Adjust GTR 1.0 ST7920 display delay (#22904) commit 036f763eaaff571f07c7829e0f5a61b645e86269 Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Thu Oct 7 09:42:59 2021 +1300 🎨 Define Octopus allocated endstop pins (#22882) Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com> commit d137f307ebea8c8832ecbef239ed08e188c5369b Author: Scott Lahteine <github@thinkyhead.com> Date: Mon Oct 4 22:19:05 2021 -0500 🎨 Tweak FORCE_INLINE commit 66048a5f27aa3ad9ecb2b407ada13fb87e86ebe9 Author: Mark <niujl123@sina.com> Date: Tue Oct 5 12:23:02 2021 +0800 ✨ ESP32 Panda_ZHU and Panda_M4 (#22644) commit b8c32e24d86fff280621ab3f274511dd30669b93 Author: Scott Lahteine <github@thinkyhead.com> Date: Sat Oct 2 02:33:14 2021 -0500 🎨 Rename MarlinUI::zoffset_overlay commit 99d51af90facd02365d0ae91091303d7879f304d Author: Scott Lahteine <github@thinkyhead.com> Date: Tue Oct 5 21:35:31 2021 -0500 🔨 Port libsdl2_net required for macOS simulator commit f47ece0725d93cde7fde52b66d14b5ec551c46c2 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Oct 12 19:06:39 2021 -0700 🐛 Fix MKS Robin Pro 1.0 LCD reset pin (#22937) commit 975089a954460b10279bdbf60f08c9604c4f7d08 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Oct 12 19:05:37 2021 -0700 🔧 Remove obsolete G34 sanity check (#22929) commit 995230f5971995e41b97d14273f2dd3693ead6be Author: George Fu <nailao_5918@163.com> Date: Wed Oct 13 09:32:54 2021 +0800 🐛 Fix FYSETC Cheetah v2.0 build (#22926) commit adf7072fa846312d473a993ffc62ec3082b37c46 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Oct 12 18:26:42 2021 -0700 🐛 Fix SKR Mini E3 V2 I2C-based EEPROM (#22919) Followup to #20609
3 years ago
lib_deps = ${common_stm32f1.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]
platform = ${common_stm32f1.platform}
extends = common_STM32F103RC_maple
extra_scripts = ${common_stm32f1.extra_scripts}
buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
build_flags = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0
lib_ldf_mode = chain
debug_tool = stlink
upload_protocol = serial
#
# BigTree 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]
platform = ${common_stm32f1.platform}
extends = common_STM32F103RC_maple
board_build.address = 0x08007000
board_build.ldscript = STM32F103RC_SKR_MINI_256K.ld
extra_scripts = ${common_stm32f1.extra_scripts}
buildroot/share/PlatformIO/scripts/custom_board.py
build_flags = ${common_stm32f1.build_flags}
-DDEBUG_LEVEL=0 -DSS_TIMER=4
monitor_speed = 115200
[env:STM32F103RC_btt_USB_maple]
platform = ${common_stm32f1.platform}
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
#
# Generic STM32F103RE environment
#
[env:STM32F103RE_maple]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103RE
monitor_speed = 115200
#
# Creality (STM32F103RET6)
#
[env:STM32F103RET6_creality_maple]
platform = ${common_stm32f1.platform}
extends = env:STM32F103RE_maple
build_flags = ${common_stm32f1.build_flags} -DTEMP_TIMER_CHAN=4
board_build.address = 0x08007000
board_build.ldscript = creality.ld
extra_scripts = ${common_stm32f1.extra_scripts}
pre:buildroot/share/PlatformIO/scripts/random-bin.py
buildroot/share/PlatformIO/scripts/custom_board.py
debug_tool = jlink
upload_protocol = jlink
#
# BigTree 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]
platform = ${common_stm32f1.platform}
extends = env:STM32F103RE_maple
board_build.address = 0x08007000
board_build.ldscript = STM32F103RE_SKR_MINI_512K.ld
extra_scripts = ${common_stm32f1.extra_scripts}
buildroot/share/PlatformIO/scripts/custom_board.py
build_flags = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4
debug_tool = stlink
upload_protocol = stlink
[env:STM32F103RE_btt_USB_maple]
platform = ${common_stm32f1.platform}
extends = env:STM32F103RE_btt_maple
build_flags = ${env:STM32F103RE_btt_maple.build_flags} -DUSE_USB_COMPOSITE
lib_deps = ${common_stm32f1.lib_deps}
USBComposite for STM32F1@0.91
#
# Geeetech GTM32 (STM32F103VET6)
#
[env:STM32F103VE_GTM32]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103VE
build_flags = ${common_stm32f1.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]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103VE
board_build.address = 0x08010000
board_build.rename = project.bin
board_build.ldscript = STM32F103VE_longer.ld
extra_scripts = ${common_stm32f1.extra_scripts}
buildroot/share/PlatformIO/scripts/custom_board.py
build_flags = ${common_stm32f1.build_flags}
-DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12
build_unflags = ${common_stm32f1.build_unflags}
-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
#
# MKS Robin Mini (STM32F103VET6)
#
[env:mks_robin_mini_maple]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103VE
extra_scripts = ${common_stm32f1.extra_scripts}
buildroot/share/PlatformIO/scripts/mks_robin_mini.py
build_flags = ${common_stm32f1.build_flags}
-DMCU_STM32F103VE
#
# MKS Robin Nano (STM32F103VET6)
#
[env:mks_robin_nano35_maple]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103VE
extra_scripts = ${common_stm32f1.extra_scripts}
buildroot/share/PlatformIO/scripts/mks_robin_nano35.py
build_flags = ${common_stm32f1.build_flags}
-DMCU_STM32F103VE -DSS_TIMER=4
debug_tool = jlink
upload_protocol = jlink
#
# MKS Robin (STM32F103ZET6)
#
[env:mks_robin_maple]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103ZE
extra_scripts = ${common_stm32f1.extra_scripts}
buildroot/share/PlatformIO/scripts/mks_robin.py
build_flags = ${common_stm32f1.build_flags}
-DSS_TIMER=4 -DSTM32_XL_DENSITY
#
# MKS Robin Pro (STM32F103ZET6)
#
[env:mks_robin_pro_maple]
platform = ${common_stm32f1.platform}
extends = env:mks_robin_maple
extra_scripts = ${common_stm32f1.extra_scripts}
buildroot/share/PlatformIO/scripts/mks_robin_pro.py
#
# TRIGORILLA PRO (STM32F103ZET6)
#
[env:trigorilla_pro_maple]
platform = ${common_stm32f1.platform}
extends = env:mks_robin_maple
extra_scripts = ${common_stm32f1.extra_scripts}
#
# MKS Robin E3D (STM32F103RCT6) and
# MKS Robin E3 with TMC2209
#
[env:mks_robin_e3_maple]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103RC
extra_scripts = ${common_stm32f1.extra_scripts}
buildroot/share/PlatformIO/scripts/mks_robin_e3.py
build_flags = ${common_stm32f1.build_flags}
-DDEBUG_LEVEL=0 -DSS_TIMER=4
#
# MKS Robin E3p (STM32F103VET6)
# - LVGL UI
#
[env:mks_robin_e3p_maple]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103VE
extra_scripts = ${common_stm32f1.extra_scripts}
buildroot/share/PlatformIO/scripts/mks_robin_e3p.py
build_flags = ${common_stm32f1.build_flags}
-DMCU_STM32F103VE -DSS_TIMER=4
debug_tool = jlink
upload_protocol = jlink
#
# MKS Robin Lite/Lite2 (STM32F103RCT6)
#
[env:mks_robin_lite_maple]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103RC
extra_scripts = ${common_stm32f1.extra_scripts}
buildroot/share/PlatformIO/scripts/mks_robin_lite.py
#
# MKS ROBIN LITE3 (STM32F103RCT6)
#
[env:mks_robin_lite3_maple]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103RC
extra_scripts = ${common_stm32f1.extra_scripts}
buildroot/share/PlatformIO/scripts/mks_robin_lite3.py
#
# JGAurora A5S A1 (STM32F103ZET6)
#
[env:jgaurora_a5s_a1_maple]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103ZE
board_build.address = 0x0800A000
board_build.ldscript = jgaurora_a5s_a1.ld
extra_scripts = ${common_stm32f1.extra_scripts}
buildroot/share/PlatformIO/scripts/custom_board.py
buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
build_flags = ${common_stm32f1.build_flags}
-DSTM32F1xx -DSTM32_XL_DENSITY
#
# Malyan M200 (STM32F103CB)
#
[env:STM32F103CB_malyan_maple]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = marlin_malyanM200
build_flags = ${common_stm32f1.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 = ${common_stm32f1.lib_ignore}
SoftwareSerialM
#
# Chitu boards like Tronxy X5s (STM32F103ZET6)
#
[env:chitu_f103_maple]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = marlin_CHITU_F103
extra_scripts = ${common_stm32f1.extra_scripts}
pre:buildroot/share/PlatformIO/scripts/common-dependencies.py
pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
buildroot/share/PlatformIO/scripts/chitu_crypt.py
build_flags = ${common_stm32f1.build_flags}
-DSTM32F1xx -DSTM32_XL_DENSITY
build_unflags = ${common_stm32f1.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]
platform = ${common_stm32f1.platform}
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]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103RC
board_build.address = 0x08005000
board_build.ldscript = fly_mini.ld
extra_scripts = ${common_stm32f1.extra_scripts}
buildroot/share/PlatformIO/scripts/custom_board.py
build_flags = ${common_stm32f1.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]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
platform_packages = tool-stm32duino
board_build.address = 0x08005000
board_build.offset = 0x5000
board_upload.maximum_size = 237568
extra_scripts = ${common.extra_scripts}
buildroot/share/PlatformIO/scripts/custom_board.py
buildroot/share/PlatformIO/scripts/offset_and_rename.py
build_flags = ${common_stm32f1.build_flags}
-D__STM32F1__=1 -DDEBUG_LEVEL=0 -DSS_TIMER=4 -DSERIAL_USB
Squashed commit of the following: commit b18aa933d14f9761d74b19be79db64e21356c563 Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Wed Oct 13 14:28:45 2021 +1300 🐛 Fix G33 homing current (#22909) commit 0f519ebf854cdb0fd3d00828ca7a4b4d09c8d610 Author: mks-viva <1224833100@qq.com> Date: Tue Oct 12 20:01:18 2021 -0500 ✨ MKS Eagle (STM32F407VET6) board (#22897) commit 031f17b4f3dfca4a66384d40ce48b7d33315c75a Author: Minims <github@minims.fr> Date: Sun Oct 10 01:10:21 2021 +0200 🩹 Adjust GTR 1.0 ST7920 display delay (#22904) commit 036f763eaaff571f07c7829e0f5a61b645e86269 Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Thu Oct 7 09:42:59 2021 +1300 🎨 Define Octopus allocated endstop pins (#22882) Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com> commit d137f307ebea8c8832ecbef239ed08e188c5369b Author: Scott Lahteine <github@thinkyhead.com> Date: Mon Oct 4 22:19:05 2021 -0500 🎨 Tweak FORCE_INLINE commit 66048a5f27aa3ad9ecb2b407ada13fb87e86ebe9 Author: Mark <niujl123@sina.com> Date: Tue Oct 5 12:23:02 2021 +0800 ✨ ESP32 Panda_ZHU and Panda_M4 (#22644) commit b8c32e24d86fff280621ab3f274511dd30669b93 Author: Scott Lahteine <github@thinkyhead.com> Date: Sat Oct 2 02:33:14 2021 -0500 🎨 Rename MarlinUI::zoffset_overlay commit 99d51af90facd02365d0ae91091303d7879f304d Author: Scott Lahteine <github@thinkyhead.com> Date: Tue Oct 5 21:35:31 2021 -0500 🔨 Port libsdl2_net required for macOS simulator commit f47ece0725d93cde7fde52b66d14b5ec551c46c2 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Oct 12 19:06:39 2021 -0700 🐛 Fix MKS Robin Pro 1.0 LCD reset pin (#22937) commit 975089a954460b10279bdbf60f08c9604c4f7d08 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Oct 12 19:05:37 2021 -0700 🔧 Remove obsolete G34 sanity check (#22929) commit 995230f5971995e41b97d14273f2dd3693ead6be Author: George Fu <nailao_5918@163.com> Date: Wed Oct 13 09:32:54 2021 +0800 🐛 Fix FYSETC Cheetah v2.0 build (#22926) commit adf7072fa846312d473a993ffc62ec3082b37c46 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Oct 12 18:26:42 2021 -0700 🐛 Fix SKR Mini E3 V2 I2C-based EEPROM (#22919) Followup to #20609
3 years ago
lib_deps = ${common_stm32f1.lib_deps}
USBComposite for STM32F1@0.91
lib_ignore = Adafruit NeoPixel, SPI, SailfishLCD, SailfishRGB_LED, SlowSoftI2CMaster, TMCStepper
[env:STM32F103RC_ZM3E2_USB_maple]
platform = ${ZONESTAR_ZM3E_maple.platform}
extends = ZONESTAR_ZM3E_maple
board = genericSTM32F103RC
board_build.ldscript = ZONESTAR_ZM3E_256K.ld
[env:STM32F103VC_ZM3E4_USB_maple]
platform = ${ZONESTAR_ZM3E_maple.platform}
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]
platform = ${ZONESTAR_ZM3E_maple.platform}
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