2021-04-02 02:53:19 +00:00
|
|
|
#
|
|
|
|
# Marlin Firmware
|
|
|
|
# PlatformIO Configuration File
|
|
|
|
#
|
|
|
|
|
|
|
|
#################################
|
2021-04-18 19:07:30 +00:00
|
|
|
#
|
2021-06-02 06:42:15 +00:00
|
|
|
# STM32F1 Architecture with unified STM32 HAL
|
2021-04-18 19:07:30 +00:00
|
|
|
#
|
|
|
|
# Naming Example: STM32F103RCT6
|
|
|
|
#
|
|
|
|
# F : Foundation (sometimes High Performance F2/F4)
|
|
|
|
# 1 : Cortex M1 core
|
|
|
|
# 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)
|
|
|
|
#
|
2021-04-02 02:53:19 +00:00
|
|
|
#################################
|
|
|
|
|
|
|
|
#
|
|
|
|
# HAL/STM32 Base Environment values
|
|
|
|
#
|
|
|
|
[common_stm32]
|
2021-05-02 02:14:58 +00:00
|
|
|
platform = ststm32@~12.1
|
2021-04-02 02:53:19 +00:00
|
|
|
build_flags = ${common.build_flags}
|
|
|
|
-std=gnu++14
|
|
|
|
-DUSBCON -DUSBD_USE_CDC
|
|
|
|
-DTIM_IRQ_PRIO=13
|
|
|
|
-DADC_RESOLUTION=12
|
|
|
|
build_unflags = -std=gnu++11
|
|
|
|
src_filter = ${common.default_src_filter} +<src/HAL/STM32> +<src/HAL/shared/backtrace>
|
|
|
|
|
|
|
|
#
|
|
|
|
# BigTree SKR Mini V1.1 / SKR mini E3 / SKR E3 DIP (STM32F103RCT6 ARM Cortex-M3)
|
|
|
|
#
|
|
|
|
# STM32F103RC_btt ............. RCT6 with 256K
|
|
|
|
# STM32F103RC_btt_USB ......... RCT6 with 256K (USB mass storage)
|
|
|
|
# STM32F103RC_btt_512K ........ RCT6 with 512K
|
|
|
|
# STM32F103RC_btt_512K_USB .... RCT6 with 512K (USB mass storage)
|
|
|
|
#
|
|
|
|
# WARNING! If you have an SKR Mini v1.1 or an SKR Mini E3 1.0 / 1.2 / 2.0 / DIP
|
|
|
|
# and experience a printer freeze, re-flash Marlin using the regular (non-512K)
|
|
|
|
# build option. 256K chips may be re-branded 512K chips, but this means the
|
|
|
|
# upper 256K is sketchy, and failure is very likely.
|
|
|
|
#
|
2021-06-02 06:42:15 +00:00
|
|
|
[common_STM32F103RC]
|
2021-05-11 15:44:54 +00:00
|
|
|
platform = ${common_stm32.platform}
|
|
|
|
extends = common_stm32
|
|
|
|
board = genericSTM32F103RC
|
|
|
|
monitor_speed = 115200
|
|
|
|
board_build.core = stm32
|
|
|
|
board_build.variant = MARLIN_F103Rx
|
|
|
|
board_build.ldscript = ldscript.ld
|
|
|
|
extra_scripts = ${common.extra_scripts}
|
|
|
|
pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
|
|
|
buildroot/share/PlatformIO/scripts/stm32_bootloader.py
|
|
|
|
|
2021-06-03 07:40:16 +00:00
|
|
|
#
|
|
|
|
# STM32F103RE
|
|
|
|
#
|
|
|
|
[env:STM32F103RE]
|
|
|
|
platform = ${common_stm32.platform}
|
|
|
|
extends = common_stm32
|
|
|
|
board = genericSTM32F103RE
|
|
|
|
monitor_speed = 115200
|
|
|
|
|
|
|
|
#
|
|
|
|
# STM32F103VE
|
|
|
|
#
|
|
|
|
[env:STM32F103VE]
|
|
|
|
platform = ${common_stm32.platform}
|
|
|
|
extends = common_stm32
|
|
|
|
board = genericSTM32F103VE
|
|
|
|
monitor_speed = 115200
|
|
|
|
|
|
|
|
#
|
|
|
|
# STM32F103ZE
|
|
|
|
#
|
|
|
|
[env:STM32F103ZE]
|
|
|
|
platform = ${common_stm32.platform}
|
|
|
|
extends = common_stm32
|
|
|
|
board = genericSTM32F103ZE
|
|
|
|
monitor_speed = 115200
|
|
|
|
|
2021-06-02 06:42:15 +00:00
|
|
|
[env:STM32F103RC_btt]
|
2021-05-11 15:44:54 +00:00
|
|
|
platform = ${common_stm32.platform}
|
2021-06-02 06:42:15 +00:00
|
|
|
extends = common_STM32F103RC
|
2021-05-11 15:44:54 +00:00
|
|
|
build_flags = ${common_stm32.build_flags} -DDEBUG_LEVEL=0 -DTIMER_SERVO=TIM5
|
|
|
|
board_build.offset = 0x7000
|
|
|
|
board_build.encrypt = No
|
|
|
|
board_build.firmware = firmware.bin
|
|
|
|
board_upload.offset_address = 0x08007000
|
|
|
|
|
2021-06-02 06:42:15 +00:00
|
|
|
[env:STM32F103RC_btt_USB]
|
|
|
|
extends = env:STM32F103RC_btt
|
2021-05-11 15:44:54 +00:00
|
|
|
platform = ${common_stm32.platform}
|
2021-06-03 21:52:25 +00:00
|
|
|
platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-2.zip
|
2021-05-11 15:44:54 +00:00
|
|
|
build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC
|
2021-06-02 06:42:15 +00:00
|
|
|
build_flags = ${env:STM32F103RC_btt.build_flags} ${env:stm32_flash_drive.build_flags}
|
2021-05-11 15:44:54 +00:00
|
|
|
-DUSBCON
|
|
|
|
-DUSE_USBHOST_HS
|
|
|
|
-DUSBD_IRQ_PRIO=5
|
|
|
|
-DUSBD_IRQ_SUBPRIO=6
|
|
|
|
-DUSE_USB_HS_IN_FS
|
|
|
|
-DUSBD_USE_CDC_MSC
|
|
|
|
|
2021-06-02 06:42:15 +00:00
|
|
|
[env:STM32F103RC_btt_512K]
|
2021-05-11 15:44:54 +00:00
|
|
|
platform = ${common_stm32.platform}
|
2021-06-02 06:42:15 +00:00
|
|
|
extends = env:STM32F103RC_btt
|
2021-05-11 15:44:54 +00:00
|
|
|
board_upload.maximum_size = 524288
|
2021-06-02 06:42:15 +00:00
|
|
|
build_flags = ${env:STM32F103RC_btt.build_flags} -DLD_MAX_DATA_SIZE=524288 -DSTM32_FLASH_SIZE=512
|
2021-05-11 15:44:54 +00:00
|
|
|
|
2021-06-02 06:42:15 +00:00
|
|
|
[env:STM32F103RC_btt_512K_USB]
|
2021-05-11 15:44:54 +00:00
|
|
|
platform = ${common_stm32.platform}
|
2021-06-02 06:42:15 +00:00
|
|
|
extends = env:STM32F103RC_btt_USB
|
2021-05-11 15:44:54 +00:00
|
|
|
board_upload.maximum_size = 524288
|
2021-06-02 06:42:15 +00:00
|
|
|
build_flags = ${env:STM32F103RC_btt_USB.build_flags} -DLD_MAX_DATA_SIZE=524288 -DSTM32_FLASH_SIZE=512
|
2021-04-02 02:53:19 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# MKS Robin (STM32F103ZET6)
|
|
|
|
# Uses HAL STM32 to support Marlin UI for TFT screen with optional touch panel
|
|
|
|
#
|
2021-06-02 06:42:15 +00:00
|
|
|
[env:mks_robin]
|
2021-04-02 02:53:19 +00:00
|
|
|
platform = ${common_stm32.platform}
|
|
|
|
extends = common_stm32
|
|
|
|
board = genericSTM32F103ZE
|
|
|
|
board_build.core = stm32
|
|
|
|
board_build.variant = MARLIN_F103Zx
|
|
|
|
board_build.ldscript = ldscript.ld
|
|
|
|
board_build.offset = 0x7000
|
|
|
|
board_build.encrypt = Yes
|
|
|
|
board_build.firmware = Robin.bin
|
|
|
|
build_flags = ${common_stm32.build_flags}
|
|
|
|
-DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
|
|
|
|
build_unflags = ${common_stm32.build_unflags}
|
|
|
|
-DUSBCON -DUSBD_USE_CDC
|
|
|
|
extra_scripts = ${common.extra_scripts}
|
|
|
|
pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
|
|
|
buildroot/share/PlatformIO/scripts/stm32_bootloader.py
|
|
|
|
buildroot/share/PlatformIO/scripts/mks_encrypt.py
|
|
|
|
lib_deps =
|
|
|
|
|
|
|
|
#
|
|
|
|
# Creality (STM32F103RET6)
|
|
|
|
#
|
|
|
|
[env:STM32F103RET6_creality]
|
2021-06-02 06:42:15 +00:00
|
|
|
platform = ${common_stm32.platform}
|
|
|
|
extends = common_stm32
|
2021-06-03 08:10:04 +00:00
|
|
|
build_flags = ${common_stm32.build_flags} -DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED -DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
|
2021-06-02 06:42:15 +00:00
|
|
|
board = genericSTM32F103RE
|
|
|
|
monitor_speed = 115200
|
|
|
|
board_build.core = stm32
|
|
|
|
board_build.variant = MARLIN_F103Rx
|
|
|
|
board_build.offset = 0x7000
|
|
|
|
board_build.ldscript = ldscript.ld
|
|
|
|
board_upload.offset_address = 0x08007000
|
|
|
|
build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
|
|
|
|
extra_scripts = ${common.extra_scripts}
|
|
|
|
pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
2021-04-02 02:53:19 +00:00
|
|
|
pre:buildroot/share/PlatformIO/scripts/random-bin.py
|
2021-06-02 06:42:15 +00:00
|
|
|
buildroot/share/PlatformIO/scripts/stm32_bootloader.py
|
|
|
|
debug_tool = jlink
|
|
|
|
upload_protocol = jlink
|
2021-04-02 02:53:19 +00:00
|
|
|
|
|
|
|
#
|
2021-06-02 06:42:15 +00:00
|
|
|
# FLSUN QQS Pro (STM32F103VET6)
|
2021-04-02 02:53:19 +00:00
|
|
|
# board Hispeedv1
|
|
|
|
#
|
|
|
|
[env:flsun_hispeedv1]
|
|
|
|
platform = ${common_stm32.platform}
|
|
|
|
extends = common_stm32
|
|
|
|
build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
|
|
|
|
board = genericSTM32F103VE
|
|
|
|
board_build.core = stm32
|
|
|
|
board_build.variant = MARLIN_F103Vx
|
|
|
|
board_build.ldscript = ldscript.ld
|
|
|
|
board_build.offset = 0x7000
|
|
|
|
board_build.firmware = Robin_mini.bin
|
|
|
|
board_build.encrypt = Yes
|
|
|
|
board_upload.offset_address = 0x08007000
|
|
|
|
build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
|
|
|
|
extra_scripts = ${common.extra_scripts}
|
|
|
|
pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
|
|
|
buildroot/share/PlatformIO/scripts/stm32_bootloader.py
|
|
|
|
buildroot/share/PlatformIO/scripts/mks_encrypt.py
|
|
|
|
|
|
|
|
#
|
2021-06-02 06:42:15 +00:00
|
|
|
# MKS Robin Nano V1.2 and V2
|
2021-04-02 02:53:19 +00:00
|
|
|
#
|
2021-06-02 06:42:15 +00:00
|
|
|
[env:mks_robin_nano35]
|
2021-04-02 02:53:19 +00:00
|
|
|
platform = ${common_stm32.platform}
|
|
|
|
extends = common_stm32
|
|
|
|
build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
|
|
|
|
board = genericSTM32F103VE
|
|
|
|
board_build.core = stm32
|
|
|
|
board_build.variant = MARLIN_F103Vx
|
|
|
|
board_build.ldscript = ldscript.ld
|
|
|
|
board_build.offset = 0x7000
|
|
|
|
board_build.encrypt = Yes
|
|
|
|
board_build.firmware = Robin_nano35.bin
|
|
|
|
board_upload.offset_address = 0x08007000
|
|
|
|
build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
|
|
|
|
debug_tool = jlink
|
|
|
|
upload_protocol = jlink
|
|
|
|
extra_scripts = ${common.extra_scripts}
|
|
|
|
pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
|
|
|
buildroot/share/PlatformIO/scripts/stm32_bootloader.py
|
|
|
|
buildroot/share/PlatformIO/scripts/mks_encrypt.py
|
|
|
|
|
|
|
|
#
|
|
|
|
# Mingda MPX_ARM_MINI
|
|
|
|
#
|
|
|
|
[env:mingda_mpx_arm_mini]
|
|
|
|
platform = ${common_stm32.platform}
|
|
|
|
extends = common_stm32
|
|
|
|
board = genericSTM32F103ZE
|
|
|
|
board_build.core = stm32
|
|
|
|
board_build.variant = MARLIN_F103Zx
|
|
|
|
board_build.ldscript = ldscript.ld
|
|
|
|
board_build.offset = 0x10000
|
|
|
|
build_flags = ${common_stm32.build_flags} -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
|
|
|
|
build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
|
|
|
|
extra_scripts = ${common.extra_scripts}
|
|
|
|
pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
|
|
|
buildroot/share/PlatformIO/scripts/stm32_bootloader.py
|