From b9b9eea2a0447dc2e3d6203a9bcb1d7f5d7113e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Mon, 7 Dec 2020 18:56:33 +0100 Subject: [PATCH] ld: use a MCU with 128 KB of flash (e.g. original STM32) --- application.ld | 6 +++--- bootloader.ld | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/application.ld b/application.ld index ff93513..beb2184 100644 --- a/application.ld +++ b/application.ld @@ -10,7 +10,7 @@ /* define memory regions. */ MEMORY { - rom (rx) : ORIGIN = 0x08000000 + 8K, LENGTH = 64K - 8K + rom (rx) : ORIGIN = 0x08000000 + 8K, LENGTH = 128K - 8K ram (rwx) : ORIGIN = 0x20000000 + 4, LENGTH = 20K - 4 } PROVIDE(__application_beginning = ORIGIN(rom)); @@ -21,8 +21,8 @@ PROVIDE(__flash_end = 0); PROVIDE(__application_end = ORIGIN(rom) + LENGTH(rom)); PROVIDE(__flash_end = ORIGIN(rom) + LENGTH(rom)); */ -PROVIDE(__application_end = 0); -PROVIDE(__flash_end = 0); +PROVIDE(__application_end = ORIGIN(rom) + LENGTH(rom)); +PROVIDE(__flash_end = ORIGIN(rom) + LENGTH(rom)); /* RAM location reserved so application can talk to bootloader and tell to start DFU */ PROVIDE(__dfu_magic = ORIGIN(ram) - 4); diff --git a/bootloader.ld b/bootloader.ld index b662f14..772eb93 100644 --- a/bootloader.ld +++ b/bootloader.ld @@ -21,8 +21,8 @@ PROVIDE(__flash_end = 0); PROVIDE(__application_end = ORIGIN(rom) + LENGTH(rom)); PROVIDE(__flash_end = ORIGIN(rom) + LENGTH(rom)); */ -PROVIDE(__application_end = 0); -PROVIDE(__flash_end = 0); +PROVIDE(__application_end = ORIGIN(rom) + 128K); +PROVIDE(__flash_end = ORIGIN(rom) + 128K); /* RAM location reserved so application can talk to bootloader and tell to start DFU */ PROVIDE(__dfu_magic = ORIGIN(ram) - 4);