Skip to content

Commit 6fc4073

Browse files
mkarrfpistm
andauthored
Fix flash offset on HY_TinySTM103T variant. (#1131)
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. Co-authored-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 17e8cda commit 6fc4073

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

variants/HY_TinySTM103T/ldscript.ld

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
*****************************************************************************
33
**
44

5-
** File : LinkerScript.ld
5+
** File : ldscript.ld
66
**
7-
** Abstract : Linker script for STM32F103CBTx Device with
8-
** 128KByte FLASH, 20KByte RAM
7+
** Abstract : Linker script for STM32F103C(8-B)Tx Device with
8+
** 32/64/128KByte FLASH, 10/20KByte RAM
99
**
1010
** Set heap size, stack size and stack location according
1111
** to application requirements.
@@ -52,16 +52,16 @@
5252
ENTRY(Reset_Handler)
5353

5454
/* Highest address of the user mode stack */
55-
_estack = 0x20005000; /* end of RAM */
55+
_estack = 0x20000000 + LD_MAX_DATA_SIZE; /* end of RAM */
5656
/* Generate a link error if heap and stack don't fit into RAM */
5757
_Min_Heap_Size = 0x200; /* required amount of heap */
5858
_Min_Stack_Size = 0x400; /* required amount of stack */
5959

6060
/* Specify the memory areas */
6161
MEMORY
6262
{
63-
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K
64-
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 128K
63+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE
64+
FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
6565
}
6666

6767
/* Define output sections */

0 commit comments

Comments
 (0)
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