mirror of https://github.com/ARMmbed/mbed-os.git
STM32H7 linker script files alignment
parent
21ff11c3d3
commit
c7ca6f731c
|
@ -1,32 +1,17 @@
|
|||
#! armcc -E
|
||||
; Scatter-Loading Description File
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright (c) 2016, STMicroelectronics
|
||||
; All rights reserved.
|
||||
;
|
||||
; Redistribution and use in source and binary forms, with or without
|
||||
; modification, are permitted provided that the following conditions are met:
|
||||
;
|
||||
; 1. Redistributions of source code must retain the above copyright notice,
|
||||
; this list of conditions and the following disclaimer.
|
||||
; 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
; this list of conditions and the following disclaimer in the documentation
|
||||
; and/or other materials provided with the distribution.
|
||||
; 3. Neither the name of STMicroelectronics nor the names of its contributors
|
||||
; may be used to endorse or promote products derived from this software
|
||||
; without specific prior written permission.
|
||||
;
|
||||
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;******************************************************************************
|
||||
;* @attention
|
||||
;*
|
||||
;* Copyright (c) 2018-2019 STMicroelectronics.
|
||||
;* All rights reserved.
|
||||
;*
|
||||
;* 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
|
||||
;*
|
||||
;******************************************************************************
|
||||
|
||||
#if !defined(MBED_APP_START)
|
||||
#define MBED_APP_START 0x08000000
|
||||
|
|
|
@ -1,4 +1,17 @@
|
|||
/* Linker script to configure memory regions. */
|
||||
/*******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2018-2019 STMicroelectronics.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 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
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#if !defined(MBED_APP_START)
|
||||
#define MBED_APP_START 0x08000000
|
||||
|
|
|
@ -1,4 +1,17 @@
|
|||
// 2MB FLASH (0x200000)
|
||||
//******************************************************************************
|
||||
//* @attention
|
||||
//*
|
||||
//* Copyright (c) 2019 STMicroelectronics.
|
||||
//* All rights reserved.
|
||||
//*
|
||||
//* 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
|
||||
//*
|
||||
//******************************************************************************
|
||||
|
||||
// 1MB FLASH (0x100000)
|
||||
if (!isdefinedsymbol(MBED_APP_START)) { define symbol MBED_APP_START = 0x08000000; }
|
||||
if (!isdefinedsymbol(MBED_APP_SIZE)) { define symbol MBED_APP_SIZE = 0x200000; }
|
||||
if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) { define symbol MBED_BOOT_STACK_SIZE = 0x400; }
|
||||
|
@ -14,7 +27,7 @@ define symbol __NVIC_start__ = 0x20000000;
|
|||
define symbol __NVIC_end__ = 0x20000297;
|
||||
define symbol __region_CRASH_DATA_RAM_start__ = 0x20000298; // Aligned on 8 bytes
|
||||
define symbol __region_CRASH_DATA_RAM_end__ = 0x20000397;
|
||||
define symbol __region_RAM_start__ = 0x24000000; // Aligned on 8 bytes
|
||||
define symbol __region_RAM_start__ = 0x24000000;
|
||||
define symbol __region_RAM_end__ = 0x24000000 + 0x80000 - 1;
|
||||
|
||||
// Memory regions
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
;******************************************************************************
|
||||
;* @attention
|
||||
;*
|
||||
;* Copyright (c) 2019 STMicroelectronics.
|
||||
;* Copyright (c) 2018-2019 STMicroelectronics.
|
||||
;* All rights reserved.
|
||||
;*
|
||||
;* This software component is licensed by ST under BSD 3-Clause license,
|
||||
|
@ -27,12 +27,12 @@
|
|||
|
||||
#define Stack_Size MBED_BOOT_STACK_SIZE
|
||||
|
||||
#define MBED_RAM_START 0x20000000
|
||||
#define MBED_RAM_SIZE 0x20000
|
||||
#define MBED_VECTTABLE_RAM_START (MBED_RAM_START)
|
||||
#define MBED_RAM_START 0x24000000
|
||||
#define MBED_RAM_SIZE 0x80000
|
||||
#define MBED_VECTTABLE_RAM_START 0x20000000
|
||||
#define MBED_VECTTABLE_RAM_SIZE 0x298
|
||||
#define MBED_RAM0_START (MBED_VECTTABLE_RAM_START + MBED_VECTTABLE_RAM_SIZE)
|
||||
#define MBED_RAM0_SIZE (MBED_RAM_SIZE - MBED_VECTTABLE_RAM_SIZE)
|
||||
#define MBED_RAM0_START (MBED_RAM_START)
|
||||
#define MBED_RAM0_SIZE (MBED_RAM_SIZE)
|
||||
|
||||
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/*******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2019 STMicroelectronics.
|
||||
* Copyright (c) 2018-2019 STMicroelectronics.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
|
@ -29,8 +29,12 @@ STACK_SIZE = MBED_BOOT_STACK_SIZE;
|
|||
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
|
||||
RAM (rwx) : ORIGIN = 0x20000298, LENGTH = 128K - 0x298
|
||||
FLASH (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
|
||||
DTCMRAM (rwx) : ORIGIN = 0x20000298, LENGTH = 128K-0x298
|
||||
RAM (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
|
||||
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
|
||||
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
|
||||
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
|
||||
}
|
||||
|
||||
/* Linker script to place sections and symbol values. Should be used together
|
||||
|
|
|
@ -20,12 +20,12 @@ define symbol __intvec_start__ = MBED_APP_START;
|
|||
define symbol __region_ROM_start__ = MBED_APP_START;
|
||||
define symbol __region_ROM_end__ = MBED_APP_START + MBED_APP_SIZE - 1;
|
||||
|
||||
// 128KB DTCM RAM (0x20000)
|
||||
// 512KB RAM (0x80000)
|
||||
// Vector table dynamic copy: 166 vectors = 664 bytes (0x298) reserved
|
||||
define symbol __NVIC_start__ = 0x20000000;
|
||||
define symbol __NVIC_end__ = 0x20000297;
|
||||
define symbol __region_RAM_start__ = 0x20000298; // Aligned on 8 bytes
|
||||
define symbol __region_RAM_end__ = 0x20000000 + 0x20000 - 1;
|
||||
define symbol __region_RAM_start__ = 0x24000000;
|
||||
define symbol __region_RAM_end__ = 0x24000000 + 0x80000 - 1;
|
||||
|
||||
// 64KB ITCM RAM (0x10000)
|
||||
// ITCM not currently used, but could be used for critical code to improve performances
|
||||
|
|
Loading…
Reference in New Issue