From 455c828e91d78247dc3cf1533fb62b6c0f352bb6 Mon Sep 17 00:00:00 2001 From: elimisback Date: Sat, 28 May 2022 16:22:59 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20BTT=20STM32G0B1RE=20xfer=20build?= =?UTF-8?q?=20(#24245)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/SanityCheck.h | 5 +++++ Marlin/src/pins/pins.h | 2 +- ini/stm32f1.ini | 1 + ini/stm32g0.ini | 10 ++++++++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 495a4237aec6e..c4e18fd9cc307 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -4141,3 +4141,8 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive."); #elif ENABLED(DISABLE_JTAG) && !defined(JTAG_DISABLE) #error "DISABLE_JTAG is not supported for the selected MCU/Board." #endif + +// Check requirements for upload.py +#if ENABLED(XFER_BUILD) && !BOTH(BINARY_FILE_TRANSFER, CUSTOM_FIRMWARE_UPLOAD) + #error "BINARY_FILE_TRANSFER and CUSTOM_FIRMWARE_UPLOAD are required for custom upload." +#endif diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 3ea3c6b48d3cb..40b0c714c6dd2 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -538,7 +538,7 @@ #elif MB(BTT_SKR_MINI_E3_V2_0) #include "stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_USB env:STM32F103RE_btt env:STM32F103RE_btt_USB env:STM32F103RC_btt_maple env:STM32F103RC_btt_USB_maple env:STM32F103RE_btt_maple env:STM32F103RE_btt_USB_maple #elif MB(BTT_SKR_MINI_E3_V3_0) - #include "stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h" // STM32G0 env:STM32G0B1RE_btt + #include "stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h" // STM32G0 env:STM32G0B1RE_btt env:STM32G0B1RE_btt_xfer #elif MB(BTT_SKR_MINI_MZ_V1_0) #include "stm32f1/pins_BTT_SKR_MINI_MZ_V1_0.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_USB env:STM32F103RC_btt_maple env:STM32F103RC_btt_USB_maple #elif MB(BTT_SKR_E3_DIP) diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index 6bf6a1cb851c0..7493e3682ce54 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -138,6 +138,7 @@ upload_protocol = jlink # [STM32F103Rx_creality_xfer] extends = STM32F103Rx_creality +build_flags = ${STM32F103Rx_creality.build_flags} -DXFER_BUILD extra_scripts = ${STM32F103Rx_creality.extra_scripts} pre:buildroot/share/scripts/upload.py upload_protocol = custom diff --git a/ini/stm32g0.ini b/ini/stm32g0.ini index e6094c1e312db..b6074d3af8d0b 100644 --- a/ini/stm32g0.ini +++ b/ini/stm32g0.ini @@ -36,3 +36,13 @@ build_flags = ${stm32_variant.build_flags} -DSTEP_TIMER_IRQ_PRIO=0 upload_protocol = stlink debug_tool = stlink + +# +# Custom upload to SD via Marlin with Binary Protocol +# +[env:STM32G0B1RE_btt_xfer] +extends = env:STM32G0B1RE_btt +build_flags = ${env:STM32G0B1RE_btt.build_flags} -DXFER_BUILD +extra_scripts = ${env:STM32G0B1RE_btt.extra_scripts} + pre:buildroot/share/scripts/upload.py +upload_protocol = custom