Skip to content

Commit 69bd248

Browse files
thenguyenyfcfriedt
authored andcommitted
soc: ra8t2: add linker cmake generation directive
Add section define for ra8t2 when using with cmake linker generator Signed-off-by: The Nguyen <[email protected]>
1 parent d30c4ec commit 69bd248

File tree

1 file changed

+45
-2
lines changed

1 file changed

+45
-2
lines changed

soc/renesas/ra/ra8t2/CMakeLists.txt

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,50 @@ zephyr_sources_ifdef(CONFIG_PM
1111
power.c
1212
)
1313

14-
zephyr_linker_sources(SECTIONS sections.ld)
15-
zephyr_linker_sources(RAM_SECTIONS ram_sections.ld)
14+
dt_nodelabel(option_setting_ofs0 NODELABEL "option_setting_ofs0")
15+
dt_nodelabel(option_setting_ofs2 NODELABEL "option_setting_ofs2")
16+
dt_nodelabel(option_setting_sas NODELABEL "option_setting_sas")
17+
dt_nodelabel(option_setting_ofs1_sec NODELABEL "option_setting_ofs1_sec")
18+
dt_nodelabel(option_setting_ofs3_sec NODELABEL "option_setting_ofs3_sec")
19+
dt_nodelabel(option_setting_ofs1_sel NODELABEL "option_setting_ofs1_sel")
20+
dt_nodelabel(option_setting_ofs3_sel NODELABEL "option_setting_ofs3_sel")
21+
dt_nodelabel(option_setting_bps_sec NODELABEL "option_setting_bps_sec")
22+
dt_nodelabel(option_setting_otp_pbps_sec NODELABEL "option_setting_otp_pbps_sec")
23+
24+
dt_reg_addr(ofs0_addr PATH ${option_setting_ofs0})
25+
dt_reg_addr(ofs2_addr PATH ${option_setting_ofs2})
26+
dt_reg_addr(sas_addr PATH ${option_setting_sas})
27+
dt_reg_addr(ofs1_sec_addr PATH ${option_setting_ofs1_sec})
28+
dt_reg_addr(ofs3_sec_addr PATH ${option_setting_ofs3_sec})
29+
dt_reg_addr(ofs1_sel_addr PATH ${option_setting_ofs1_sel})
30+
dt_reg_addr(ofs3_sel_addr PATH ${option_setting_ofs3_sel})
31+
dt_reg_addr(bps_sec_addr PATH ${option_setting_bps_sec})
32+
dt_reg_addr(otp_pbps_sec_addr PATH ${option_setting_otp_pbps_sec})
33+
34+
if(CONFIG_CMAKE_LINKER_GENERATOR)
35+
zephyr_linker_section(NAME .fsp_dtc_vector_table GROUP RAM)
36+
zephyr_linker_section_configure(SECTION .fsp_dtc_vector_table KEEP INPUT ".fsp_dtc_vector_table*")
37+
zephyr_linker_section(NAME .option_setting_ofs0 GROUP OFS_OFS0_MEMORY ADDRESS ${ofs0_addr})
38+
zephyr_linker_section_configure(SECTION .option_setting_ofs0 KEEP INPUT ".option_setting_ofs0*")
39+
zephyr_linker_section(NAME .option_setting_ofs2 GROUP OFS_OFS2_MEMORY ADDRESS ${ofs2_addr})
40+
zephyr_linker_section_configure(SECTION .option_setting_ofs2 KEEP INPUT ".option_setting_ofs2*")
41+
zephyr_linker_section(NAME .option_setting_sas GROUP OFS_SAS_MEMORY ADDRESS ${sas_addr})
42+
zephyr_linker_section_configure(SECTION .option_setting_sas KEEP INPUT ".option_setting_sas*")
43+
zephyr_linker_section(NAME .option_setting_ofs1_sec GROUP OFS_OFS1_SEC_MEMORY ADDRESS ${ofs1_sec_addr})
44+
zephyr_linker_section_configure(SECTION .option_setting_ofs1_sec KEEP INPUT ".option_setting_ofs1_sec*")
45+
zephyr_linker_section(NAME .option_setting_ofs3_sec GROUP OFS_OFS3_SEC_MEMORY ADDRESS ${ofs3_sec_addr})
46+
zephyr_linker_section_configure(SECTION .option_setting_ofs3_sec KEEP INPUT ".option_setting_ofs3_sec*")
47+
zephyr_linker_section(NAME .option_setting_ofs1_sel GROUP OFS_OFS1_SEL_MEMORY ADDRESS ${ofs1_sel_addr})
48+
zephyr_linker_section_configure(SECTION .option_setting_ofs1_sel KEEP INPUT ".option_setting_ofs1_sel*")
49+
zephyr_linker_section(NAME .option_setting_ofs3_sel GROUP OFS_OFS3_SEL_MEMORY ADDRESS ${ofs3_sel_addr})
50+
zephyr_linker_section_configure(SECTION .option_setting_ofs3_sel KEEP INPUT ".option_setting_ofs3_sel*")
51+
zephyr_linker_section(NAME .option_setting_bps_sec GROUP OFS_BPS_SEC_MEMORY ADDRESS ${bps_sec_addr})
52+
zephyr_linker_section_configure(SECTION .option_setting_bps_sec KEEP INPUT ".option_setting_bps_sec*")
53+
zephyr_linker_section(NAME .option_setting_otp_pbps_sec GROUP OFS_OTP_PBPS_SEC_MEMORY ADDRESS ${otp_pbps_sec_addr})
54+
zephyr_linker_section_configure(SECTION .option_setting_otp_pbps_sec KEEP INPUT ".option_setting_otp_pbps_sec*")
55+
elseif(CONFIG_LD_LINKER_TEMPLATE)
56+
zephyr_linker_sources(SECTIONS sections.ld)
57+
zephyr_linker_sources(RAM_SECTIONS ram_sections.ld)
58+
endif()
1659

1760
set(SOC_LINKER_SCRIPT ${ZEPHYR_BASE}/include/zephyr/arch/arm/cortex_m/scripts/linker.ld CACHE INTERNAL "")

0 commit comments

Comments
 (0)