From 749589b088698bea5b2203e16c8a2e9f849f9c69 Mon Sep 17 00:00:00 2001
From: ModMike <36581178+ModMike@users.noreply.github.com>
Date: Tue, 16 Jun 2020 03:39:53 -0400
Subject: [PATCH] Fix Fysetc SD FW bootloader addr / size requirement (#18246)

---
 buildroot/share/PlatformIO/ldscripts/fysetc_stm32f103rc.ld | 2 +-
 buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/buildroot/share/PlatformIO/ldscripts/fysetc_stm32f103rc.ld b/buildroot/share/PlatformIO/ldscripts/fysetc_stm32f103rc.ld
index 7122acb3b6..6777e59182 100644
--- a/buildroot/share/PlatformIO/ldscripts/fysetc_stm32f103rc.ld
+++ b/buildroot/share/PlatformIO/ldscripts/fysetc_stm32f103rc.ld
@@ -5,7 +5,7 @@
 MEMORY
 {
 	ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K
-	rom (rx)  : ORIGIN = 0x08010000, LENGTH = 256K - 64K
+	rom (rx)  : ORIGIN = 0x08008000, LENGTH = 256K - 32K
 }
 
 /* Provide memory region aliases for common.inc */
diff --git a/buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py b/buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
index a66c18a5e2..b69f62578b 100644
--- a/buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
+++ b/buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
@@ -3,11 +3,11 @@ from os.path import join
 from os.path import expandvars
 Import("env")
 
-# Relocate firmware from 0x08000000 to 0x08010000
+# Relocate firmware from 0x08000000 to 0x08008000
 #for define in env['CPPDEFINES']:
 #    if define[0] == "VECT_TAB_ADDR":
 #        env['CPPDEFINES'].remove(define)
-#env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08010000"))
+#env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08008000"))
 
 #custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/fysetc_stm32f103rc.ld")
 #for i, flag in enumerate(env["LINKFLAGS"]):
-- 
GitLab