From 32991495b48d1b5e4804b2f10a67a800f4608e75 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 9 Dec 2019 16:03:11 +0100 Subject: score: Statically allocate idle/MPCI stacks Place idle and MPCI stacks into extra linker sections. This can be optionally used by applications to control the placement of the stacks. Update #3835. --- bsps/arm/shared/start/linkcmds.base | 10 +++++++--- bsps/sh/gensh1/start/linkcmds | 4 ++++ bsps/sh/gensh2/start/linkcmds | 4 ++++ bsps/sh/gensh2/start/linkcmds.ram | 4 ++++ bsps/sh/gensh2/start/linkcmds.rom | 4 ++++ 5 files changed, 23 insertions(+), 3 deletions(-) (limited to 'bsps') diff --git a/bsps/arm/shared/start/linkcmds.base b/bsps/arm/shared/start/linkcmds.base index 8121161e0c..1f5f1ef959 100644 --- a/bsps/arm/shared/start/linkcmds.base +++ b/bsps/arm/shared/start/linkcmds.base @@ -261,9 +261,6 @@ SECTIONS { .vector : ALIGN_WITH_INPUT { bsp_section_vector_begin = .; . = . + DEFINED (bsp_vector_table_in_start_section) ? 0 : bsp_vector_table_size; - } > REGION_VECTOR AT > REGION_VECTOR - .rtemsstack (NOLOAD) : { - *(SORT(.rtemsstack.*)) bsp_section_vector_end = .; } > REGION_VECTOR AT > REGION_VECTOR bsp_section_vector_size = bsp_section_vector_end - bsp_section_vector_begin; @@ -313,6 +310,13 @@ SECTIONS { } > REGION_BSS AT > REGION_BSS bsp_section_bss_size = bsp_section_bss_end - bsp_section_bss_begin; + .rtemsstack (NOLOAD) : ALIGN_WITH_INPUT { + bsp_section_rtemsstack_begin = .; + *(SORT_BY_ALIGNMENT (SORT_BY_NAME (.rtemsstack*))) + bsp_section_rtemsstack_end = .; + } > REGION_WORK AT > REGION_WORK + bsp_section_rtemsstack_size = bsp_section_rtemsstack_end - bsp_section_rtemsstack_begin; + .work : ALIGN_WITH_INPUT { /* * The work section will occupy the remaining REGION_WORK region and diff --git a/bsps/sh/gensh1/start/linkcmds b/bsps/sh/gensh1/start/linkcmds index 4c2b5e0d77..dc734de8e5 100644 --- a/bsps/sh/gensh1/start/linkcmds +++ b/bsps/sh/gensh1/start/linkcmds @@ -187,6 +187,10 @@ SECTIONS _end = . ; PROVIDE (end = .); + .rtemsstackidle (NOLOAD) : { + *(SORT(.rtemsstack.idle*)) + } > ram + _WorkAreaBase = . ; .rtemsstack (NOLOAD) : { diff --git a/bsps/sh/gensh2/start/linkcmds b/bsps/sh/gensh2/start/linkcmds index abc7a494b6..5fd04dba41 100644 --- a/bsps/sh/gensh2/start/linkcmds +++ b/bsps/sh/gensh2/start/linkcmds @@ -198,6 +198,10 @@ SECTIONS _end = . ; PROVIDE (end = .); + .rtemsstackidle (NOLOAD) : { + *(SORT(.rtemsstack.idle*)) + } > ram + _WorkAreaBase = . ; .rtemsstack (NOLOAD) : { diff --git a/bsps/sh/gensh2/start/linkcmds.ram b/bsps/sh/gensh2/start/linkcmds.ram index 7a1431889e..4db55f03a8 100644 --- a/bsps/sh/gensh2/start/linkcmds.ram +++ b/bsps/sh/gensh2/start/linkcmds.ram @@ -200,6 +200,10 @@ SECTIONS _end = . ; PROVIDE (end = .); + .rtemsstackidle (NOLOAD) : { + *(SORT(.rtemsstack.idle*)) + } > ram + _WorkAreaBase = . ; .rtemsstack (NOLOAD) : { diff --git a/bsps/sh/gensh2/start/linkcmds.rom b/bsps/sh/gensh2/start/linkcmds.rom index c56ff6b033..eb713244f4 100644 --- a/bsps/sh/gensh2/start/linkcmds.rom +++ b/bsps/sh/gensh2/start/linkcmds.rom @@ -201,6 +201,10 @@ SECTIONS _end = . ; PROVIDE (end = .); + .rtemsstackidle (NOLOAD) : { + *(SORT(.rtemsstack.idle*)) + } > ram + _HeapStart = . ; . = . + 1024 * 20 ; PROVIDE( _HeapEnd = . ); -- cgit v1.2.3