From b0c7c817ee382b5659035d1910d0f592c4817808 Mon Sep 17 00:00:00 2001 From: Michael Karr Date: Thu, 23 Jul 2020 12:21:20 -0500 Subject: [PATCH 1/2] Fix flash offset on HY_TinySTM103T variant. The linker script for the HY_TinySTM103T variant ignored the LD_FLASH_OFFSET linker flags. This prevented proper operation when using a bootloader on these boards. The linker script has been replaced with the generic F103 linkerscript that properly implements this. --- variants/HY_TinySTM103T/ldscript.ld | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/variants/HY_TinySTM103T/ldscript.ld b/variants/HY_TinySTM103T/ldscript.ld index e9b6ad8f97..2ab3a7c3c4 100644 --- a/variants/HY_TinySTM103T/ldscript.ld +++ b/variants/HY_TinySTM103T/ldscript.ld @@ -2,10 +2,10 @@ ***************************************************************************** ** -** File : LinkerScript.ld +** File : ldscript.ld ** -** Abstract : Linker script for STM32F103CBTx Device with -** 128KByte FLASH, 20KByte RAM +** Abstract : Linker script for STM32F103C(8-B)Tx Device with +** 32/64/128KByte FLASH, 10/20KByte RAM ** ** Set heap size, stack size and stack location according ** to application requirements. @@ -52,7 +52,7 @@ ENTRY(Reset_Handler) /* Highest address of the user mode stack */ -_estack = 0x20005000; /* end of RAM */ +_estack = 0x20000000 + LD_MAX_DATA_SIZE; /* end of RAM */ /* Generate a link error if heap and stack don't fit into RAM */ _Min_Heap_Size = 0x200; /* required amount of heap */ _Min_Stack_Size = 0x400; /* required amount of stack */ @@ -60,8 +60,8 @@ _Min_Stack_Size = 0x400; /* required amount of stack */ /* Specify the memory areas */ MEMORY { -RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K -FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 128K +RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE +FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET } /* Define output sections */ From 8fa27cecb86c1bf5d14ae5711f20bd067e1715c8 Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Mon, 3 Aug 2020 16:13:03 +0200 Subject: [PATCH 2/2] Update variants/HY_TinySTM103T/ldscript.ld --- variants/HY_TinySTM103T/ldscript.ld | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variants/HY_TinySTM103T/ldscript.ld b/variants/HY_TinySTM103T/ldscript.ld index 2ab3a7c3c4..b8eb5309d7 100644 --- a/variants/HY_TinySTM103T/ldscript.ld +++ b/variants/HY_TinySTM103T/ldscript.ld @@ -60,7 +60,7 @@ _Min_Stack_Size = 0x400; /* required amount of stack */ /* Specify the memory areas */ MEMORY { -RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE +RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy