Skip to content

Commit f39f9bd

Browse files
billwatersiiikartben
authored andcommitted
soc: infineon: cat1b: psc3: noinit linker update
This device needs a custom noinit.ld file to account for how ROM uses RAM during boot. Signed-off-by: Bill Waters <[email protected]>
1 parent 7cd1fbd commit f39f9bd

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

soc/infineon/cat1b/psc3/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
zephyr_sources(soc.c)
55
zephyr_include_directories(.)
6+
zephyr_linker_sources(NOINIT noinit.ld)
67

78
# CAT1B family defines
89
zephyr_compile_definitions_ifdef(CONFIG_SOC_FAMILY_INFINEON_CAT1 CY_USING_HAL)

soc/infineon/cat1b/psc3/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ config SOC_SERIES_PSC3
2828
select CPU_CORTEX_M_HAS_CMSE
2929
select SOC_EARLY_INIT_HOOK
3030
select CPU_CORTEX_M33
31+
select NOINIT_SNIPPET_FIRST

soc/infineon/cat1b/psc3/noinit.ld

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* Copyright (c) 2025 Cypress Semiconductor Corporation (an Infineon company) or
3+
* an affiliate of Cypress Semiconductor Corporation
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
/* The boot ROM in this device uses the first 8k of SRAM while running. Applications like
9+
* tests\drivers\watchdog\wdt_basic_api expect that variables placed in noint memory will retain
10+
* there value through a reset. This means that the noinit memory region must be located after
11+
* the first 8k of SRAM. The line below is added to the noinit linker section to ensure that.
12+
* It must be used in conjunction with the NOINIT_SNIPPET_FIRST configuration option that has
13+
* been added to the Kconfig file.
14+
*/
15+
. = MAX(ABSOLUTE(.), 0x34002000);

0 commit comments

Comments
 (0)