Skip to content

Commit c7ca6f7

Browse files
committed
STM32H7 linker script files alignment
1 parent 21ff11c commit c7ca6f7

File tree

6 files changed

+56
-41
lines changed

6 files changed

+56
-41
lines changed

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H743xI/device/TOOLCHAIN_ARM_STD/stm32h743xI.sct

Lines changed: 12 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,17 @@
11
#! armcc -E
22
; Scatter-Loading Description File
3-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4-
; Copyright (c) 2016, STMicroelectronics
5-
; All rights reserved.
6-
;
7-
; Redistribution and use in source and binary forms, with or without
8-
; modification, are permitted provided that the following conditions are met:
9-
;
10-
; 1. Redistributions of source code must retain the above copyright notice,
11-
; this list of conditions and the following disclaimer.
12-
; 2. Redistributions in binary form must reproduce the above copyright notice,
13-
; this list of conditions and the following disclaimer in the documentation
14-
; and/or other materials provided with the distribution.
15-
; 3. Neither the name of STMicroelectronics nor the names of its contributors
16-
; may be used to endorse or promote products derived from this software
17-
; without specific prior written permission.
18-
;
19-
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20-
; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21-
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22-
; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23-
; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24-
; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25-
; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26-
; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27-
; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28-
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3+
;******************************************************************************
4+
;* @attention
5+
;*
6+
;* Copyright (c) 2018-2019 STMicroelectronics.
7+
;* All rights reserved.
8+
;*
9+
;* This software component is licensed by ST under BSD 3-Clause license,
10+
;* the "License"; You may not use this file except in compliance with the
11+
;* License. You may obtain a copy of the License at:
12+
;* opensource.org/licenses/BSD-3-Clause
13+
;*
14+
;******************************************************************************
3015

3116
#if !defined(MBED_APP_START)
3217
#define MBED_APP_START 0x08000000

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H743xI/device/TOOLCHAIN_GCC_ARM/STM32H743xI.ld

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
/* Linker script to configure memory regions. */
2+
/*******************************************************************************
3+
* @attention
4+
*
5+
* Copyright (c) 2018-2019 STMicroelectronics.
6+
* All rights reserved.
7+
*
8+
* This software component is licensed by ST under BSD 3-Clause license,
9+
* the "License"; You may not use this file except in compliance with the
10+
* License. You may obtain a copy of the License at:
11+
* opensource.org/licenses/BSD-3-Clause
12+
*
13+
******************************************************************************
14+
*/
215

316
#if !defined(MBED_APP_START)
417
#define MBED_APP_START 0x08000000

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H743xI/device/TOOLCHAIN_IAR/stm32h743xI.icf

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
1-
// 2MB FLASH (0x200000)
1+
//******************************************************************************
2+
//* @attention
3+
//*
4+
//* Copyright (c) 2019 STMicroelectronics.
5+
//* All rights reserved.
6+
//*
7+
//* This software component is licensed by ST under BSD 3-Clause license,
8+
//* the "License"; You may not use this file except in compliance with the
9+
//* License. You may obtain a copy of the License at:
10+
//* opensource.org/licenses/BSD-3-Clause
11+
//*
12+
//******************************************************************************
13+
14+
// 1MB FLASH (0x100000)
215
if (!isdefinedsymbol(MBED_APP_START)) { define symbol MBED_APP_START = 0x08000000; }
316
if (!isdefinedsymbol(MBED_APP_SIZE)) { define symbol MBED_APP_SIZE = 0x200000; }
417
if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) { define symbol MBED_BOOT_STACK_SIZE = 0x400; }
@@ -14,7 +27,7 @@ define symbol __NVIC_start__ = 0x20000000;
1427
define symbol __NVIC_end__ = 0x20000297;
1528
define symbol __region_CRASH_DATA_RAM_start__ = 0x20000298; // Aligned on 8 bytes
1629
define symbol __region_CRASH_DATA_RAM_end__ = 0x20000397;
17-
define symbol __region_RAM_start__ = 0x24000000; // Aligned on 8 bytes
30+
define symbol __region_RAM_start__ = 0x24000000;
1831
define symbol __region_RAM_end__ = 0x24000000 + 0x80000 - 1;
1932

2033
// Memory regions

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_DISCO_H747I_CM7/TOOLCHAIN_ARM_STD/stm32h747xI.sct

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
;******************************************************************************
44
;* @attention
55
;*
6-
;* Copyright (c) 2019 STMicroelectronics.
6+
;* Copyright (c) 2018-2019 STMicroelectronics.
77
;* All rights reserved.
88
;*
99
;* This software component is licensed by ST under BSD 3-Clause license,
@@ -27,12 +27,12 @@
2727

2828
#define Stack_Size MBED_BOOT_STACK_SIZE
2929

30-
#define MBED_RAM_START 0x20000000
31-
#define MBED_RAM_SIZE 0x20000
32-
#define MBED_VECTTABLE_RAM_START (MBED_RAM_START)
30+
#define MBED_RAM_START 0x24000000
31+
#define MBED_RAM_SIZE 0x80000
32+
#define MBED_VECTTABLE_RAM_START 0x20000000
3333
#define MBED_VECTTABLE_RAM_SIZE 0x298
34-
#define MBED_RAM0_START (MBED_VECTTABLE_RAM_START + MBED_VECTTABLE_RAM_SIZE)
35-
#define MBED_RAM0_SIZE (MBED_RAM_SIZE - MBED_VECTTABLE_RAM_SIZE)
34+
#define MBED_RAM0_START (MBED_RAM_START)
35+
#define MBED_RAM0_SIZE (MBED_RAM_SIZE)
3636

3737
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
3838

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_DISCO_H747I_CM7/TOOLCHAIN_GCC_ARM/STM32H747xI.ld

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*******************************************************************************
33
* @attention
44
*
5-
* Copyright (c) 2019 STMicroelectronics.
5+
* Copyright (c) 2018-2019 STMicroelectronics.
66
* All rights reserved.
77
*
88
* This software component is licensed by ST under BSD 3-Clause license,
@@ -29,8 +29,12 @@ STACK_SIZE = MBED_BOOT_STACK_SIZE;
2929

3030
MEMORY
3131
{
32-
FLASH (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
33-
RAM (rwx) : ORIGIN = 0x20000298, LENGTH = 128K - 0x298
32+
FLASH (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
33+
DTCMRAM (rwx) : ORIGIN = 0x20000298, LENGTH = 128K-0x298
34+
RAM (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
35+
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
36+
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
37+
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
3438
}
3539

3640
/* Linker script to place sections and symbol values. Should be used together

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_DISCO_H747I_CM7/TOOLCHAIN_IAR/stm32h747xI.icf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ define symbol __intvec_start__ = MBED_APP_START;
2020
define symbol __region_ROM_start__ = MBED_APP_START;
2121
define symbol __region_ROM_end__ = MBED_APP_START + MBED_APP_SIZE - 1;
2222

23-
// 128KB DTCM RAM (0x20000)
23+
// 512KB RAM (0x80000)
2424
// Vector table dynamic copy: 166 vectors = 664 bytes (0x298) reserved
2525
define symbol __NVIC_start__ = 0x20000000;
2626
define symbol __NVIC_end__ = 0x20000297;
27-
define symbol __region_RAM_start__ = 0x20000298; // Aligned on 8 bytes
28-
define symbol __region_RAM_end__ = 0x20000000 + 0x20000 - 1;
27+
define symbol __region_RAM_start__ = 0x24000000;
28+
define symbol __region_RAM_end__ = 0x24000000 + 0x80000 - 1;
2929

3030
// 64KB ITCM RAM (0x10000)
3131
// ITCM not currently used, but could be used for critical code to improve performances

0 commit comments

Comments
 (0)