Skip to content

Commit 08c165f

Browse files
dcpleungnashif
authored andcommitted
arm: cypress/psoc6: add SoC specific linker input sections
The Cypress PSoC6 specifies some input sections in the startup scripts. These sections (.heap, .stack, etc.) need to be placed at correct location. Signed-off-by: Daniel Leung <[email protected]>
1 parent 2fed930 commit 08c165f

File tree

4 files changed

+26
-0
lines changed

4 files changed

+26
-0
lines changed

include/arch/arm/cortex_m/scripts/linker.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ SECTIONS
114114

115115
KEEP(*(IRQ_VECTOR_TABLE))
116116

117+
KEEP(*(.vectors))
118+
117119
KEEP(*(.openocd_dbg))
118120
KEEP(*(".openocd_dbg.*"))
119121

soc/arm/cypress/psoc6/Kconfig.series

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@ config SOC_SERIES_PSOC62
1111
select SYS_POWER_LOW_POWER_STATE_SUPPORTED
1212
select CPU_HAS_SYSTICK
1313
select HAS_CYPRESS_DRIVERS
14+
select SOC_NOINIT_LD
15+
select SOC_RWDATA_LD
1416
help
1517
Enable support for Cypress PSoC6 MCU series

soc/arm/cypress/psoc6/soc-noinit.ld

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*
2+
* Extracted from:
3+
* ext/hal/cypress/.../devices/psoc6/linker/gcc/cy8c6xx6_cm0plus.ld
4+
*
5+
* Size of sections are calculated in the startup scripts,
6+
* so they don't have to be specified here.
7+
*/
8+
9+
. = ALIGN(8);
10+
KEEP(*(.ram_vectors))
11+
12+
. = ALIGN(4);
13+
KEEP(*(.heap))
14+
15+
. = ALIGN(4);
16+
KEEP(*(.stack))

soc/arm/cypress/psoc6/soc-rwdata.ld

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/*
2+
* Extracted from:
3+
* ext/hal/cypress/.../devices/psoc6/linker/gcc/cy8c6xx6_cm0plus.ld
4+
*/
5+
6+
KEEP(*(.cy_ramfunc))

0 commit comments

Comments
 (0)