linker: stm32f0: move ram vector table to snippets
Move the STM32F0 specific ram vector table sections into a dedicated linker snippet included by the new `SRAM_VECTOR_TABLE` symbol. Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This commit is contained in:
parent
318ee971c5
commit
a0909ac00b
3 changed files with 19 additions and 10 deletions
|
@ -254,16 +254,6 @@ SECTIONS
|
|||
. = ALIGN(_region_min_align);
|
||||
_image_ram_start = .;
|
||||
|
||||
#if defined(CONFIG_SOC_SERIES_STM32F0X) && defined(CONFIG_SRAM_VECTOR_TABLE)
|
||||
/* Must be first in ramable region */
|
||||
SECTION_PROLOGUE(.st_stm32f0x_vt,(NOLOAD),)
|
||||
{
|
||||
_ram_vector_start = .;
|
||||
. += _vector_end - _vector_start;
|
||||
_ram_vector_end = .;
|
||||
} GROUP_DATA_LINK_IN(RAMABLE_REGION, RAMABLE_REGION)
|
||||
#endif
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
* zephyr_linker_sources() Cmake function.
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# The vector table must be placed at the start of SRAM
|
||||
zephyr_linker_sources_ifdef(CONFIG_SRAM_VECTOR_TABLE
|
||||
RAM_SECTIONS
|
||||
SORT_KEY 0
|
||||
sram_vector_table.ld
|
||||
)
|
||||
zephyr_include_directories(${ZEPHYR_BASE}/drivers)
|
||||
zephyr_sources(soc.c)
|
||||
|
|
13
soc/arm/st_stm32/stm32f0/sram_vector_table.ld
Normal file
13
soc/arm/st_stm32/stm32f0/sram_vector_table.ld
Normal file
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Commonwealth Scientific and Industrial Research
|
||||
* Organisation (CSIRO) ABN 41 687 119 230.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
SECTION_PROLOGUE(.st_stm32f0x_vt,(NOLOAD),)
|
||||
{
|
||||
_ram_vector_start = .;
|
||||
. += _vector_end - _vector_start;
|
||||
_ram_vector_end = .;
|
||||
} GROUP_DATA_LINK_IN(RAMABLE_REGION, RAMABLE_REGION)
|
Loading…
Add table
Add a link
Reference in a new issue