From 89704ce7f92831d9729bd8b348f932486cee8717 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 7 Jun 2020 19:40:13 -0500 Subject: [PATCH] Support STM32 platform up to 6.1.x --- platformio.ini | 71 +++++++++++++++++++------------------------------- 1 file changed, 27 insertions(+), 44 deletions(-) diff --git a/platformio.ini b/platformio.ini index 4ecf0e3df7..eec9710c64 100644 --- a/platformio.ini +++ b/platformio.ini @@ -37,7 +37,7 @@ lib_deps = SlowSoftI2CMaster=https://github.com/mikeshub/SlowSoftI2CMaster/archive/master.zip [common_stm32f1] -platform = ststm32 +platform = ststm32@<6.2.0 build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py ${common.build_flags} -std=gnu++14 -DHAVE_SW_SERIAL build_unflags = -std=gnu++11 @@ -386,7 +386,7 @@ lib_deps = ${common_stm32f1.lib_deps} # STM32F4 with STM32GENERIC # [env:STM32F4] -platform = ststm32 +platform = ststm32@<6.2.0 board = disco_f407vg build_flags = ${common.build_flags} -DUSE_STM32GENERIC -DSTM32GENERIC -DSTM32F4 -DMENU_USB_SERIAL -DMENU_SERIAL=SerialUSB -DHAL_IWDG_MODULE_ENABLED lib_ignore = Adafruit NeoPixel, TMCStepper @@ -396,7 +396,7 @@ src_filter = ${common.default_src_filter} + - -=6.1.0 +platform = ststm32@>=6.1.0,<6.2.0 board = malyanm300_f070cb build_flags = ${common.build_flags} -DUSBCON -DUSBD_VID=0x0483 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"MALYAN_M300\"" @@ -588,7 +588,7 @@ build_unflags = ${common_stm32f1.build_unflags} # 'STEVAL-3DP001V1' STM32F401VE board - https://www.st.com/en/evaluation-tools/steval-3dp001v1.html # [env:STM32F401VE_STEVAL] -platform = ststm32 +platform = ststm32@<6.2.0 platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver} board = STEVAL_STM32F401VE build_flags = ${common.build_flags} @@ -607,7 +607,7 @@ src_filter = ${common.default_src_filter} + # FLYF407ZG # [env:FLYF407ZG] -platform = ststm32 +platform = ststm32@<6.2.0 platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver} board = FLYF407ZG build_flags = ${common.build_flags} @@ -624,7 +624,7 @@ src_filter = ${common.default_src_filter} + # FYSETC S6 (STM32F446VET6 ARM Cortex-M4) # [env:FYSETC_S6] -platform = ststm32 +platform = ststm32@<6.2.0 platform_packages = tool-stm32duino framework-arduinoststm32@${common.arduinoststm32_ver} @@ -648,7 +648,7 @@ upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE" # Shield - https://github.com/jmz52/Hardware # [env:STM32F407VE_black] -platform = ststm32 +platform = ststm32@<6.2.0 platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver} board = blackSTM32F407VET6 build_flags = ${common.build_flags} @@ -665,7 +665,7 @@ src_filter = ${common.default_src_filter} + # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4) # [env:BIGTREE_SKR_PRO] -platform = ststm32 +platform = ststm32@<6.2.0 platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver} board = BigTree_SKR_Pro build_flags = ${common.build_flags} @@ -685,7 +685,7 @@ debug_init_break = # Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4) # [env:BIGTREE_GTR_V1_0] -platform = ststm32@>=5.7.0 +platform = ststm32@>=5.7.0,<6.2.0 platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver} board = BigTree_GTR_v1 extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py @@ -795,52 +795,35 @@ debug_tool = jlink # # RUMBA32 # -[env:rumba32_f446ve] -platform = ststm32 + +[common_rumba32] +platform = ststm32@<6.2.0 platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver} board = rumba32_f446ve -build_flags = ${common.build_flags} - -DSTM32F4xx - -DARDUINO_RUMBA32_F446VE - -DARDUINO_ARCH_STM32 - "-DBOARD_NAME=\"RUMBA32_F446VE\"" - -DSTM32F446xx - -DUSBCON - -DUSBD_VID=0x0483 - "-DUSB_MANUFACTURER=\"Unknown\"" - "-DUSB_PRODUCT=\"RUMBA32_F446VE\"" +build_flags = ${common.build_flags} -Os -IMarlin/src/HAL/STM32 + -DSTM32F4xx -DARDUINO_RUMBA32_F446VE -DARDUINO_ARCH_STM32 "-DBOARD_NAME=\"RUMBA32_F446VE\"" + -DSTM32F446xx -DUSBCON "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"RUMBA32_F446VE\"" -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED - -Os - -IMarlin/src/HAL/STM32 lib_ignore = Adafruit NeoPixel, SoftwareSerial src_filter = ${common.default_src_filter} + -monitor_speed = 500000 upload_protocol = dfu +[env:rumba32_f446ve] +platform = ${common_rumba32.platform} +extends = common_rumba32 +build_flags = ${common_rumba32.build_flags} -DUSBD_VID=0x0483 +monitor_speed = 500000 + # # MKS RUMBA32 (adds TMC2208/2209 UART interface and AUX-1) # [env:rumba32_mks] -platform = ststm32 -platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver} -board = rumba32_f446ve -build_flags = ${common.build_flags} - -DSTM32F4xx -DARDUINO_RUMBA32_F446VE -DARDUINO_ARCH_STM32 "-DBOARD_NAME=\"RUMBA32_F446VE\"" - -DSTM32F446xx -DUSBCON -DUSBD_VID=0x8000 - "-DUSB_MANUFACTURER=\"Unknown\"" - "-DUSB_PRODUCT=\"RUMBA32_F446VE\"" - -DHAL_PCD_MODULE_ENABLED - -DUSBD_USE_CDC - -DDISABLE_GENERIC_SERIALUSB - -DHAL_UART_MODULE_ENABLED - -Os - -IMarlin/src/HAL/STM32 -lib_ignore = Adafruit NeoPixel, SoftwareSerial -src_filter = ${common.default_src_filter} + -upload_protocol = dfu +platform = ${common_rumba32.platform} +extends = common_rumba32 +build_flags = ${common_rumba32.build_flags} -DUSBD_VID=0x8000 # # Just print the dependency tree