From 3986d2effe3a3ec7a9c629289a598428c68feb14 Mon Sep 17 00:00:00 2001 From: Julian Appel Date: Wed, 5 Aug 2026 22:30:03 +0200 Subject: [PATCH] Fix off-by-512-byte error in the app-side bootloader linker script flash_with_bootloader.ld's rom region ended 512 bytes short of the NVM region it's meant to butt up against (0x1F900 instead of 0x1FB00), leaving a small gap neither region could use. Corrected the LENGTH and the matching maximum_size in boards/versapad.json (128K - 8K bootloader - 1.25K NVM = 121600 bytes, not 120832). Found while double-checking the numbers for a flash-usage breakdown; current 19KB app image is nowhere near either boundary, so this never affected anything on hardware. Co-Authored-By: Claude Sonnet 5 --- boards/versapad.json | 2 +- variants/versapad/linker_scripts/gcc/flash_with_bootloader.ld | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/boards/versapad.json b/boards/versapad.json index 36e874f..fbf8d7a 100644 --- a/boards/versapad.json +++ b/boards/versapad.json @@ -21,7 +21,7 @@ "name": "VersaPad v2 (USB bootloader)", "upload": { "maximum_ram_size": 16384, - "maximum_size": 120832, + "maximum_size": 121600, "offset": "0x2000", "protocol": "custom" }, diff --git a/variants/versapad/linker_scripts/gcc/flash_with_bootloader.ld b/variants/versapad/linker_scripts/gcc/flash_with_bootloader.ld index 889a441..babb84e 100644 --- a/variants/versapad/linker_scripts/gcc/flash_with_bootloader.ld +++ b/variants/versapad/linker_scripts/gcc/flash_with_bootloader.ld @@ -6,7 +6,7 @@ SEARCH_DIR(.) MEMORY { - rom (rx) : ORIGIN = 0x00002000, LENGTH = 0x0001D900 /* 118.25K – Firmware (128K - 8K bootloader - 1.25K NVM) */ + rom (rx) : ORIGIN = 0x00002000, LENGTH = 0x0001DB00 /* 118.75K – Firmware (128K - 8K bootloader - 1.25K NVM) */ nvm (rx) : ORIGIN = 0x0001FB00, LENGTH = 0x00000500 /* 1.25K – Makros + Config, same layout as flash_without_bootloader.ld */ ram (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 /* 16K */ }