Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update platform STM32 to version 10, optimize build #20325

Merged
merged 10 commits into from
Dec 2, 2020
153 changes: 85 additions & 68 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,8 @@ src_filter = ${common.default_src_filter} +<src/HAL/STM32F1>
lib_ignore = SPI
lib_deps = ${common.lib_deps}
SoftwareSerialM
# Reduce space usage by using a more recent version of arduinoststm32-maple than the one published on platformio
platform_packages = framework-arduinoststm32-maple@https://github.com/mathiasvr/Arduino_STM32/archive/2020.11.29-dev.zip
thinkyhead marked this conversation as resolved.
Show resolved Hide resolved

#
# STM32F103RC
Expand All @@ -750,7 +752,8 @@ lib_deps = ${common.lib_deps}
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103RC
platform_packages = tool-stm32duino
platform_packages = ${common_stm32f1.platform_packages}
tool-stm32duino
monitor_speed = 115200

#
Expand All @@ -760,7 +763,8 @@ monitor_speed = 115200
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = MEEB_3DP
platform_packages = tool-stm32duino
platform_packages = ${common_stm32f1.platform_packages}
tool-stm32duino
thinkyhead marked this conversation as resolved.
Show resolved Hide resolved
build_flags = ${common_stm32f1.build_flags}
-DDEBUG_LEVEL=0
-DSS_TIMER=4
Expand Down Expand Up @@ -842,7 +846,8 @@ lib_deps = ${env:STM32F103RC_btt_512K.lib_deps}
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103RE
platform_packages = tool-stm32duino
platform_packages = ${common_stm32f1.platform_packages}
tool-stm32duino
monitor_speed = 115200

#
Expand Down Expand Up @@ -902,65 +907,69 @@ build_flags = ${common_stm32.build_flags}
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103VE
platform_packages = ${common_stm32f1.platform_packages}
mathiasvr marked this conversation as resolved.
Show resolved Hide resolved
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]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103VE
extra_scripts = ${common.extra_scripts}
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103VE
platform_packages = ${common_stm32f1.platform_packages}
extra_scripts = ${common.extra_scripts}
buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
build_flags = ${common_stm32f1.build_flags}
build_flags = ${common_stm32f1.build_flags}
-DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12
build_unflags = ${common_stm32f1.build_unflags}
build_unflags = ${common_stm32f1.build_unflags}
-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
lib_ignore = ${common_stm32f1.lib_ignore}
lib_ignore = ${common_stm32f1.lib_ignore}

#
# MKS Robin Mini (STM32F103VET6)
#
[env:mks_robin_mini]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103VE
extra_scripts = ${common.extra_scripts}
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103VE
platform_packages = ${common_stm32f1.platform_packages}
extra_scripts = ${common.extra_scripts}
buildroot/share/PlatformIO/scripts/mks_robin_mini.py
build_flags = ${common_stm32f1.build_flags}
build_flags = ${common_stm32f1.build_flags}
-DMCU_STM32F103VE

#
# MKS Robin Nano (STM32F103VET6)
#
[env:mks_robin_nano35]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103VE
platform_packages = tool-stm32duino
extra_scripts = ${common.extra_scripts}
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103VE
platform_packages = ${common_stm32f1.platform_packages}
tool-stm32duino
extra_scripts = ${common.extra_scripts}
buildroot/share/PlatformIO/scripts/mks_robin_nano35.py
build_flags = ${common_stm32f1.build_flags}
build_flags = ${common_stm32f1.build_flags}
-DMCU_STM32F103VE -DSS_TIMER=4
debug_tool = jlink
upload_protocol = jlink
debug_tool = jlink
upload_protocol = jlink

#
# MKS Robin (STM32F103ZET6)
#
[env:mks_robin]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103ZE
extra_scripts = ${common.extra_scripts}
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103ZE
platform_packages = ${common_stm32f1.platform_packages}
extra_scripts = ${common.extra_scripts}
buildroot/share/PlatformIO/scripts/mks_robin.py
build_flags = ${common_stm32f1.build_flags}
build_flags = ${common_stm32f1.build_flags}
-DSS_TIMER=4 -DSTM32_XL_DENSITY

# MKS Robin (STM32F103ZET6)
Expand Down Expand Up @@ -1007,74 +1016,80 @@ extra_scripts = ${common.extra_scripts}
# MKS Robin E3 with TMC2209
#
[env:mks_robin_e3]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103RC
platform_packages = tool-stm32duino
extra_scripts = ${common.extra_scripts}
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103RC
platform_packages = ${common_stm32f1.platform_packages}
tool-stm32duino
extra_scripts = ${common.extra_scripts}
buildroot/share/PlatformIO/scripts/mks_robin_e3.py
build_flags = ${common_stm32f1.build_flags}
build_flags = ${common_stm32f1.build_flags}
-DDEBUG_LEVEL=0 -DSS_TIMER=4

#
# MKS Robin E3p (STM32F103VET6)
# - LVGL UI
#
[env:mks_robin_e3p]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103VE
platform_packages = tool-stm32duino
extra_scripts = ${common.extra_scripts}
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103VE
platform_packages = ${common_stm32f1.platform_packages}
tool-stm32duino
extra_scripts = ${common.extra_scripts}
buildroot/share/PlatformIO/scripts/mks_robin_e3p.py
build_flags = ${common_stm32f1.build_flags}
build_flags = ${common_stm32f1.build_flags}
-DMCU_STM32F103VE -DSS_TIMER=4
debug_tool = jlink
upload_protocol = jlink
debug_tool = jlink
upload_protocol = jlink

#
# MKS Robin Lite/Lite2 (STM32F103RCT6)
#
[env:mks_robin_lite]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103RC
extra_scripts = ${common.extra_scripts}
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103RC
platform_packages = ${common_stm32f1.platform_packages}
extra_scripts = ${common.extra_scripts}
buildroot/share/PlatformIO/scripts/mks_robin_lite.py

#
# MKS ROBIN LITE3 (STM32F103RCT6)
#
[env:mks_robin_lite3]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103RC
extra_scripts = ${common.extra_scripts}
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103RC
platform_packages = ${common_stm32f1.platform_packages}
extra_scripts = ${common.extra_scripts}
buildroot/share/PlatformIO/scripts/mks_robin_lite3.py

#
# JGAurora A5S A1 (STM32F103ZET6)
#
[env:jgaurora_a5s_a1]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103ZE
extra_scripts = ${common.extra_scripts}
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103ZE
platform_packages = ${common_stm32f1.platform_packages}
extra_scripts = ${common.extra_scripts}
buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
build_flags = ${common_stm32f1.build_flags}
build_flags = ${common_stm32f1.build_flags}
-DSTM32F1xx -DSTM32_XL_DENSITY

#
# Malyan M200 (STM32F103CB)
#
[env:STM32F103CB_malyan]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = malyanM200
build_flags = ${common_stm32f1.build_flags}
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = malyanM200
platform_packages = ${common_stm32f1.platform_packages}
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}
lib_ignore = ${common_stm32f1.lib_ignore}
SoftwareSerialM

#
Expand Down Expand Up @@ -1113,15 +1128,16 @@ src_filter = ${common.default_src_filter} +<src/HAL/STM32>
# Chitu boards like Tronxy X5s (STM32F103ZET6)
#
[env:chitu_f103]
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = CHITU_F103
extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-dependencies.py
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = CHITU_F103
platform_packages = ${common_stm32f1.platform_packages}
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}
build_flags = ${common_stm32f1.build_flags}
-DSTM32F1xx -DSTM32_XL_DENSITY
build_unflags = ${common_stm32f1.build_unflags}
build_unflags = ${common_stm32f1.build_unflags}
-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6

#
Expand Down Expand Up @@ -1195,7 +1211,8 @@ extra_scripts = ${common.extra_scripts}
platform = ${common_stm32f1.platform}
extends = common_stm32f1
board = genericSTM32F103RC
platform_packages = tool-stm32duino
platform_packages = ${common_stm32f1.platform_packages}
tool-stm32duino
extra_scripts = ${common.extra_scripts}
buildroot/share/PlatformIO/scripts/fly_mini.py
build_flags = ${common_stm32f1.build_flags}
Expand Down