From 2cc12ea6520dd5b57be721eb5ebd103ecf360e5d Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Wed, 6 May 2020 23:05:01 -0700 Subject: [PATCH 1/3] Normalize configuration of HAL/STM32 targets Add additional testing and resolve issues compiling with TMCStepper. Add a variable to declare the version of framework-arduinoststm32. Upgrade framework-arduinoststm32 to 4.107 Remove previously unused ldscript filenames from board.json files. --- .github/workflows/test-builds.yml | 8 +++-- .../PlatformIO/boards/BigTree_Btt002.json | 1 - .../PlatformIO/boards/BigTree_SKR_Pro.json | 1 - .../share/PlatformIO/boards/FLYF407ZG.json | 1 - .../PlatformIO/boards/blackSTM32F407VET6.json | 1 - buildroot/share/tests/ARMED-tests | 5 ++- buildroot/share/tests/BIGTREE_GTR_V1_0-tests | 4 ++- buildroot/share/tests/BIGTREE_SKR_PRO-tests | 3 +- buildroot/share/tests/FLYF407ZG-tests | 18 ++++++++++ buildroot/share/tests/FYSETC_S6-tests | 2 ++ .../share/tests/STM32F070RB_malyan-tests | 15 ++++++++ .../share/tests/STM32F401VE_STEVAL-tests | 16 +++++++++ buildroot/share/tests/STM32F407VE_black-tests | 1 + buildroot/share/tests/malyan_M300-tests | 1 + buildroot/share/tests/rumba32_f446ve-tests | 17 ++++++++++ buildroot/share/tests/rumba32_mks-tests | 18 ++++++++++ platformio.ini | 34 ++++++++++++------- 17 files changed, 124 insertions(+), 22 deletions(-) create mode 100644 buildroot/share/tests/FLYF407ZG-tests create mode 100644 buildroot/share/tests/STM32F070RB_malyan-tests create mode 100644 buildroot/share/tests/STM32F401VE_STEVAL-tests create mode 100644 buildroot/share/tests/rumba32_f446ve-tests create mode 100644 buildroot/share/tests/rumba32_mks-tests diff --git a/.github/workflows/test-builds.yml b/.github/workflows/test-builds.yml index f08032c2dee4..bd47ccf1f43d 100644 --- a/.github/workflows/test-builds.yml +++ b/.github/workflows/test-builds.yml @@ -52,13 +52,19 @@ jobs: - jgaurora_a5s_a1 - STM32F103VE_longer - STM32F407VE_black + - STM32F401VE_STEVAL + - BIGTREE_BTT002 - BIGTREE_SKR_PRO - BIGTREE_GTR_V1_0 - mks_robin - ARMED - FYSETC_S6 + - STM32F070RB_malyan - malyan_M300 - mks_robin_lite + - FLYF407ZG + - rumba32_f446ve + - rumba32_mks # Put lengthy tests last @@ -71,8 +77,6 @@ jobs: #- STM32F7 # Non-working environment tests - - #- BIGTREE_BTT002 #- at90usb1286_cdc #- at90usb1286_dfu #- STM32F103CB_malyan diff --git a/buildroot/share/PlatformIO/boards/BigTree_Btt002.json b/buildroot/share/PlatformIO/boards/BigTree_Btt002.json index 9012d107bce6..ef3333cbb936 100644 --- a/buildroot/share/PlatformIO/boards/BigTree_Btt002.json +++ b/buildroot/share/PlatformIO/boards/BigTree_Btt002.json @@ -14,7 +14,6 @@ "0x3748" ] ], - "ldscript": "stm32f407xg.ld", "mcu": "stm32f407vgt6", "variant": "BIGTREE_BTT002" }, diff --git a/buildroot/share/PlatformIO/boards/BigTree_SKR_Pro.json b/buildroot/share/PlatformIO/boards/BigTree_SKR_Pro.json index 1b5aee4b8e55..357b3acca942 100644 --- a/buildroot/share/PlatformIO/boards/BigTree_SKR_Pro.json +++ b/buildroot/share/PlatformIO/boards/BigTree_SKR_Pro.json @@ -14,7 +14,6 @@ "0x3748" ] ], - "ldscript": "stm32f407xg.ld", "mcu": "stm32f407zgt6", "variant": "BIGTREE_SKR_PRO_1v1" }, diff --git a/buildroot/share/PlatformIO/boards/FLYF407ZG.json b/buildroot/share/PlatformIO/boards/FLYF407ZG.json index 944dc7a9d8fa..060b50ee8c05 100644 --- a/buildroot/share/PlatformIO/boards/FLYF407ZG.json +++ b/buildroot/share/PlatformIO/boards/FLYF407ZG.json @@ -14,7 +14,6 @@ "0x3748" ] ], - "ldscript": "stm32f407xg.ld", "mcu": "stm32f407zgt6", "variant": "FLY_F407ZG" }, diff --git a/buildroot/share/PlatformIO/boards/blackSTM32F407VET6.json b/buildroot/share/PlatformIO/boards/blackSTM32F407VET6.json index c55d7cc80ace..1778ddaaf020 100644 --- a/buildroot/share/PlatformIO/boards/blackSTM32F407VET6.json +++ b/buildroot/share/PlatformIO/boards/blackSTM32F407VET6.json @@ -14,7 +14,6 @@ "0x3748" ] ], - "ldscript": "stm32f407xe.ld", "mcu": "stm32f407vet6", "variant": "MARLIN_F407VE" }, diff --git a/buildroot/share/tests/ARMED-tests b/buildroot/share/tests/ARMED-tests index 44af749a4827..e5959a4383a7 100644 --- a/buildroot/share/tests/ARMED-tests +++ b/buildroot/share/tests/ARMED-tests @@ -9,8 +9,11 @@ set -e # # Build with the default configurations # +restore_configs use_example_configs ArmEd -exec_test $1 $2 "ArmEd Example Configuration" +opt_set X_DRIVER_TYPE TMC2130 +opt_set Y_DRIVER_TYPE TMC2208 +exec_test $1 $2 "ArmEd Example Configuration with mixed TMC Drivers" # clean up restore_configs diff --git a/buildroot/share/tests/BIGTREE_GTR_V1_0-tests b/buildroot/share/tests/BIGTREE_GTR_V1_0-tests index 18a6a75f6f1b..850aaeacdf6f 100644 --- a/buildroot/share/tests/BIGTREE_GTR_V1_0-tests +++ b/buildroot/share/tests/BIGTREE_GTR_V1_0-tests @@ -21,7 +21,9 @@ opt_set TEMP_SENSOR_7 1 opt_set E0_AUTO_FAN_PIN PC10 opt_set E1_AUTO_FAN_PIN PC11 opt_set E2_AUTO_FAN_PIN PC12 -exec_test $1 $2 "BigTreeTech GTR 8 Extruders with Auto-Fan" +opt_set X_DRIVER_TYPE TMC2208 +opt_set Y_DRIVER_TYPE TMC2130 +exec_test $1 $2 "BigTreeTech GTR 8 Extruders with Auto-Fan and Mixed TMC Drivers" restore_configs opt_set MOTHERBOARD BOARD_BTT_GTR_V1_0 diff --git a/buildroot/share/tests/BIGTREE_SKR_PRO-tests b/buildroot/share/tests/BIGTREE_SKR_PRO-tests index 7623bf3f6605..1617275de915 100644 --- a/buildroot/share/tests/BIGTREE_SKR_PRO-tests +++ b/buildroot/share/tests/BIGTREE_SKR_PRO-tests @@ -23,9 +23,10 @@ opt_set TEMP_SENSOR_2 1 opt_set E0_AUTO_FAN_PIN PC10 opt_set E1_AUTO_FAN_PIN PC11 opt_set E2_AUTO_FAN_PIN PC12 +opt_set BLTOUCH Z_SAFE_HOMING opt_set X_DRIVER_TYPE TMC2209 opt_set Y_DRIVER_TYPE TMC2130 -exec_test $1 $2 "BigTreeTech SKR Pro 3 Extruders with Auto-Fan and mixed TMC drivers" +exec_test $1 $2 "BigTreeTech SKR Pro 3 Extruders, Auto-Fan, BLTOUCH, and mixed TMC drivers" # clean up restore_configs diff --git a/buildroot/share/tests/FLYF407ZG-tests b/buildroot/share/tests/FLYF407ZG-tests new file mode 100644 index 000000000000..f1a65da6cbb3 --- /dev/null +++ b/buildroot/share/tests/FLYF407ZG-tests @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# +# Build tests for FLYF407ZG +# + +# exit on first failure +set -e + +# Build examples +restore_configs +opt_set MOTHERBOARD BOARD_FLYF407ZG +opt_set SERIAL_PORT -1 +opt_set X_DRIVER_TYPE TMC2208 +opt_set Y_DRIVER_TYPE TMC2130 +exec_test $1 $2 "FLYF407ZG Default Config with mixed TMC Drivers" + +# cleanup +restore_configs diff --git a/buildroot/share/tests/FYSETC_S6-tests b/buildroot/share/tests/FYSETC_S6-tests index a9e0331acdb5..c75629156b08 100644 --- a/buildroot/share/tests/FYSETC_S6-tests +++ b/buildroot/share/tests/FYSETC_S6-tests @@ -9,6 +9,8 @@ set -e # Build examples restore_configs use_example_configs FYSETC/S6 +opt_set Y_DRIVER_TYPE TMC2209 +opt_set Z_DRIVER_TYPE TMC2130 exec_test $1 $2 "FYSETC S6 Example" # cleanup diff --git a/buildroot/share/tests/STM32F070RB_malyan-tests b/buildroot/share/tests/STM32F070RB_malyan-tests new file mode 100644 index 000000000000..58237a70eb5f --- /dev/null +++ b/buildroot/share/tests/STM32F070RB_malyan-tests @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# +# Build tests for STM32F070RB Malyan M200 v2 +# + +# exit on first failure +set -e + +restore_configs +opt_set MOTHERBOARD BOARD_MALYAN_M200_V2 +opt_set SERIAL_PORT -1 +exec_test $1 $2 "Malyan M200 v2 Default Config" + +# cleanup +restore_configs diff --git a/buildroot/share/tests/STM32F401VE_STEVAL-tests b/buildroot/share/tests/STM32F401VE_STEVAL-tests new file mode 100644 index 000000000000..2811014c13b2 --- /dev/null +++ b/buildroot/share/tests/STM32F401VE_STEVAL-tests @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# +# Build tests for STM32F401VE_STEVAL +# + +# exit on first failure +set -e + +# Build examples +restore_configs +opt_set MOTHERBOARD BOARD_STEVAL_3DP001V1 +opt_set SERIAL_PORT -1 +exec_test $1 $2 "STM32F401VE_STEVAL Default Config" + +# cleanup +restore_configs diff --git a/buildroot/share/tests/STM32F407VE_black-tests b/buildroot/share/tests/STM32F407VE_black-tests index c35b279b0f58..908382ec2a04 100755 --- a/buildroot/share/tests/STM32F407VE_black-tests +++ b/buildroot/share/tests/STM32F407VE_black-tests @@ -6,6 +6,7 @@ # exit on first failure set -e +restore_configs use_example_configs STM32/Black_STM32F407VET6 opt_enable BAUD_RATE_GCODE exec_test $1 $2 "Full-featured Sample Black STM32F407VET6 config" diff --git a/buildroot/share/tests/malyan_M300-tests b/buildroot/share/tests/malyan_M300-tests index 31cbabd754d3..ada60d558429 100755 --- a/buildroot/share/tests/malyan_M300-tests +++ b/buildroot/share/tests/malyan_M300-tests @@ -6,6 +6,7 @@ # exit on first failure set -e +restore_configs use_example_configs "delta/Malyan M300" opt_disable AUTO_BED_LEVELING_3POINT exec_test $1 $2 "Malyan M300 (delta)" diff --git a/buildroot/share/tests/rumba32_f446ve-tests b/buildroot/share/tests/rumba32_f446ve-tests new file mode 100644 index 000000000000..a0286b54a91b --- /dev/null +++ b/buildroot/share/tests/rumba32_f446ve-tests @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# +# Build tests for rumba32_f446ve +# + +# exit on first failure +set -e + +# Build examples +restore_configs +opt_set MOTHERBOARD BOARD_RUMBA32_AUS3D +opt_set SERIAL_PORT -1 +opt_set X_DRIVER_TYPE TMC2130 +exec_test $1 $2 "rumba32_f446ve Default Config with TMC2130" + +# cleanup +restore_configs diff --git a/buildroot/share/tests/rumba32_mks-tests b/buildroot/share/tests/rumba32_mks-tests new file mode 100644 index 000000000000..0180b6d98e14 --- /dev/null +++ b/buildroot/share/tests/rumba32_mks-tests @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# +# Build tests for rumba32_mks +# + +# exit on first failure +set -e + +# Build examples +restore_configs +opt_set MOTHERBOARD BOARD_RUMBA32_MKS +opt_set SERIAL_PORT -1 +opt_set X_DRIVER_TYPE TMC2130 +opt_set Y_DRIVER_TYPE TMC2208 +exec_test $1 $2 "rumba32_mks Default Config with Mixed TMC Drivers" + +# cleanup +restore_configs diff --git a/platformio.ini b/platformio.ini index a2c587ebc9c9..3b5d9f108aeb 100644 --- a/platformio.ini +++ b/platformio.ini @@ -34,6 +34,7 @@ lib_deps = Arduino-L6470=https://github.com/ameyer/Arduino-L6470/archive/0.8.0.zip SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip SlowSoftI2CMaster=https://github.com/mikeshub/SlowSoftI2CMaster/archive/master.zip +arduinoststm32_ver = >=4.10700,<4.10800 # Globally defined properties # inherited by all environments @@ -470,6 +471,7 @@ src_filter = ${common.default_src_filter} + - -lib_ignore = LiquidCrystal, LiquidTWI2, Adafruit NeoPixel, TMCStepper, U8glib-HAL +lib_ignore = LiquidCrystal, LiquidTWI2, Adafruit NeoPixel, TMCStepper, U8glib-HAL, SoftwareSerial # # Malyan M300 (STM32F070CB) @@ -675,8 +679,8 @@ lib_ignore = Adafruit NeoPixel # [env:STM32F401VE_STEVAL] platform = ststm32 +platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver} board = STEVAL_STM32F401VE -platform_packages = framework-arduinoststm32@>=3.10700,<4 build_flags = ${common.build_flags} -DTARGET_STM32F4 -DARDUINO_STEVAL -DSTM32F401xE -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 -DUSB_PRODUCT=\"STEVAL_F401VE\" @@ -693,15 +697,15 @@ src_filter = ${common.default_src_filter} + # [env:FLYF407ZG] platform = ststm32 +platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver} board = FLYF407ZG -platform_packages = framework-arduinoststm32@>=3.10700,<4 build_flags = ${common.build_flags} -DSTM32F4 -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 -DUSB_PRODUCT=\"STM32F407ZG\" -DTARGET_STM32F4 -DVECT_TAB_OFFSET=0x8000 -IMarlin/src/HAL/STM32 build_unflags = -std=gnu++11 extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py -lib_ignore = Adafruit NeoPixel, TMCStepper, SailfishLCD, SlowSoftI2CMaster, SoftwareSerial +lib_ignore = Adafruit NeoPixel, SailfishLCD, SlowSoftI2CMaster, SoftwareSerial src_filter = ${common.default_src_filter} + @@ -710,10 +714,10 @@ src_filter = ${common.default_src_filter} + # [env:FYSETC_S6] platform = ststm32 -board = fysetc_s6 platform_packages = tool-stm32duino - framework-arduinoststm32@>=3.10700,<4 + framework-arduinoststm32@${common.arduinoststm32_ver} +board = fysetc_s6 build_flags = ${common.build_flags} -DTARGET_STM32F4 -std=gnu++14 -DVECT_TAB_OFFSET=0x10000 @@ -734,8 +738,8 @@ upload_protocol = serial # [env:STM32F407VE_black] platform = ststm32 +platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver} board = blackSTM32F407VET6 -platform_packages = framework-arduinoststm32@>=3.10700,<4 build_flags = ${common.build_flags} -DTARGET_STM32F4 -DARDUINO_BLACK_F407VE -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 -DUSB_PRODUCT=\"BLACK_F407VE\" @@ -751,8 +755,8 @@ src_filter = ${common.default_src_filter} + # [env:BIGTREE_SKR_PRO] platform = ststm32 +platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver} board = BigTree_SKR_Pro -platform_packages = framework-arduinoststm32@>=3.10700,<4 build_flags = ${common.build_flags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 -DUSB_PRODUCT=\"STM32F407ZG\" -DTARGET_STM32F4 -DSTM32F407_5ZX -DVECT_TAB_OFFSET=0x8000 @@ -771,7 +775,7 @@ debug_init_break = # [env:BIGTREE_GTR_V1_0] platform = ststm32@>=5.7.0 -platform_packages = framework-arduinoststm32@>=3.10700,<4 +platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver} board = BigTree_SKR_Pro extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py build_flags = ${common.build_flags} @@ -793,8 +797,8 @@ src_filter = ${common.default_src_filter} + # [env:BIGTREE_BTT002] platform = ststm32@5.6.0 +platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver} board = BigTree_Btt002 -platform_packages = framework-arduinoststm32@>=3.10700,<4 build_flags = ${common.build_flags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 -DUSB_PRODUCT=\"STM32F407VG\" -DTARGET_STM32F4 -DSTM32F407_5VX -DVECT_TAB_OFFSET=0x8000 @@ -882,6 +886,7 @@ debug_tool = jlink # [env:rumba32_f446ve] platform = ststm32 +platform_packages = framework-arduinoststm32@${common.arduinoststm32_ver} board = rumba32_f446ve build_flags = ${common.build_flags} -DSTM32F4xx @@ -898,7 +903,8 @@ build_flags = ${common.build_flags} -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED -Os -lib_ignore = Adafruit NeoPixel + -IMarlin/src/HAL/STM32 +lib_ignore = Adafruit NeoPixel, SoftwareSerial src_filter = ${common.default_src_filter} + monitor_speed = 500000 upload_protocol = dfu @@ -908,6 +914,7 @@ upload_protocol = dfu # [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\"" @@ -919,8 +926,9 @@ build_flags = ${common.build_flags} -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED -Os -lib_ignore = Adafruit NeoPixel -src_filter = ${common.default_src_filter} + + - + -IMarlin/src/HAL/STM32 +lib_ignore = Adafruit NeoPixel, SoftwareSerial +src_filter = ${common.default_src_filter} + upload_protocol = dfu # From ed65251f4890ea300811f1691288b177bdd8521c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 7 May 2020 22:30:27 -0500 Subject: [PATCH 2/3] Update platformio.ini --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 3b5d9f108aeb..cf98b22badf2 100644 --- a/platformio.ini +++ b/platformio.ini @@ -34,7 +34,7 @@ lib_deps = Arduino-L6470=https://github.com/ameyer/Arduino-L6470/archive/0.8.0.zip SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip SlowSoftI2CMaster=https://github.com/mikeshub/SlowSoftI2CMaster/archive/master.zip -arduinoststm32_ver = >=4.10700,<4.10800 + arduinoststm32_ver = >=4.10700,<4.10800 # Globally defined properties # inherited by all environments From c3dd7ae871fa12154e566a5116710f4673c0bfe5 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 7 May 2020 22:31:44 -0500 Subject: [PATCH 3/3] Update platformio.ini --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index cf98b22badf2..ac9825ed7880 100644 --- a/platformio.ini +++ b/platformio.ini @@ -21,6 +21,7 @@ boards_dir = buildroot/share/PlatformIO/boards default_envs = mega2560 [common] +arduinoststm32_ver = >=4.10700,<4.10800 default_src_filter = + - - + extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py build_flags = -fmax-errors=5 -g -D__MARLIN_FIRMWARE__ -fmerge-all-constants @@ -34,7 +35,6 @@ lib_deps = Arduino-L6470=https://github.com/ameyer/Arduino-L6470/archive/0.8.0.zip SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip SlowSoftI2CMaster=https://github.com/mikeshub/SlowSoftI2CMaster/archive/master.zip - arduinoststm32_ver = >=4.10700,<4.10800 # Globally defined properties # inherited by all environments