From 67b232f96eba4621c7fde58c938412af4cf8665d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Sat, 7 Apr 2018 11:15:29 +0200 Subject: [PATCH] ld: fix SRAM size --- application.ld | 6 +++--- bootloader.ld | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/application.ld b/application.ld index 6be593b..f23c412 100644 --- a/application.ld +++ b/application.ld @@ -1,13 +1,13 @@ /* linker script for application running on STM32F103x8 micro-controller - * the STM32F103xC has 256 KB of flash starting at 0x0800 0000, and 20 KB of RAM starting at 0x2000 0000 + * the STM32F103xC has 256 KB of flash starting at 0x0800 0000, and 48 KB of SRAM starting at 0x2000 0000 (exception for STM32F103RC in WLCSP64 package: 64 KB of SRAM) * the USB DFU bootloader will take the first 8 KB of flash, followed by the application */ /* Define memory regions. */ MEMORY { - rom (rx) : ORIGIN = 0x08000000 + 8K, LENGTH = 248K - ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K + rom (rx) : ORIGIN = 0x08000000 + 8K, LENGTH = 256K-8K + ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K } PROVIDE(__application_beginning = ORIGIN(rom)); /* only provide application_end and/or flash_end if you want to force a flash size diff --git a/bootloader.ld b/bootloader.ld index 0b3552c..9461057 100644 --- a/bootloader.ld +++ b/bootloader.ld @@ -1,5 +1,5 @@ -/* linker script for application running on STM32F103x8 micro-controller - * the STM32F103xC has 256 KB of flash starting at 0x0800 0000, and 20 KB of RAM starting at 0x2000 0000 +/* linker script for application running on STM32F103xC micro-controller + * the STM32F103xC has 256 KB of flash starting at 0x0800 0000, and 48 KB of SRAM starting at 0x2000 0000 * the USB DFU bootloader will take the first 8 KB of flash, followed by the application */ @@ -7,7 +7,7 @@ MEMORY { rom (rx) : ORIGIN = 0x08000000, LENGTH = 8K - ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K + ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K } PROVIDE(__application_beginning = ORIGIN(rom) + LENGTH(rom)); /* only provide application_end and/or flash_end if you want to force a flash size