Skip to content

Commit

Permalink
corrected ld scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
dzid26 committed Aug 15, 2023
1 parent 5540407 commit 93a7c04
Showing 1 changed file with 44 additions and 33 deletions.
77 changes: 44 additions & 33 deletions firmware/src/APP/STM32F103C8_DEFAULT.ld
Original file line number Diff line number Diff line change
@@ -1,34 +1,43 @@
/**
******************************************************************************
* @file LinkerScript.ld
* @author Auto-generated by STM32CubeIDE
* @brief Linker script for STM32F030C6Tx Device from STM32F0 series
* 32Kbytes FLASH
* 4Kbytes RAM
*
* Set heap size, stack size and stack location according
* to application requirements.
*
* Set memory bank area and size if external memory is used
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/
/*
******************************************************************************
**
** @file : LinkerScript.ld
**
** @author : Auto-generated by STM32CubeIDE
**
** @brief : Linker script for STM32F103C8Tx Device from STM32F1 series
** 64Kbytes FLASH
** 20Kbytes RAM
**
** Set heap size, stack size and stack location according
** to application requirements.
**
** Set memory bank area and size if external memory is used
**
** Target : STMicroelectronics STM32
**
** Distribution: The file is distributed as is, without any warranty
** of any kind.
**
******************************************************************************
** @attention
**
** <h2><center>&copy; Copyright (c) 2021 STMicroelectronics.
** All rights reserved.</center></h2>
**
** This software component is licensed by ST under BSD 3-Clause license,
** the "License"; You may not use this file except in compliance with the
** License. You may obtain a copy of the License at:
** opensource.org/licenses/BSD-3-Clause
**
******************************************************************************
*/

/* Entry Point */
ENTRY(Reset_Handler)

/* Highest address of the user mode stack */
_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */

_Min_Heap_Size = 0x0; /* required amount of heap */
_Min_Stack_Size = 0x800; /* required amount of stack */
Expand Down Expand Up @@ -77,12 +86,12 @@ SECTIONS
. = ALIGN(4);
} >FLASH

.ARM.extab : {
.ARM.extab : {
. = ALIGN(4);
*(.ARM.extab* .gnu.linkonce.armextab.*)
. = ALIGN(4);
} >FLASH

.ARM : {
. = ALIGN(4);
__exidx_start = .;
Expand All @@ -99,7 +108,7 @@ SECTIONS
PROVIDE_HIDDEN (__preinit_array_end = .);
. = ALIGN(4);
} >FLASH

.init_array :
{
. = ALIGN(4);
Expand All @@ -109,7 +118,7 @@ SECTIONS
PROVIDE_HIDDEN (__init_array_end = .);
. = ALIGN(4);
} >FLASH

.fini_array :
{
. = ALIGN(4);
Expand All @@ -124,16 +133,18 @@ SECTIONS
_sidata = LOADADDR(.data);

/* Initialized data sections into "RAM" Ram type memory */
.data :
.data :
{
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */
*(.RamFunc) /* .RamFunc sections */
*(.RamFunc*) /* .RamFunc* sections */

. = ALIGN(4);
_edata = .; /* define a global symbol at data end */

} >RAM AT> FLASH

/* Uninitialized data section into "RAM" Ram type memory */
Expand Down Expand Up @@ -172,4 +183,4 @@ SECTIONS
}

.ARM.attributes 0 : { *(.ARM.attributes) }
}
}

0 comments on commit 93a7c04

Please sign in to comment.