From de73792523e5d23db29e58f2a7ba0365af583103 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Thu, 15 Jul 2021 14:52:34 +0200 Subject: [PATCH 1/7] Longer3D board is a VE variant --- ini/stm32f1.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index f1446f326765..c1ca55d3d0ee 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -369,13 +369,12 @@ platform = ${common_stm32.platform} extends = common_stm32 board = genericSTM32F103VE board_build.core = stm32 -board_build.variant = MARLIN_F103Zx +board_build.variant = MARLIN_F103Vx board_build.offset = 0x1000 board_build.address = 0x08010000 build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12 build_unflags = ${common_stm32.build_unflags} - -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6 extra_scripts = ${stm32f1_variant.extra_scripts} buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py From cb16d46841cf1fcb82a8c999bf12469a01d4f062 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Thu, 15 Jul 2021 15:15:33 +0200 Subject: [PATCH 2/7] The board use a dedicated Serial to USB chip --- ini/stm32f1.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index c1ca55d3d0ee..97dc2bf64daf 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -373,8 +373,9 @@ board_build.variant = MARLIN_F103Vx board_build.offset = 0x1000 board_build.address = 0x08010000 build_flags = ${common_stm32.build_flags} - -DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12 + -DMCU_STM32F103VE -DU20 -DTS_V12 build_unflags = ${common_stm32.build_unflags} + -DUSBCON -DUSBD_USE_CDC extra_scripts = ${stm32f1_variant.extra_scripts} buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py From 2f54eee416591ff517d5199147e969f9f8e3ce39 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Thu, 15 Jul 2021 16:10:36 +0200 Subject: [PATCH 3/7] Use tone/servo extra timers for high density F103VE --- .../share/PlatformIO/variants/MARLIN_F103Vx/variant.h | 8 ++++++-- ini/stm32f1.ini | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h index b622b39376b9..496d8817a181 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h @@ -132,8 +132,12 @@ extern "C" { // Timer Definitions (optional) // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin -#define TIMER_TONE TIM3 -#define TIMER_SERVO TIM2 +#ifndef TIMER_TONE + #define TIMER_TONE TIM6 +#endif +#ifndef TIMER_SERVO + #define TIMER_SERVO TIM7 +#endif // UART Definitions // Define here Serial instance number to map on Serial generic name diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index 97dc2bf64daf..e969683f1adc 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -373,7 +373,7 @@ board_build.variant = MARLIN_F103Vx board_build.offset = 0x1000 board_build.address = 0x08010000 build_flags = ${common_stm32.build_flags} - -DMCU_STM32F103VE -DU20 -DTS_V12 + -DMCU_STM32F103VE -DU20 -DTS_V12 -DTIMER_SERVO=TIM7 build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC extra_scripts = ${stm32f1_variant.extra_scripts} From 8db568c6f4901f5109dd437999c2a9b8f77de258 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 15 Jul 2021 16:48:43 -0500 Subject: [PATCH 4/7] no override needed --- ini/stm32f1.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index e969683f1adc..97dc2bf64daf 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -373,7 +373,7 @@ board_build.variant = MARLIN_F103Vx board_build.offset = 0x1000 board_build.address = 0x08010000 build_flags = ${common_stm32.build_flags} - -DMCU_STM32F103VE -DU20 -DTS_V12 -DTIMER_SERVO=TIM7 + -DMCU_STM32F103VE -DU20 -DTS_V12 build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC extra_scripts = ${stm32f1_variant.extra_scripts} From 7b823082a6d8c037f4f50fcab98235ec01dd2c0f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 15 Jul 2021 16:48:32 -0500 Subject: [PATCH 5/7] Maybe this was intentional in 18130 --- ini/stm32f1.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index 97dc2bf64daf..128ce816aaab 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -194,7 +194,7 @@ build_flags = ${env:STM32F103RE_btt.build_flags} ${env:stm32_flash_drive.b [env:flsun_hispeedv1] platform = ${common_stm32.platform} extends = common_stm32 -build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 +build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 board = genericSTM32F103VE board_build.core = stm32 board_build.variant = MARLIN_F103Vx @@ -210,7 +210,7 @@ extra_scripts = ${stm32f1_variant.extra_scripts} [env:mks_robin_nano35] platform = ${common_stm32.platform} extends = common_stm32 -build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 +build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 board = genericSTM32F103VE board_build.core = stm32 board_build.variant = MARLIN_F103Vx From 9f6b4e315eac84b60e7e6ad41c39c8762b906cba Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 15 Jul 2021 16:49:54 -0500 Subject: [PATCH 6/7] =?UTF-8?q?Envs=20affected=20in=20the=20interim?= =?UTF-8?q?=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ini/stm32f1.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index 128ce816aaab..fc13f0d435a4 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -272,7 +272,7 @@ board_build.core = stm32 board_build.variant = MARLIN_F103Vx board_build.offset = 0x7000 board_build.encrypt = Robin_mini.bin -build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE +build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 board_upload.offset_address = 0x08007000 extra_scripts = ${stm32f1_variant.extra_scripts} @@ -326,7 +326,7 @@ board_build.core = stm32 board_build.variant = MARLIN_F103Vx board_build.offset = 0x7000 board_build.encrypt = Robin_e3p.bin -build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 +build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 board_upload.offset_address = 0x08007000 extra_scripts = ${stm32f1_variant.extra_scripts} debug_tool = jlink From a5c8841486847c5aec8caedefd9bc98af7791c5c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 15 Jul 2021 20:18:35 -0500 Subject: [PATCH 7/7] tweak before merge --- ini/stm32f1.ini | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index fc13f0d435a4..bc4236b8f03d 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -372,10 +372,8 @@ board_build.core = stm32 board_build.variant = MARLIN_F103Vx board_build.offset = 0x1000 board_build.address = 0x08010000 -build_flags = ${common_stm32.build_flags} - -DMCU_STM32F103VE -DU20 -DTS_V12 -build_unflags = ${common_stm32.build_unflags} - -DUSBCON -DUSBD_USE_CDC +build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DU20 -DTS_V12 +build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC extra_scripts = ${stm32f1_variant.extra_scripts} buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py