From b53e8edbe50ef1d0d93c580b3f90fe497fc3d18c Mon Sep 17 00:00:00 2001
From: schneider <schneider@blinkenlichts.net>
Date: Fri, 14 Jun 2019 19:05:54 +0200
Subject: [PATCH] fix(bootloader): Special linker script for the bootloader

---
 bootloader/Makefile                                             | 2 +-
 .../MAX32665/Source/GCC/{max32665_app.ld => max32665_boot.ld}   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
 rename lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/Source/GCC/{max32665_app.ld => max32665_boot.ld} (99%)

diff --git a/bootloader/Makefile b/bootloader/Makefile
index 88447371d..65d7b58b8 100644
--- a/bootloader/Makefile
+++ b/bootloader/Makefile
@@ -102,7 +102,7 @@ PROJ_CFLAGS+=-DMXC_ASSERT_ENABLE
 #MXC_OPTIMIZE_CFLAGS=-Og
 
 # Point this variable to a linker file to override the default file
-# LINKERFILE=$(CMSIS_ROOT)/Device/Maxim/$(TARGET_UC)/Source/GCC/$(TARGET_LC).ld
+LINKERFILE=$(CMSIS_ROOT)/Device/Maxim/$(TARGET_UC)/Source/GCC/$(TARGET_LC)_boot.ld
 
 ################################################################################
 # Include external library makefiles here
diff --git a/lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/Source/GCC/max32665_app.ld b/lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/Source/GCC/max32665_boot.ld
similarity index 99%
rename from lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/Source/GCC/max32665_app.ld
rename to lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/Source/GCC/max32665_boot.ld
index 791899b15..30b2d30fc 100644
--- a/lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/Source/GCC/max32665_app.ld
+++ b/lib/sdk/Libraries/CMSIS/Device/Maxim/MAX32665/Source/GCC/max32665_boot.ld
@@ -38,7 +38,7 @@
 /* If used, they should be adjusted for the external Flash/RAM size */
 MEMORY {
     SPIX (rx)  : ORIGIN = 0x08000000, LENGTH = 128M
-    FLASH (rx) : ORIGIN = 0x10010000, LENGTH = 960k
+    FLASH (rx) : ORIGIN = 0x10000000, LENGTH = 64k
     SRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 512k
     SPID (r)   : ORIGIN = 0x80000000, LENGTH = 512M
 }
-- 
GitLab