mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-06-20 06:58:39 +03:00
Initial commit
This commit is contained in:
130
external/CMSIS_5/Device/ARM/ARMCM85/Source/ARM/ARMCM85_ac6.sct
vendored
Normal file
130
external/CMSIS_5/Device/ARM/ARMCM85/Source/ARM/ARMCM85_ac6.sct
vendored
Normal file
@ -0,0 +1,130 @@
|
||||
#! armclang -E --target=arm-arm-none-eabi -mcpu=cortex-m85 -xc
|
||||
; command above MUST be in first line (no comment above!)
|
||||
|
||||
;Note: Add '-mcmse' to first line if your software model is "Secure Mode".
|
||||
; #! armclang -E --target=arm-arm-none-eabi -mcpu=cortex-m85 -xc -mcmse
|
||||
|
||||
|
||||
/*
|
||||
;-------- <<< Use Configuration Wizard in Context Menu >>> -------------------
|
||||
*/
|
||||
|
||||
/*--------------------- Flash Configuration ----------------------------------
|
||||
; <h> Flash Configuration
|
||||
; <o0> Flash Base Address <0x0-0xFFFFFFFF:8>
|
||||
; <o1> Flash Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||
; </h>
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define __ROM_BASE 0x00000000
|
||||
#define __ROM_SIZE 0x00080000
|
||||
|
||||
/*--------------------- Embedded RAM Configuration ---------------------------
|
||||
; <h> RAM Configuration
|
||||
; <o0> RAM Base Address <0x0-0xFFFFFFFF:8>
|
||||
; <o1> RAM Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||
; </h>
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define __RAM_BASE 0x20000000
|
||||
#define __RAM_SIZE 0x00040000
|
||||
|
||||
/*--------------------- Stack / Heap Configuration ---------------------------
|
||||
; <h> Stack / Heap Configuration
|
||||
; <o0> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||
; <o1> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||
; </h>
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define __STACK_SIZE 0x00000400
|
||||
#define __HEAP_SIZE 0x00000C00
|
||||
|
||||
/*--------------------- CMSE Veneer Configuration ---------------------------
|
||||
; <h> CMSE Veneer Configuration
|
||||
; <o0> CMSE VeneerBase Address <0x0-0xFFFFFFFF:8>
|
||||
; <i> 0xFFFFFFFF: Place Veneers at the end of Flash (default)
|
||||
; <o1> CMSE Veneer Size (in Bytes) <0x0-0xFFFFFFFF:32>
|
||||
; </h>
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define __CMSEVENEER_BASE 0xFFFFFFFF
|
||||
#define __CMSEVENEER_SIZE 0x00000400
|
||||
|
||||
/*
|
||||
;------------- <<< end of configuration section >>> ---------------------------
|
||||
*/
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
User Stack & Heap boundary definition
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define __STACK_TOP (__RAM_BASE + __RAM_SIZE - __STACKSEAL_SIZE) /* starts at end of RAM - 8 byte stack seal */
|
||||
#define __HEAP_BASE (AlignExpr(+0, 8)) /* starts after RW_RAM section, 8 byte aligned */
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
Stack seal size definition
|
||||
*----------------------------------------------------------------------------*/
|
||||
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||
#define __STACKSEAL_SIZE ( 8 )
|
||||
#else
|
||||
#define __STACKSEAL_SIZE ( 0 )
|
||||
#endif
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Region base & size definition
|
||||
*----------------------------------------------------------------------------*/
|
||||
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||
#if defined (__CMSEVENEER_BASE) && (__CMSEVENEER_BASE == 0xFFFFFFFF)
|
||||
#define __CV_BASE ( __ROM_BASE + __ROM_SIZE - __CMSEVENEER_SIZE )
|
||||
#else
|
||||
#define __CV_BASE ( __CMSEVENEER_BASE )
|
||||
#endif
|
||||
#define __CV_SIZE ( __CMSEVENEER_SIZE )
|
||||
#else
|
||||
#define __CV_SIZE ( 0 )
|
||||
#endif
|
||||
|
||||
#define __RO_BASE ( __ROM_BASE )
|
||||
#define __RO_SIZE ( __ROM_SIZE - __CV_SIZE )
|
||||
|
||||
#define __RW_BASE ( __RAM_BASE )
|
||||
#define __RW_SIZE (__RAM_SIZE - __STACK_SIZE - __HEAP_SIZE - __STACKSEAL_SIZE )
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Scatter Region definition
|
||||
*----------------------------------------------------------------------------*/
|
||||
LR_ROM __RO_BASE __RO_SIZE { ; load region size_region
|
||||
ER_ROM __RO_BASE __RO_SIZE { ; load address = execution address
|
||||
*.o (RESET, +First)
|
||||
*(InRoot$$Sections)
|
||||
.ANY (+RO)
|
||||
.ANY (+XO)
|
||||
}
|
||||
|
||||
RW_NOINIT __RW_BASE UNINIT __RW_SIZE {
|
||||
*(.bss.noinit)
|
||||
}
|
||||
|
||||
RW_RAM AlignExpr(+0, 8) (__RW_SIZE - AlignExpr(ImageLength(RW_NOINIT), 8)) {
|
||||
*(+RW +ZI)
|
||||
}
|
||||
|
||||
#if __HEAP_SIZE > 0
|
||||
ARM_LIB_HEAP __HEAP_BASE EMPTY __HEAP_SIZE { ; Reserve empty region for heap
|
||||
}
|
||||
#endif
|
||||
|
||||
ARM_LIB_STACK __STACK_TOP EMPTY -__STACK_SIZE { ; Reserve empty region for stack
|
||||
}
|
||||
|
||||
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||
STACKSEAL +0 EMPTY __STACKSEAL_SIZE { ; Reserve empty region for stack seal immediately after stack
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||
LR_CMSE_VENEER __CV_BASE ALIGN 32 __CV_SIZE { ; own load/execution region for CMSE Veneers
|
||||
ER_CMSE_VENEER __CV_BASE __CV_SIZE {
|
||||
*(Veneer$$CMSE)
|
||||
}
|
||||
}
|
||||
#endif
|
130
external/CMSIS_5/Device/ARM/ARMCM85/Source/ARM/ARMCM85_ac6_s.sct
vendored
Normal file
130
external/CMSIS_5/Device/ARM/ARMCM85/Source/ARM/ARMCM85_ac6_s.sct
vendored
Normal file
@ -0,0 +1,130 @@
|
||||
#! armclang -E --target=arm-arm-none-eabi -mcpu=cortex-m85 -xc -mcmse
|
||||
; command above MUST be in first line (no comment above!)
|
||||
|
||||
;Note: Add '-mcmse' to first line if your software model is "Secure Mode".
|
||||
; #! armclang -E --target=arm-arm-none-eabi -mcpu=cortex-m85 -xc -mcmse
|
||||
|
||||
|
||||
/*
|
||||
;-------- <<< Use Configuration Wizard in Context Menu >>> -------------------
|
||||
*/
|
||||
|
||||
/*--------------------- Flash Configuration ----------------------------------
|
||||
; <h> Flash Configuration
|
||||
; <o0> Flash Base Address <0x0-0xFFFFFFFF:8>
|
||||
; <o1> Flash Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||
; </h>
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define __ROM_BASE 0x00000000
|
||||
#define __ROM_SIZE 0x00080000
|
||||
|
||||
/*--------------------- Embedded RAM Configuration ---------------------------
|
||||
; <h> RAM Configuration
|
||||
; <o0> RAM Base Address <0x0-0xFFFFFFFF:8>
|
||||
; <o1> RAM Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||
; </h>
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define __RAM_BASE 0x20000000
|
||||
#define __RAM_SIZE 0x00040000
|
||||
|
||||
/*--------------------- Stack / Heap Configuration ---------------------------
|
||||
; <h> Stack / Heap Configuration
|
||||
; <o0> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||
; <o1> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||
; </h>
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define __STACK_SIZE 0x00000400
|
||||
#define __HEAP_SIZE 0x00000C00
|
||||
|
||||
/*--------------------- CMSE Veneer Configuration ---------------------------
|
||||
; <h> CMSE Veneer Configuration
|
||||
; <o0> CMSE VeneerBase Address <0x0-0xFFFFFFFF:8>
|
||||
; <i> 0xFFFFFFFF: Place Veneers at the end of Flash (default)
|
||||
; <o1> CMSE Veneer Size (in Bytes) <0x0-0xFFFFFFFF:32>
|
||||
; </h>
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define __CMSEVENEER_BASE 0xFFFFFFFF
|
||||
#define __CMSEVENEER_SIZE 0x00000400
|
||||
|
||||
/*
|
||||
;------------- <<< end of configuration section >>> ---------------------------
|
||||
*/
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
User Stack & Heap boundary definition
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define __STACK_TOP (__RAM_BASE + __RAM_SIZE - __STACKSEAL_SIZE) /* starts at end of RAM - 8 byte stack seal */
|
||||
#define __HEAP_BASE (AlignExpr(+0, 8)) /* starts after RW_RAM section, 8 byte aligned */
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
Stack seal size definition
|
||||
*----------------------------------------------------------------------------*/
|
||||
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||
#define __STACKSEAL_SIZE ( 8 )
|
||||
#else
|
||||
#define __STACKSEAL_SIZE ( 0 )
|
||||
#endif
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Region base & size definition
|
||||
*----------------------------------------------------------------------------*/
|
||||
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||
#if defined (__CMSEVENEER_BASE) && (__CMSEVENEER_BASE == 0xFFFFFFFF)
|
||||
#define __CV_BASE ( __ROM_BASE + __ROM_SIZE - __CMSEVENEER_SIZE )
|
||||
#else
|
||||
#define __CV_BASE ( __CMSEVENEER_BASE )
|
||||
#endif
|
||||
#define __CV_SIZE ( __CMSEVENEER_SIZE )
|
||||
#else
|
||||
#define __CV_SIZE ( 0 )
|
||||
#endif
|
||||
|
||||
#define __RO_BASE ( __ROM_BASE )
|
||||
#define __RO_SIZE ( __ROM_SIZE - __CV_SIZE )
|
||||
|
||||
#define __RW_BASE ( __RAM_BASE )
|
||||
#define __RW_SIZE (__RAM_SIZE - __STACK_SIZE - __HEAP_SIZE - __STACKSEAL_SIZE )
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Scatter Region definition
|
||||
*----------------------------------------------------------------------------*/
|
||||
LR_ROM __RO_BASE __RO_SIZE { ; load region size_region
|
||||
ER_ROM __RO_BASE __RO_SIZE { ; load address = execution address
|
||||
*.o (RESET, +First)
|
||||
*(InRoot$$Sections)
|
||||
.ANY (+RO)
|
||||
.ANY (+XO)
|
||||
}
|
||||
|
||||
RW_NOINIT __RW_BASE UNINIT __RW_SIZE {
|
||||
*(.bss.noinit)
|
||||
}
|
||||
|
||||
RW_RAM AlignExpr(+0, 8) (__RW_SIZE - AlignExpr(ImageLength(RW_NOINIT), 8)) {
|
||||
*(+RW +ZI)
|
||||
}
|
||||
|
||||
#if __HEAP_SIZE > 0
|
||||
ARM_LIB_HEAP __HEAP_BASE EMPTY __HEAP_SIZE { ; Reserve empty region for heap
|
||||
}
|
||||
#endif
|
||||
|
||||
ARM_LIB_STACK __STACK_TOP EMPTY -__STACK_SIZE { ; Reserve empty region for stack
|
||||
}
|
||||
|
||||
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||
STACKSEAL +0 EMPTY __STACKSEAL_SIZE { ; Reserve empty region for stack seal immediately after stack
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||
LR_CMSE_VENEER __CV_BASE ALIGN 32 __CV_SIZE { ; own load/execution region for CMSE Veneers
|
||||
ER_CMSE_VENEER __CV_BASE __CV_SIZE {
|
||||
*(Veneer$$CMSE)
|
||||
}
|
||||
}
|
||||
#endif
|
314
external/CMSIS_5/Device/ARM/ARMCM85/Source/GCC/gcc_arm.ld
vendored
Normal file
314
external/CMSIS_5/Device/ARM/ARMCM85/Source/GCC/gcc_arm.ld
vendored
Normal file
@ -0,0 +1,314 @@
|
||||
/******************************************************************************
|
||||
* @file gcc_arm.ld
|
||||
* @brief GNU Linker Script for Cortex-M based device
|
||||
******************************************************************************/
|
||||
/*
|
||||
* Copyright (c) 2022 Arm Limited. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
*-------- <<< Use Configuration Wizard in Context Menu >>> -------------------
|
||||
*/
|
||||
|
||||
/*---------------------- Flash Configuration ----------------------------------
|
||||
<h> Flash Configuration
|
||||
<o0> Flash Base Address <0x0-0xFFFFFFFF:8>
|
||||
<o1> Flash Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||
</h>
|
||||
-----------------------------------------------------------------------------*/
|
||||
__ROM_BASE = 0x00000000;
|
||||
__ROM_SIZE = 0x00040000;
|
||||
|
||||
/*--------------------- Embedded RAM Configuration ----------------------------
|
||||
<h> RAM Configuration
|
||||
<o0> RAM Base Address <0x0-0xFFFFFFFF:8>
|
||||
<o1> RAM Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||
</h>
|
||||
-----------------------------------------------------------------------------*/
|
||||
__RAM_BASE = 0x20000000;
|
||||
__RAM_SIZE = 0x00020000;
|
||||
|
||||
/*--------------------- Stack / Heap Configuration ----------------------------
|
||||
<h> Stack / Heap Configuration
|
||||
<o0> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||
<o1> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||
</h>
|
||||
-----------------------------------------------------------------------------*/
|
||||
__STACK_SIZE = 0x00000400;
|
||||
__HEAP_SIZE = 0x00000C00;
|
||||
|
||||
/*
|
||||
*-------------------- <<< end of configuration section >>> -------------------
|
||||
*/
|
||||
|
||||
/* ARMv8-M stack sealing:
|
||||
to use ARMv8-M stack sealing set __STACKSEAL_SIZE to 8 otherwise keep 0
|
||||
*/
|
||||
__STACKSEAL_SIZE = 0;
|
||||
|
||||
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = __ROM_BASE, LENGTH = __ROM_SIZE
|
||||
RAM (rwx) : ORIGIN = __RAM_BASE, LENGTH = __RAM_SIZE
|
||||
}
|
||||
|
||||
/* Linker script to place sections and symbol values. Should be used together
|
||||
* with other linker script that defines memory regions FLASH and RAM.
|
||||
* It references following symbols, which must be defined in code:
|
||||
* Reset_Handler : Entry of reset handler
|
||||
*
|
||||
* It defines following symbols, which code can use without definition:
|
||||
* __exidx_start
|
||||
* __exidx_end
|
||||
* __copy_table_start__
|
||||
* __copy_table_end__
|
||||
* __zero_table_start__
|
||||
* __zero_table_end__
|
||||
* __etext
|
||||
* __data_start__
|
||||
* __preinit_array_start
|
||||
* __preinit_array_end
|
||||
* __init_array_start
|
||||
* __init_array_end
|
||||
* __fini_array_start
|
||||
* __fini_array_end
|
||||
* __data_end__
|
||||
* __bss_start__
|
||||
* __bss_end__
|
||||
* __end__
|
||||
* end
|
||||
* __HeapLimit
|
||||
* __StackLimit
|
||||
* __StackTop
|
||||
* __stack
|
||||
* __StackSeal (only if ARMv8-M stack sealing is used)
|
||||
*/
|
||||
ENTRY(Reset_Handler)
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.text :
|
||||
{
|
||||
KEEP(*(.vectors))
|
||||
*(.text*)
|
||||
|
||||
KEEP(*(.init))
|
||||
KEEP(*(.fini))
|
||||
|
||||
/* .ctors */
|
||||
*crtbegin.o(.ctors)
|
||||
*crtbegin?.o(.ctors)
|
||||
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
|
||||
*(SORT(.ctors.*))
|
||||
*(.ctors)
|
||||
|
||||
/* .dtors */
|
||||
*crtbegin.o(.dtors)
|
||||
*crtbegin?.o(.dtors)
|
||||
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
|
||||
*(SORT(.dtors.*))
|
||||
*(.dtors)
|
||||
|
||||
*(.rodata*)
|
||||
|
||||
KEEP(*(.eh_frame*))
|
||||
} > FLASH
|
||||
|
||||
/*
|
||||
* SG veneers:
|
||||
* All SG veneers are placed in the special output section .gnu.sgstubs. Its start address
|
||||
* must be set, either with the command line option <20>--section-start<72> or in a linker script,
|
||||
* to indicate where to place these veneers in memory.
|
||||
*/
|
||||
/*
|
||||
.gnu.sgstubs :
|
||||
{
|
||||
. = ALIGN(32);
|
||||
} > FLASH
|
||||
*/
|
||||
.ARM.extab :
|
||||
{
|
||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||
} > FLASH
|
||||
|
||||
__exidx_start = .;
|
||||
.ARM.exidx :
|
||||
{
|
||||
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
||||
} > FLASH
|
||||
__exidx_end = .;
|
||||
|
||||
.copy.table :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__copy_table_start__ = .;
|
||||
|
||||
LONG (__etext)
|
||||
LONG (__data_start__)
|
||||
LONG ((__data_end__ - __data_start__) / 4)
|
||||
|
||||
/* Add each additional data section here */
|
||||
/*
|
||||
LONG (__etext2)
|
||||
LONG (__data2_start__)
|
||||
LONG ((__data2_end__ - __data2_start__) / 4)
|
||||
*/
|
||||
__copy_table_end__ = .;
|
||||
} > FLASH
|
||||
|
||||
.zero.table :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__zero_table_start__ = .;
|
||||
/* Add each additional bss section here */
|
||||
/*
|
||||
LONG (__bss2_start__)
|
||||
LONG ((__bss2_end__ - __bss2_start__) / 4)
|
||||
*/
|
||||
__zero_table_end__ = .;
|
||||
} > FLASH
|
||||
|
||||
/**
|
||||
* Location counter can end up 2byte aligned with narrow Thumb code but
|
||||
* __etext is assumed by startup code to be the LMA of a section in RAM
|
||||
* which must be 4byte aligned
|
||||
*/
|
||||
__etext = ALIGN (4);
|
||||
|
||||
.data : AT (__etext)
|
||||
{
|
||||
__data_start__ = .;
|
||||
*(vtable)
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
|
||||
. = ALIGN(4);
|
||||
/* preinit data */
|
||||
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||
KEEP(*(.preinit_array))
|
||||
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||
|
||||
. = ALIGN(4);
|
||||
/* init data */
|
||||
PROVIDE_HIDDEN (__init_array_start = .);
|
||||
KEEP(*(SORT(.init_array.*)))
|
||||
KEEP(*(.init_array))
|
||||
PROVIDE_HIDDEN (__init_array_end = .);
|
||||
|
||||
. = ALIGN(4);
|
||||
/* finit data */
|
||||
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||
KEEP(*(SORT(.fini_array.*)))
|
||||
KEEP(*(.fini_array))
|
||||
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||
|
||||
KEEP(*(.jcr*))
|
||||
. = ALIGN(4);
|
||||
/* All data end */
|
||||
__data_end__ = .;
|
||||
|
||||
} > RAM
|
||||
|
||||
/*
|
||||
* Secondary data section, optional
|
||||
*
|
||||
* Remember to add each additional data section
|
||||
* to the .copy.table above to asure proper
|
||||
* initialization during startup.
|
||||
*/
|
||||
/*
|
||||
__etext2 = ALIGN (4);
|
||||
|
||||
.data2 : AT (__etext2)
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__data2_start__ = .;
|
||||
*(.data2)
|
||||
*(.data2.*)
|
||||
. = ALIGN(4);
|
||||
__data2_end__ = .;
|
||||
|
||||
} > RAM2
|
||||
*/
|
||||
|
||||
.bss :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__bss_start__ = .;
|
||||
*(.bss)
|
||||
*(.bss.*)
|
||||
*(COMMON)
|
||||
. = ALIGN(4);
|
||||
__bss_end__ = .;
|
||||
} > RAM AT > RAM
|
||||
|
||||
/*
|
||||
* Secondary bss section, optional
|
||||
*
|
||||
* Remember to add each additional bss section
|
||||
* to the .zero.table above to asure proper
|
||||
* initialization during startup.
|
||||
*/
|
||||
/*
|
||||
.bss2 :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__bss2_start__ = .;
|
||||
*(.bss2)
|
||||
*(.bss2.*)
|
||||
. = ALIGN(4);
|
||||
__bss2_end__ = .;
|
||||
} > RAM2 AT > RAM2
|
||||
*/
|
||||
|
||||
.heap (COPY) :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
__end__ = .;
|
||||
PROVIDE(end = .);
|
||||
. = . + __HEAP_SIZE;
|
||||
. = ALIGN(8);
|
||||
__HeapLimit = .;
|
||||
} > RAM
|
||||
|
||||
.stack (ORIGIN(RAM) + LENGTH(RAM) - __STACK_SIZE - __STACKSEAL_SIZE) (COPY) :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
__StackLimit = .;
|
||||
. = . + __STACK_SIZE;
|
||||
. = ALIGN(8);
|
||||
__StackTop = .;
|
||||
} > RAM
|
||||
PROVIDE(__stack = __StackTop);
|
||||
|
||||
/* ARMv8-M stack sealing:
|
||||
to use ARMv8-M stack sealing uncomment '.stackseal' section
|
||||
*/
|
||||
/*
|
||||
.stackseal (ORIGIN(RAM) + LENGTH(RAM) - __STACKSEAL_SIZE) (COPY) :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
__StackSeal = .;
|
||||
. = . + 8;
|
||||
. = ALIGN(8);
|
||||
} > RAM
|
||||
*/
|
||||
|
||||
/* Check if data + heap + stack exceeds RAM limit */
|
||||
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
|
||||
}
|
164
external/CMSIS_5/Device/ARM/ARMCM85/Source/startup_ARMCM85.c
vendored
Normal file
164
external/CMSIS_5/Device/ARM/ARMCM85/Source/startup_ARMCM85.c
vendored
Normal file
@ -0,0 +1,164 @@
|
||||
/******************************************************************************
|
||||
* @file startup_ARMCM85.c
|
||||
* @brief CMSIS Device Startup File for ARMCM85 Device
|
||||
* @version V1.0.0
|
||||
* @date 07. February 2022
|
||||
******************************************************************************/
|
||||
/*
|
||||
* Copyright (c) 2022 Arm Limited. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined (ARMCM85)
|
||||
#include "ARMCM85.h"
|
||||
#else
|
||||
#error device not specified!
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
External References
|
||||
*----------------------------------------------------------------------------*/
|
||||
extern uint32_t __INITIAL_SP;
|
||||
extern uint32_t __STACK_LIMIT;
|
||||
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||
extern uint32_t __STACK_SEAL;
|
||||
#endif
|
||||
|
||||
extern __NO_RETURN void __PROGRAM_START(void);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Internal References
|
||||
*----------------------------------------------------------------------------*/
|
||||
__NO_RETURN void Reset_Handler (void);
|
||||
void Default_Handler(void);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Exception / Interrupt Handler
|
||||
*----------------------------------------------------------------------------*/
|
||||
/* Exceptions */
|
||||
void NMI_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
void HardFault_Handler (void) __attribute__ ((weak));
|
||||
void MemManage_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
void BusFault_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
void UsageFault_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
void SecureFault_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
void SVC_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
void DebugMon_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
void PendSV_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
void SysTick_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
|
||||
void Interrupt0_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
void Interrupt1_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
void Interrupt2_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
void Interrupt3_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
void Interrupt4_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
void Interrupt5_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
void Interrupt6_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
void Interrupt7_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
void Interrupt8_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
void Interrupt9_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Exception / Interrupt Vector table
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#if defined ( __GNUC__ )
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wpedantic"
|
||||
#endif
|
||||
|
||||
extern const VECTOR_TABLE_Type __VECTOR_TABLE[496];
|
||||
const VECTOR_TABLE_Type __VECTOR_TABLE[496] __VECTOR_TABLE_ATTRIBUTE = {
|
||||
(VECTOR_TABLE_Type)(&__INITIAL_SP), /* Initial Stack Pointer */
|
||||
Reset_Handler, /* Reset Handler */
|
||||
NMI_Handler, /* -14 NMI Handler */
|
||||
HardFault_Handler, /* -13 Hard Fault Handler */
|
||||
MemManage_Handler, /* -12 MPU Fault Handler */
|
||||
BusFault_Handler, /* -11 Bus Fault Handler */
|
||||
UsageFault_Handler, /* -10 Usage Fault Handler */
|
||||
SecureFault_Handler, /* -9 Secure Fault Handler */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
SVC_Handler, /* -5 SVC Handler */
|
||||
DebugMon_Handler, /* -4 Debug Monitor Handler */
|
||||
0, /* Reserved */
|
||||
PendSV_Handler, /* -2 PendSV Handler */
|
||||
SysTick_Handler, /* -1 SysTick Handler */
|
||||
|
||||
/* Interrupts */
|
||||
Interrupt0_Handler, /* 0 Interrupt 0 */
|
||||
Interrupt1_Handler, /* 1 Interrupt 1 */
|
||||
Interrupt2_Handler, /* 2 Interrupt 2 */
|
||||
Interrupt3_Handler, /* 3 Interrupt 3 */
|
||||
Interrupt4_Handler, /* 4 Interrupt 4 */
|
||||
Interrupt5_Handler, /* 5 Interrupt 5 */
|
||||
Interrupt6_Handler, /* 6 Interrupt 6 */
|
||||
Interrupt7_Handler, /* 7 Interrupt 7 */
|
||||
Interrupt8_Handler, /* 8 Interrupt 8 */
|
||||
Interrupt9_Handler /* 9 Interrupt 9 */
|
||||
/* Interrupts 10 .. 480 are left out */
|
||||
};
|
||||
|
||||
#if defined ( __GNUC__ )
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Reset Handler called on controller reset
|
||||
*----------------------------------------------------------------------------*/
|
||||
__NO_RETURN void Reset_Handler(void)
|
||||
{
|
||||
__set_PSP((uint32_t)(&__INITIAL_SP));
|
||||
|
||||
__set_MSPLIM((uint32_t)(&__STACK_LIMIT));
|
||||
__set_PSPLIM((uint32_t)(&__STACK_LIMIT));
|
||||
|
||||
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||
__TZ_set_STACKSEAL_S((uint32_t *)(&__STACK_SEAL));
|
||||
#endif
|
||||
|
||||
SystemInit(); /* CMSIS System Initialization */
|
||||
__PROGRAM_START(); /* Enter PreMain (C library entry point) */
|
||||
}
|
||||
|
||||
|
||||
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wmissing-noreturn"
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Hard Fault Handler
|
||||
*----------------------------------------------------------------------------*/
|
||||
void HardFault_Handler(void)
|
||||
{
|
||||
while(1);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Default Handler for Exceptions / Interrupts
|
||||
*----------------------------------------------------------------------------*/
|
||||
void Default_Handler(void)
|
||||
{
|
||||
while(1);
|
||||
}
|
||||
|
||||
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
106
external/CMSIS_5/Device/ARM/ARMCM85/Source/system_ARMCM85.c
vendored
Normal file
106
external/CMSIS_5/Device/ARM/ARMCM85/Source/system_ARMCM85.c
vendored
Normal file
@ -0,0 +1,106 @@
|
||||
/**************************************************************************//**
|
||||
* @file system_ARMCM85.c
|
||||
* @brief CMSIS Device System Source File for ARMCM85 Device
|
||||
* @version V1.0.0
|
||||
* @date 30. March 2022
|
||||
******************************************************************************/
|
||||
/*
|
||||
* Copyright (c) 2022 Arm Limited. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined (ARMCM85)
|
||||
#include "ARMCM85.h"
|
||||
|
||||
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||
#include "partition_ARMCM85.h"
|
||||
#endif
|
||||
#else
|
||||
#error device not specified!
|
||||
#endif
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Define clocks
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define XTAL (50000000UL) /* Oscillator frequency */
|
||||
|
||||
#define SYSTEM_CLOCK (XTAL / 2U)
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Exception / Interrupt Vector table
|
||||
*----------------------------------------------------------------------------*/
|
||||
extern const VECTOR_TABLE_Type __VECTOR_TABLE[496];
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
System Core Clock Variable
|
||||
*----------------------------------------------------------------------------*/
|
||||
uint32_t SystemCoreClock = SYSTEM_CLOCK; /* System Core Clock Frequency */
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
System Core Clock update function
|
||||
*----------------------------------------------------------------------------*/
|
||||
void SystemCoreClockUpdate (void)
|
||||
{
|
||||
SystemCoreClock = SYSTEM_CLOCK;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
System initialization function
|
||||
*----------------------------------------------------------------------------*/
|
||||
void SystemInit (void)
|
||||
{
|
||||
|
||||
#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U)
|
||||
SCB->VTOR = (uint32_t)(&__VECTOR_TABLE[0]);
|
||||
#endif
|
||||
|
||||
/* Set CPDLPSTATE.RLPSTATE to 0
|
||||
Set CPDLPSTATE.ELPSTATE to 0, to stop the processor from trying to switch the EPU into retention state.
|
||||
Set CPDLPSTATE.CLPSTATE to 0, so PDCORE will not enter low-power state. */
|
||||
PWRMODCTL->CPDLPSTATE &= ~(PWRMODCTL_CPDLPSTATE_RLPSTATE_Msk |
|
||||
PWRMODCTL_CPDLPSTATE_ELPSTATE_Msk |
|
||||
PWRMODCTL_CPDLPSTATE_CLPSTATE_Msk );
|
||||
|
||||
#if (defined (__FPU_USED) && (__FPU_USED == 1U)) || \
|
||||
(defined (__ARM_FEATURE_MVE) && (__ARM_FEATURE_MVE > 0U))
|
||||
SCB->CPACR |= ((3U << 10U*2U) | /* enable CP10 Full Access */
|
||||
(3U << 11U*2U) ); /* enable CP11 Full Access */
|
||||
|
||||
/* Favor best FP/MVE performance by default, avoid EPU switch-ON delays */
|
||||
/* PDEPU ON, Clock OFF */
|
||||
PWRMODCTL->CPDLPSTATE |= 0x1 << PWRMODCTL_CPDLPSTATE_ELPSTATE_Pos;
|
||||
#endif
|
||||
|
||||
#ifdef UNALIGNED_SUPPORT_DISABLE
|
||||
SCB->CCR |= SCB_CCR_UNALIGN_TRP_Msk;
|
||||
#endif
|
||||
|
||||
/* Enable Loop and branch info cache */
|
||||
SCB->CCR |= SCB_CCR_LOB_Msk;
|
||||
|
||||
/* Enable Branch Prediction */
|
||||
SCB->CCR |= SCB_CCR_BP_Msk;
|
||||
|
||||
__DSB();
|
||||
__ISB();
|
||||
|
||||
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||
TZ_SAU_Setup();
|
||||
#endif
|
||||
|
||||
SystemCoreClock = SYSTEM_CLOCK;
|
||||
}
|
Reference in New Issue
Block a user