@@ -1170,6 +1170,8 @@ endfunction(zephyr_check_compiler_flag_hardcoded)
11701170# DATA_SECTIONS Inside the RAMABLE_REGION GROUP, initialized.
11711171# RAMFUNC_SECTION Inside the RAMFUNC RAMABLE_REGION GROUP, not initialized.
11721172# NOCACHE_SECTION Inside the NOCACHE section
1173+ # ITCM_SECTION Inside the itcm section.
1174+ # DTCM_SECTION Inside the dtcm data section.
11731175# SECTIONS Near the end of the file. Don't use this when linking into
11741176# RAMABLE_REGION, use RAM_SECTIONS instead.
11751177# PINNED_RODATA Similar to RODATA but pinned in memory.
@@ -1184,8 +1186,9 @@ endfunction(zephyr_check_compiler_flag_hardcoded)
11841186# Use NOINIT, RWDATA, and RODATA unless they don't work for your use case.
11851187#
11861188# When placing into NOINIT, RWDATA, RODATA, ROM_START, RAMFUNC_SECTION,
1187- # NOCACHE_SECTION the contents of the files will be placed inside
1188- # an output section, so assume the section definition is already present, e.g.:
1189+ # NOCACHE_SECTION, DTCM_SECTION or ITCM_SECTION the contents of the files will
1190+ # be placed inside an output section, so assume the section definition is
1191+ # already present, e.g.:
11891192# _mysection_start = .;
11901193# KEEP(*(.mysection));
11911194# _mysection_end = .;
@@ -1220,6 +1223,8 @@ function(zephyr_linker_sources location)
12201223 set (rodata_path "${snippet_base} /snippets-rodata.ld" )
12211224 set (ramfunc_path "${snippet_base} /snippets-ramfunc-section.ld" )
12221225 set (nocache_path "${snippet_base} /snippets-nocache-section.ld" )
1226+ set (itcm_path "${snippet_base} /snippets-itcm-section.ld" )
1227+ set (dtcm_path "${snippet_base} /snippets-dtcm-section.ld" )
12231228
12241229 set (pinned_ram_sections_path "${snippet_base} /snippets-pinned-ram-sections.ld" )
12251230 set (pinned_data_sections_path "${snippet_base} /snippets-pinned-data-sections.ld" )
@@ -1237,6 +1242,8 @@ function(zephyr_linker_sources location)
12371242 file (WRITE ${rodata_path} "" )
12381243 file (WRITE ${ramfunc_path} "" )
12391244 file (WRITE ${nocache_path} "" )
1245+ file (WRITE ${itcm_path} "" )
1246+ file (WRITE ${dtcm_path} "" )
12401247 file (WRITE ${pinned_ram_sections_path} "" )
12411248 file (WRITE ${pinned_data_sections_path} "" )
12421249 file (WRITE ${pinned_rodata_path} "" )
@@ -1262,6 +1269,10 @@ function(zephyr_linker_sources location)
12621269 set (snippet_path "${ramfunc_path} " )
12631270 elseif ("${location} " STREQUAL "NOCACHE_SECTION" )
12641271 set (snippet_path "${nocache_path} " )
1272+ elseif ("${location} " STREQUAL "ITCM_SECTION" )
1273+ set (snippet_path "${itcm_path} " )
1274+ elseif ("${location} " STREQUAL "DTCM_SECTION" )
1275+ set (snippet_path "${dtcm_path} " )
12651276 elseif ("${location} " STREQUAL "PINNED_RAM_SECTIONS" )
12661277 set (snippet_path "${pinned_ram_sections_path} " )
12671278 elseif ("${location} " STREQUAL "PINNED_DATA_SECTIONS" )
0 commit comments