This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 26cf8bc84e5fc5eb120785a4305ca2bcf0cf807b
Author: Saravanan Sekar <[email protected]>
AuthorDate: Tue Nov 17 10:38:35 2026 +0530

    boards/tricore: Replace the iLLD TASKING linker scripts.
    
    Replace the iLLD Lcf_Tasking_Tricore_Tc.lsl.kernel scripts with
    tricore.lsl, the same CPU0 map and symbols as tricore.ld.  The single
    core is tc0, so drop --lsl-core=vtc and link the cmake build for
    mpe:tc0; the protected build .user scripts name their core tc0 too.
    
    The CMake side of the script selection is in src/CMakeLists.txt, which
    changes with it [skip-cmake-parity].
    
    Signed-off-by: Saravanan Sekar <[email protected]>
---
 arch/tricore/src/cmake/tasking.cmake               |   3 +-
 arch/tricore/src/common/ToolchainTasking.defs      |   2 -
 .../scripts/Lcf_Tasking_Tricore_Tc.lsl.kernel      | 640 -------------------
 .../scripts/Lcf_Tasking_Tricore_Tc.lsl.user        |  18 +-
 .../tc3xx/a2g-tc397-5v-tft/scripts/Make.defs       |   2 +-
 .../tc3xx/a2g-tc397-5v-tft/scripts/tricore.lsl     | 202 ++++++
 .../tc3xx/a2g-tc397-5v-tft/src/CMakeLists.txt      |   6 +-
 .../scripts/Lcf_Tasking_Tricore_Tc.lsl.kernel      | 677 ---------------------
 .../scripts/Lcf_Tasking_Tricore_Tc.lsl.user        |  20 +-
 .../tc4xx/triboard_tc4x9_com/scripts/Make.defs     |   2 +-
 .../tc4xx/triboard_tc4x9_com/scripts/tricore.lsl   | 218 +++++++
 .../tc4xx/triboard_tc4x9_com/src/CMakeLists.txt    |   6 +-
 12 files changed, 446 insertions(+), 1350 deletions(-)

diff --git a/arch/tricore/src/cmake/tasking.cmake 
b/arch/tricore/src/cmake/tasking.cmake
index 8979fcd20a4..055b6641833 100644
--- a/arch/tricore/src/cmake/tasking.cmake
+++ b/arch/tricore/src/cmake/tasking.cmake
@@ -127,7 +127,6 @@ set(CMAKE_CXX_LINK_EXECUTABLE
 
 # Architecture flags
 
-add_compile_options(--lsl-core=vtc)
 add_link_options(-v)
 if(CONFIG_ARCH_CHIP_TC3XX)
   add_compile_options($<$<COMPILE_LANGUAGE:C>:--iso=11>)
@@ -224,7 +223,7 @@ add_compile_options(--fp-model=2)
 add_link_options(-lc_fpu)
 add_link_options(-lfp_fpu)
 
-add_link_options(--core=mpe:vtc)
+add_link_options(--core=mpe:tc0)
 add_link_options(--hex-format=s -mcrfiklsmnoduq)
 add_link_options(-lrt)
 
diff --git a/arch/tricore/src/common/ToolchainTasking.defs 
b/arch/tricore/src/common/ToolchainTasking.defs
index 2a3e4cac1a9..0337ae4620c 100644
--- a/arch/tricore/src/common/ToolchainTasking.defs
+++ b/arch/tricore/src/common/ToolchainTasking.defs
@@ -80,8 +80,6 @@ endef
        $(Q) ctc -Em $(filter -D% -U% -I%,$(subst -I ,-I,$(CFLAGS))) $< -o $@
        $(Q) sed -i "s|^$(notdir $*)\.o *:|$(OBJPATH)$(DELIM)$*$(OBJEXT):|" $@
 
-ARCHOPTIMIZATION += --lsl-core=vtc
-LDFLAGS          += --lsl-core=vtc
 ARCHOPTIMIZATION += --iso=99
 ARCHOPTIMIZATION += --language=+gcc,+volatile,-strings,-kanji
 
diff --git 
a/boards/tricore/tc3xx/a2g-tc397-5v-tft/scripts/Lcf_Tasking_Tricore_Tc.lsl.kernel
 
b/boards/tricore/tc3xx/a2g-tc397-5v-tft/scripts/Lcf_Tasking_Tricore_Tc.lsl.kernel
deleted file mode 100644
index 4717ae736e9..00000000000
--- 
a/boards/tricore/tc3xx/a2g-tc397-5v-tft/scripts/Lcf_Tasking_Tricore_Tc.lsl.kernel
+++ /dev/null
@@ -1,640 +0,0 @@
-/****************************************************************************
- * 
boards/tricore/tc3xx/a2g-tc397-5v-tft/scripts/Lcf_Tasking_Tricore_Tc.lsl.kernel
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-#include "arch/board/board_memorymap.h"
-
-#define __JOIN2(x,y)            x##y
-#define JOIN2(x,y)              __JOIN2(x,y)
-#define __JOIN3(x,y,z)          x##y##z
-#define JOIN3(x,y,z)            __JOIN3(x,y,z)
-#define __JOIN4(x,y,z,w)        x##y##z##w
-#define JOIN4(x,y,z,w)          __JOIN4(x,y,z,w)
-
-#define LCF_PFLASH_KERNEL_START     
GENERATE_CORE_PFLASH_KERNEL_START(CONFIG_CPU_COREID)
-#define LCF_PFLASH_KERNEL_SIZE      
GENERATE_CORE_PFLASH_KERNEL_SIZE(CONFIG_CPU_COREID)
-#define LCF_DSPR_KERNEL_START       
GENERATE_CORE_DSPR_KERNEL_START(CONFIG_CPU_COREID)
-#define LCF_DSPR_KERNEL_SIZE        
GENERATE_CORE_DSPR_KERNEL_SIZE(CONFIG_CPU_COREID)
-#define LCF_PSPR_KERNEL_START       
GENERATE_CORE_PSPR_KERNEL_START(CONFIG_CPU_COREID)
-#define LCF_PSPR_KERNEL_SIZE        
GENERATE_CORE_PSPR_KERNEL_SIZE(CONFIG_CPU_COREID)
-#define LCF_DLMU_KERNEL_START       
GENERATE_CORE_DLMU_KERNEL_START(CONFIG_CPU_COREID)
-#define LCF_DLMU_KERNEL_SIZE        
GENERATE_CORE_DLMU_KERNEL_SIZE(CONFIG_CPU_COREID)
-#define LCF_KSTACK_START            
GENERATE_CORE_STACK_KERNEL_START(CONFIG_CPU_COREID)
-#define LCF_KSTACK_SIZE             
GENERATE_CORE_STACK_KERNEL_SIZE(CONFIG_CPU_COREID)
-
-#if CONFIG_CPU_COREID != 0
-#define LCF_SYSLOG_START            JOIN3(AURIX_RPTUN_CORE0CORE, 
CONFIG_CPU_COREID, _SYSLOG_START)
-#define LCF_SYSLOG_SIZE             JOIN3(AURIX_RPTUN_CORE0CORE, 
CONFIG_CPU_COREID, _SYSLOG_SIZE)
-#endif
-
-#define LCF_CSA_SIZE     40k
-#define LCF_USTACK_SIZE  CONFIG_IDLETHREAD_STACKSIZE
-#define LCF_ISTACK_SIZE  CONFIG_ARCH_INTERRUPTSTACK
-
-#define LCF_HEAP_SIZE    4k
-
-#define LCF_CPU0 0
-#define LCF_CPU1 1
-#define LCF_CPU2 2
-#define LCF_CPU3 3
-#define LCF_CPU4 4
-#define LCF_CPU5 5
-
-/*Un comment one of the below statements to enable CpuX DMI RAM to hold global 
variables*/
-#define LCF_DEFAULT_HOST LCF_CPU0
-
-#define LCF_CSA_OFFSET     (LCF_DSPR_KERNEL_SIZE - 1k - LCF_CSA_SIZE)
-#define LCF_ISTACK_OFFSET  (LCF_CSA_OFFSET - 256 - LCF_ISTACK_SIZE)
-#define LCF_USTACK_OFFSET  (LCF_ISTACK_OFFSET - 256 - LCF_USTACK_SIZE)
-#define LCF_HEAP_OFFSET    (LCF_USTACK_OFFSET - LCF_HEAP_SIZE)
-
-#define LCF_STARTPTR_CPU   LCF_PFLASH_KERNEL_START
-#define LCF_TRAPVEC_START  (LCF_STARTPTR_CPU + 0x100)
-#define LCF_INTVEC_START   LCF_PFLASH_KERNEL_START
-
-#define LCF_STARTPTR_NC_CPU0 NC_START(CORE0_PFLASH_KERNEL_START)
-#define LCF_STARTPTR_NC_CPU1 NC_START(CORE1_PFLASH_KERNEL_START)
-#define LCF_STARTPTR_NC_CPU2 NC_START(CORE2_PFLASH_KERNEL_START)
-#define LCF_STARTPTR_NC_CPU3 NC_START(CORE3_PFLASH_KERNEL_START)
-#define LCF_STARTPTR_NC_CPU4 NC_START(CORE4_PFLASH_KERNEL_START)
-#define LCF_STARTPTR_NC_CPU5 NC_START(CORE5_PFLASH_KERNEL_START)
-
-#define INTTAB     (LCF_INTVEC_START)
-
-#define RESET CORE0_PFLASH_KERNEL_START
-
-#include "tc1v1_6_2.lsl"
-
-// Specify a multi-core processor environment (mpe)
-
-processor mpe
-{
-    derivative = tc39;
-}
-
-derivative tc39
-{
-    core tc
-    {
-        architecture = TC1V1.6.2;
-        space_id_offset = 100;           // add 100 to all space IDs in the 
architecture definition
-        copytable_space = vtc:linear;    // use the copy table in the virtual 
core for 'bss' and initialized data sections
-    }
-
-    core vtc
-    {
-        architecture = TC1V1.6.2;
-        import tc;                     // add all address spaces of core tc to 
core vtc for linking and locating
-    }
-
-    bus sri
-    {
-        mau = 8;
-        width = 32;
-
-        // map shared addresses one-to-one to real cores and virtual cores
-        map (dest=bus:tc:fpi_bus, src_offset=0, dest_offset=0, 
size=0xc0000000);
-        map (dest=bus:vtc:fpi_bus, src_offset=0, dest_offset=0, 
size=0xc0000000);
-    }
-
-    memory dsram // Data Scratch Pad Ram
-    {
-        mau = 8;
-        size = LCF_DSPR_KERNEL_SIZE;
-        type = ram;
-        map (dest=bus:tc:fpi_bus, dest_offset=DSPR_LOCAL_START, 
size=LCF_DSPR_KERNEL_SIZE, priority=8);
-        map (dest=bus:sri, dest_offset=LCF_DSPR_KERNEL_START, 
size=LCF_DSPR_KERNEL_SIZE);
-    }
-
-    memory psram // Program Scratch Pad Ram
-    {
-        mau = 8;
-        size = LCF_PSPR_KERNEL_SIZE;
-        type = ram;
-        map (dest=bus:tc:fpi_bus, dest_offset=PSPR_LOCAL_START, 
size=LCF_PSPR_KERNEL_SIZE, priority=8);
-        map (dest=bus:sri, dest_offset=LCF_PSPR_KERNEL_START, 
size=LCF_PSPR_KERNEL_SIZE);
-    }
-
-    memory pfls
-    {
-        mau = 8;
-        size = LCF_PFLASH_KERNEL_SIZE;
-        type = rom;
-        map     cached (dest=bus:sri, dest_offset=LCF_PFLASH_KERNEL_START, 
size=LCF_PFLASH_KERNEL_SIZE);
-        map not_cached (dest=bus:sri, 
dest_offset=NC_START(LCF_PFLASH_KERNEL_START), reserved, 
size=LCF_PFLASH_KERNEL_SIZE);
-    }
-
-    memory ucb
-    {
-        mau = 8;
-        size = 80K;
-        type = rom;
-        map (dest=bus:sri, dest_offset=0xae400000, reserved, size=80K);
-    }
-
-    memory kstack
-    {
-        mau = 8;
-        size = LCF_KSTACK_SIZE;
-        type = ram;
-        map not_cached (dest=bus:sri, dest_offset=LCF_KSTACK_START, 
size=LCF_KSTACK_SIZE);
-    }
-
-#if CONFIG_CPU_COREID != 0
-    memory syslog
-    {
-        mau = 8;
-        size = LCF_SYSLOG_SIZE;
-        type = ram;
-        map not_cached (dest=bus:sri, dest_offset=LCF_SYSLOG_START, 
size=LCF_SYSLOG_SIZE);
-    }
-#endif
-
-    section_setup :vtc:linear
-    {
-        heap "heap1" (min_size = LCF_HEAP_SIZE, align = 4);
-        heap "heap2" (min_size = LCF_HEAP_SIZE, align = 4);
-    }
-
-    section_setup :vtc:linear
-    {
-        start_address
-        (
-#if CONFIG_CPU_COREID == 0
-            symbol = "__start"
-#elif CONFIG_CPU_COREID == 1
-            symbol = "_START1"
-#elif CONFIG_CPU_COREID == 2
-            symbol = "_START2"
-#elif CONFIG_CPU_COREID == 3
-            symbol = "_START3"
-#elif CONFIG_CPU_COREID == 4
-            symbol = "_START4"
-#elif CONFIG_CPU_COREID == 5
-            symbol = "_START5"
-#endif
-        );
-    }
-
-    section_setup :vtc:linear
-    {
-        stack "ustack_tc" (min_size = 1k, fixed, align = 8);
-        stack "istack_tc" (min_size = 1k, fixed, align = 8);
-    }
-
-    /*Section setup for the copy table*/
-    section_setup :vtc:linear
-    {
-        copytable
-        (
-            align = 4,
-            dest = linear,
-            table
-            {
-                symbol = "_lc_ub_table_tc";
-                space = :tc:linear, :tc:abs24, :tc:abs18, :tc:csa;
-            }
-        );
-    }
-
-    /*Sections located at absolute fixed address*/
-
-    section_layout :vtc:linear
-    {
-        /*Fixed memory Allocations for stack memory and CSA*/
-        group (ordered)
-        {
-            group ustack(align = 8, run_addr = mem:dsram[LCF_USTACK_OFFSET])
-            {
-                stack "ustack_tc" (size = LCF_USTACK_SIZE);
-            }
-            "__ustack"= sizeof(group:ustack) > 0  ? "_lc_ue_ustack_tc" : 0;
-            "__USTACK_END"="_lc_gb_ustack";
-            "__USTACK0":= "__ustack";
-            "__USTACK1":= "__ustack";
-            "__USTACK2":= "__ustack";
-            "__USTACK3":= "__ustack";
-            "__USTACK4":= "__ustack";
-            "__USTACK5":= "__ustack";
-
-            group istack(align = 8, run_addr = mem:dsram[LCF_ISTACK_OFFSET])
-            {
-                stack "istack_tc" (size = LCF_ISTACK_SIZE);
-            }
-            "__ISTACK"= sizeof(group:istack) > 0  ? "_lc_ue_istack_tc" : 0;
-            "__ISTACK_END"="_lc_gb_istack";
-            "__ISTACK0":="__ISTACK";
-            "__istack":="__ISTACK";
-            "__ISTACK1":="__ISTACK";
-            "__ISTACK2":="__ISTACK";
-            "__ISTACK3":="__ISTACK";
-            "__ISTACK4":="__ISTACK";
-            "__ISTACK5":="__ISTACK";
-            "__ISTACK0_END"="_lc_gb_istack";
-
-            group csa_tc(align = 64, attributes=rw, 
run_addr=mem:dsram[LCF_CSA_OFFSET])
-            {
-                reserved "csa_tc" (size = LCF_CSA_SIZE);
-            }
-            "__CSA"= "_lc_ub_csa_tc";
-            "__csa_end"= "_lc_ue_csa_tc";
-            "__CSA0":= "__CSA";
-            "__csa_begin":= "__CSA";
-            "__CSA0_END":= "__csa_end";
-            "__CSA1":= "__CSA";
-            "__CSA1_END":= "__csa_end";
-            "__CSA2":= "__CSA";
-            "__CSA2_END":= "__csa_end";
-            "__CSA3":= "__CSA";
-            "__CSA3_END":= "__csa_end";
-            "__CSA4":= "__CSA";
-            "__CSA4_END":= "__csa_end";
-            "__CSA5":= "__CSA";
-            "__CSA5_END":= "__csa_end";
-        }
-
-        /*Fixed memory Allocations for __start*/
-        group (ordered)
-        {
-          group  interface_const (run_addr=mem:pfls[0x0020])
-          {
-            select "*.interface_const";
-          }
-          "__IF_CONST" := addressof(group:interface_const);
-          "__START0" := CORE0_PFLASH_KERNEL_START;
-
-          /* Boot stack of __start in the PSPR, as on TC4xx */
-
-          "__psram_ustack" := 0x7010eb00;
-          "__start1" := CORE1_PFLASH_KERNEL_START;
-          "__start2" := CORE2_PFLASH_KERNEL_START;
-          "__start3" := CORE3_PFLASH_KERNEL_START;
-          "__start4" := CORE4_PFLASH_KERNEL_START;
-          "__start5" := CORE5_PFLASH_KERNEL_START;
-        }
-
-        /*Fixed memory Allocations for Trap Vector Table*/
-        group (ordered)
-        {
-            group trapvec_tc (align = 8, run_addr=LCF_TRAPVEC_START)
-            {
-                section "trapvec_tc" (size=0x100, attributes=rx, fill=0)
-                {
-#if CONFIG_CPU_COREID == 0
-                    select "(.text.traptab_cpu0*)";
-#elif CONFIG_CPU_COREID == 1
-                    select "(.text.traptab_cpu1*)";
-#elif CONFIG_CPU_COREID == 2
-                    select "(.text.traptab_cpu2*)";
-#elif CONFIG_CPU_COREID == 3
-                    select "(.text.traptab_cpu3*)";
-#elif CONFIG_CPU_COREID == 4
-                    select "(.text.traptab_cpu4*)";
-#elif CONFIG_CPU_COREID == 5
-                    select "(.text.traptab_cpu5*)";
-#endif
-                }
-            }
-            "__TRAPTAB_CPU0" := LCF_TRAPVEC_START;
-            "__TRAPTAB_CPU1" := LCF_TRAPVEC_START;
-            "__TRAPTAB_CPU2" := LCF_TRAPVEC_START;
-            "__TRAPTAB_CPU3" := LCF_TRAPVEC_START;
-            "__TRAPTAB_CPU4" := LCF_TRAPVEC_START;
-            "__TRAPTAB_CPU5" := LCF_TRAPVEC_START;
-        }
-
-        /*Fixed memory Allocations for Start up code*/
-        group (ordered, attributes=rx)
-        {
-            group start_tc (run_addr=(LCF_STARTPTR_CPU))
-            {
-#if CONFIG_CPU_COREID == 0
-                select "(.text.start*)";
-#elif CONFIG_CPU_COREID == 1
-                select "(.text.start_cpu1*)";
-#elif CONFIG_CPU_COREID == 2
-                select "(.text.start_cpu2*)";
-#elif CONFIG_CPU_COREID == 3
-                select "(.text.start_cpu3*)";
-#elif CONFIG_CPU_COREID == 4
-                select "(.text.start_cpu4*)";
-#elif CONFIG_CPU_COREID == 5
-                select "(.text.start_cpu5*)";
-#endif
-            }
-            "__ENABLE_INDIVIDUAL_C_INIT_CPU0" := 0; /* Not used */
-            "__ENABLE_INDIVIDUAL_C_INIT_CPU1" := 1; /* Not used */
-            "__ENABLE_INDIVIDUAL_C_INIT_CPU2" := 1; /* Not used */
-            "__ENABLE_INDIVIDUAL_C_INIT_CPU3" := 1; /* Not used */
-            "__ENABLE_INDIVIDUAL_C_INIT_CPU4" := 1; /* Not used */
-            "__ENABLE_INDIVIDUAL_C_INIT_CPU5" := 1; /* Not used */
-        }
-
-        /*Fixed memory Allocations for Interrupt Vector Table*/
-        group (ordered, attributes=rx)
-        {
-            group int_tab_tc (ordered)
-            {
-                group (run_addr=(INTTAB)+0x1FE0) select ".text.intvec";
-            }
-            "_lc_u_int_tab" = (LCF_INTVEC_START);
-            "__INTTAB_CPU0" = (LCF_INTVEC_START);
-            "__INTTAB_CPU1" = (LCF_INTVEC_START);
-            "__INTTAB_CPU2" = (LCF_INTVEC_START);
-            "__INTTAB_CPU3" = (LCF_INTVEC_START);
-            "__INTTAB_CPU4" = (LCF_INTVEC_START);
-            "__INTTAB_CPU5" = (LCF_INTVEC_START);
-        }
-
-        /*Fixed memory Allocations for BMHD*/
-        group (ordered)
-        {
-            group  bmh_0_orig (run_addr=mem:ucb[0x4800])
-            {
-                select ".rodata.bmhd_0_orig";
-            }
-            group  bmh_1_orig (run_addr=mem:ucb[0x5000])
-            {
-                select ".rodata.bmhd_1_orig";
-            }
-            group  bmh_2_orig (run_addr=mem:ucb[0x5800])
-            {
-                select ".rodata.bmhd_2_orig";
-            }
-            group  bmh_3_orig (run_addr=mem:ucb[0x6000])
-            {
-                select ".rodata.bmhd_3_orig";
-            }
-            group  usercfg_0_org (run_addr=mem:ucb[0x8800])
-            {
-                select ".rodata.usercfg_0_orig";
-            }
-            group  usercfg_0_cpy (run_addr=mem:ucb[0x9000])
-            {
-                select ".rodata.usercfg_0_copy";
-            }
-        }
-    }
-
-    /*Near Abbsolute Addressable Data Sections*/
-    section_layout :vtc:abs18
-    {
-        /*Near Absolute Data, selectable with patterns and user defined 
sections*/
-        group
-        {
-            group (ordered, attributes=rw, run_addr = mem:dsram)
-            {
-                select "(.zdata.zlmudata|.zdata.zlmudata.*)";
-                select "(.zbss.zlmubss|.zbss.zlmubss.*)";
-            }
-        }
-
-        /*Near Absolute Data, selectable by toolchain*/
-        group (ordered, contiguous, align = 4, attributes=rw, run_addr = 
mem:dsram)
-        {
-            group zdata(attributes=rw)
-            {
-                select "(.zdata|.zdata.*)";
-                select "(.zbss|.zbss.*)";
-            }
-        }
-
-        /*Near Absolute Const, selectable with patterns and user defined 
sections*/
-        group
-        {
-            group (ordered, contiguous, align = 4, attributes=r, 
run_addr=mem:pfls)
-            {
-#if CONFIG_CPU_COREID == 0
-                select ".zrodata.Ifx_Ssw_Tc?.*";
-                select ".zrodata.Cpu?_Main.*";
-#elif CONFIG_CPU_COREID == 1
-                select ".zrodata.Ifx_Ssw_Tc1.*";
-                select ".zrodata.Cpu1_Main.*";
-#elif CONFIG_CPU_COREID == 2
-                select ".zrodata.Ifx_Ssw_Tc2.*";
-                select ".zrodata.Cpu2_Main.*";
-#elif CONFIG_CPU_COREID == 3
-                select ".zrodata.Ifx_Ssw_Tc3.*";
-                select ".zrodata.Cpu3_Main.*";
-#elif CONFIG_CPU_COREID == 4
-                select ".zrodata.Ifx_Ssw_Tc4.*";
-                select ".zrodata.Cpu4_Main.*";
-#elif CONFIG_CPU_COREID == 5
-                select ".zrodata.Ifx_Ssw_Tc5.*";
-                select ".zrodata.Cpu5_Main.*";
-#endif
-                /*Near Absolute Const, selectable by toolchain*/
-                select "(.zrodata|.zrodata.*)";
-            }
-        }
-    }
-
-    /*Relative A0/A1/A8/A9 Addressable Sections*/
-    section_layout :vtc:linear
-    {
-        /*Relative A0 Addressable Data, selectable by toolchain*/
-        group a0 (ordered, contiguous, align = 4, attributes=rw, run_addr = 
mem:dsram)
-        {
-            select "(.sdata|.sdata.*)";
-            select "(.data_a0|.data_a0.*)";
-            select "(.sbss|.sbss.*)";
-            select "(.bss_a0|.bss_a0.*)";
-        }
-        "_SMALL_DATA_" := sizeof(group:a0) > 0 ? addressof(group:a0) : 
addressof(group:a0) & 0xF0000000 + 32k;
-        "__a0_mem" = "_SMALL_DATA_";
-
-        /*Relative A1 Addressable Const, selectable by toolchain*/
-        /*Small constant sections, No option given for CPU specific user 
sections to make generated code portable across Cpus*/
-        group  a1 (ordered, align = 4, attributes=r, run_addr=mem:pfls)
-        {
-          select "(.srodata|.srodata.*)";
-          select "(.ldata|.ldata.*)";
-          select "(.rodata_a1|.rodata_a1.*)";
-        }
-        "_LITERAL_DATA_" := sizeof(group:a1) > 0 ? addressof(group:a1) : 
addressof(group:a1) & 0xF0000000 + 32k;
-        "__a1_mem" = "_LITERAL_DATA_";
-
-        /*Relative A9 Addressable Data, selectable with patterns and user 
defined sections*/
-        group a9 (ordered, align = 4, run_addr=mem:dsram)
-        {
-            select "(.a9sdata|.a9sdata.*)";
-            select "(.data_a9|.data_a9.*)";
-            select "(.a9sbss|.a9sbss.*)";
-            select "(.bss_a9|.bss_a9.*)";
-        }
-        "_A9_DATA_" := sizeof(group:a9) > 0 ? addressof(group:a9) : 
addressof(group:a9) & 0xF0000000 + 32k;
-        "__a9_mem" = "_A9_DATA_";
-
-        /*Relative A8 Addressable Const, selectable with patterns and user 
defined sections*/
-        group  a8 (ordered, align = 4, run_addr=mem:pfls)
-        {
-          select "(.a8srodata|.a8srodata.*)";
-          select "(.rodata_a8|.rodata_a8.*)";
-        }
-        "_A8_DATA_" := sizeof(group:a8) > 0 ? addressof(group:a8) : 
addressof(group:a8) & 0xF0000000 + 32k;
-        "__a8_mem" = "_A8_DATA_";
-    }
-
-    /*kstack ram*/
-    section_layout :vtc:linear
-    {
-        group kstack(ordered, contiguous, nocopy, run_addr=mem:kstack)
-        {
-            select "(.dtcm_stack|.dtcm_stack.*)";
-        }
-    }
-
-#if CONFIG_CPU_COREID != 0
-    /*syslog ram*/
-    section_layout :vtc:linear
-    {
-        group syslog(ordered, contiguous, nocopy, run_addr=mem:syslog)
-        {
-            select "(.syslog|.syslog.*)";
-        }
-    }
-#endif
-
-    /*Far Data / Far Const Sections, selectable with patterns and user defined 
sections*/
-    section_layout :vtc:linear
-    {
-        /*Far Data Sections, selectable with patterns and user defined 
sections*/
-
-        /*DSRAM sections*/
-        group (ordered, contiguous, align = 4, attributes=rw, run_addr = 
mem:dsram)
-        {
-            group (attributes=rw)
-            {
-                select ".data.Ifx_Ssw_Tc?.*";
-                select ".data.Cpu?_Main.*";
-                select ".bss.Ifx_Ssw_Tc?.*";
-                select ".bss.Cpu?_Main.*";
-                select ".bss.os_scheduletable_misc.*";
-                select ".bss.iob_initialize.*";
-            }
-
-            /*Heap1*/
-            group heap1(attributes=rw)
-            {
-                heap "heap1" (size = LCF_HEAP_SIZE);
-            }
-            "_sheap":="_lc_ub_heap1";
-            "_eheap":="__USTACK_END";
-        }
-
-        /*LMU Data sections*/
-        group (ordered, contiguous, align = 4, attributes=rw, 
run_addr=mem:dsram)
-        {
-            group lmubss(attributes=rw, nocopy)
-            {
-                select "(.lmubss_cpu?|.lmubss_cpu?.*)";
-            }
-
-            /* .data and .bss as one block each, which the startup code in
-             * tricore_head copies and clears itself.  They also take the
-             * uncached sections of the atomic objects, as nothing here is
-             * mapped cached.
-             */
-
-            group data(ordered, contiguous, align = 4, attributes=rwu)
-            {
-                select "(.data|.data.*)";
-            }
-
-            group bss(ordered, contiguous, align = 4, attributes=rwu)
-            {
-                select "(.bss|.bss.*)";
-            }
-        }
-
-        /* The ROM copies of .data, selected by name to get the order of RAM */
-
-        group data_rom(ordered, contiguous, align = 4, load_addr)
-        {
-            select "(.data|.data.*)";
-        }
-
-        "_data_flash" = "_lc_gb_data_rom";
-        "_sdata" = "_lc_gb_data";
-        "_edata" = "_lc_ge_data";
-        "_sbss" = "_lc_gb_bss";
-        "_ebss" = "_lc_ge_bss";
-
-        /*Far Const Sections, selectable with patterns and user defined 
sections*/
-        group
-        {
-            group (ordered, align = 4, attributes=r, run_addr=mem:pfls)
-            {
-                select ".rodata.Ifx_Ssw_Tc?.*";
-                select ".rodata.Cpu?_Main.*";
-            }
-        }
-
-        /*Far Const Sections, selectable by toolchain*/
-        group (ordered, align = 4, run_addr=mem:pfls)
-        {
-            select "(.rodata|.rodata.*)";
-        }
-    }
-
-    /* PSRAM Code selections*/
-    section_layout :vtc:linear
-    {
-        /*Code Sections, selectable with patterns and user defined sections*/
-        group
-        {
-            /*Program Scratchpad Sections*/
-            group
-            {
-                group code_psram0 (ordered, attributes=rwx, copy, 
run_addr=mem:psram)
-                {
-                    select "(.text.aurix_mtd_flash|.text.aurix_mtd_flash.*)";
-                    select 
"(.text.aurix_mtd_partition|.text.aurix_mtd_partition.*)";
-                }
-            }
-        }
-    }
-
-    /* FLS Code selections*/
-    section_layout :vtc:linear
-    {
-        /*Code Sections, selectable with patterns and user defined sections*/
-        group
-        {
-            /*Cpu specific PFLASH Sections*/
-            group
-            {
-                group (ordered, align = 4, attributes=rx, run_addr=mem:pfls)
-                {
-                    select ".text.Ifx_Ssw_Tc?.*";
-                    select ".text.Cpu?_Main.*";
-                    select ".text.CompilerTasking.Ifx_C_Init";
-                }
-            }
-        }
-
-        /*Code Sections, selectable by toolchain*/
-        group (ordered, run_addr=mem:pfls)
-        {
-            select "(.text|.text.*)";
-        }
-    }
-}
diff --git 
a/boards/tricore/tc3xx/a2g-tc397-5v-tft/scripts/Lcf_Tasking_Tricore_Tc.lsl.user 
b/boards/tricore/tc3xx/a2g-tc397-5v-tft/scripts/Lcf_Tasking_Tricore_Tc.lsl.user
index 1a31cc368b7..e42cf28ddaf 100644
--- 
a/boards/tricore/tc3xx/a2g-tc397-5v-tft/scripts/Lcf_Tasking_Tricore_Tc.lsl.user
+++ 
b/boards/tricore/tc3xx/a2g-tc397-5v-tft/scripts/Lcf_Tasking_Tricore_Tc.lsl.user
@@ -46,13 +46,13 @@ derivative tc39
     {
         architecture = TC1V1.6.2;
         space_id_offset = 100;           // add 100 to all space IDs in the 
architecture definition
-        copytable_space = vtc:linear;    // use the copy table in the virtual 
core for 'bss' and initialized data sections
+        copytable_space = tc0:linear;    // use the copy table in the virtual 
core for 'bss' and initialized data sections
     }
 
-    core vtc
+    core tc0
     {
         architecture = TC1V1.6.2;
-        import tc;                     // add all address spaces of core tc to 
core vtc for linking and locating
+        import tc;                     // add all address spaces of core tc to 
core tc0 for linking and locating
     }
 
     bus sri
@@ -62,7 +62,7 @@ derivative tc39
 
         // map shared addresses one-to-one to real cores and virtual cores
         map (dest=bus:tc:fpi_bus, src_offset=0, dest_offset=0, 
size=0xc0000000);
-        map (dest=bus:vtc:fpi_bus, src_offset=0, dest_offset=0, 
size=0xc0000000);
+        map (dest=bus:tc0:fpi_bus, src_offset=0, dest_offset=0, 
size=0xc0000000);
     }
 
     memory upfls
@@ -92,7 +92,7 @@ derivative tc39
     }
 
     /*Section setup for the copy table*/
-    section_setup :vtc:linear
+    section_setup :tc0:linear
     {
         copytable
         (
@@ -106,13 +106,13 @@ derivative tc39
         );
     }
 
-    section_setup :vtc:linear
+    section_setup :tc0:linear
     {
         heap "uheap" (min_size = LCF_HEAP_SIZE, align = 4);
     }
 
     /* user stack section */
-    section_layout :vtc:linear
+    section_layout :tc0:linear
     {
         group ustack(ordered, contiguous, nocopy, run_addr=mem:ustack)
         {
@@ -121,7 +121,7 @@ derivative tc39
     }
 
     /*Sections located at absolute fixed address*/
-    section_layout :vtc:linear
+    section_layout :tc0:linear
     {
         group userspace(ordered, run_addr=LCF_PFLASH_USER_START)
         {
@@ -141,7 +141,7 @@ derivative tc39
     }
 
     /* Data & Bss section */
-    section_layout :vtc:linear
+    section_layout :tc0:linear
     {
         group uncached_data(ordered, contiguous, align = 4, attributes=rw, 
run_addr = mem:cpu_udlmu/not_cached)
         {
diff --git a/boards/tricore/tc3xx/a2g-tc397-5v-tft/scripts/Make.defs 
b/boards/tricore/tc3xx/a2g-tc397-5v-tft/scripts/Make.defs
index 87514fca335..a3362ca48f3 100644
--- a/boards/tricore/tc3xx/a2g-tc397-5v-tft/scripts/Make.defs
+++ b/boards/tricore/tc3xx/a2g-tc397-5v-tft/scripts/Make.defs
@@ -25,7 +25,7 @@ include $(TOPDIR)/tools/Config.mk
 include $(TOPDIR)/arch/tricore/src/tc3xx/Toolchain.defs
 
 ifeq ($(CONFIG_TRICORE_TOOLCHAIN_TASKING),y)
-  ARCHSCRIPT += 
$(BOARD_DIR)$(DELIM)scripts$(DELIM)Lcf_Tasking_Tricore_Tc.lsl.kernel
+  ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)tricore.lsl
 else
   ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)tricore.ld
 endif
diff --git a/boards/tricore/tc3xx/a2g-tc397-5v-tft/scripts/tricore.lsl 
b/boards/tricore/tc3xx/a2g-tc397-5v-tft/scripts/tricore.lsl
new file mode 100644
index 00000000000..1886918cc98
--- /dev/null
+++ b/boards/tricore/tc3xx/a2g-tc397-5v-tft/scripts/tricore.lsl
@@ -0,0 +1,202 @@
+/****************************************************************************
+ * boards/tricore/tc3xx/a2g-tc397-5v-tft/scripts/tricore.lsl
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include "arch/board/board_memorymap.h"
+
+#include "tc1v1_6_2.lsl"
+
+/* The memory map of tricore.ld for the TASKING locator.
+ * CPU0 only: program flash bank A and the data scratchpad RAM of CPU0.
+ * The CSA, the interrupt stack and the idle stack are at the top of the
+ * data scratchpad RAM, the heap below them.
+ */
+
+#define PFLS_BASE       0x80000000
+#define PFLS_SIZE       1536k
+
+/* In the protected build, the user image has its stack in the DSPR below
+ * CORE0_DSPR_KERNEL_START, so the kernel takes only the DSPR above it
+ */
+
+#ifdef CONFIG_BUILD_PROTECTED
+#  define DSPR_BASE     CORE0_DSPR_KERNEL_START
+#  define DSPR_SIZE     CORE0_DSPR_KERNEL_SIZE
+#else
+#  define DSPR_BASE     0x70000000
+#  define DSPR_SIZE     240k
+#endif
+
+#define CSA_SIZE        40k
+#define ISTACK_SIZE     CONFIG_ARCH_INTERRUPTSTACK
+#define USTACK_SIZE     CONFIG_IDLETHREAD_STACKSIZE
+
+#define CSA0_END        (DSPR_BASE + DSPR_SIZE)
+#define CSA0            (CSA0_END - CSA_SIZE)
+#define ISTACK0         CSA0
+#define ISTACK0_END     (ISTACK0 - ISTACK_SIZE)
+#define USTACK0         ISTACK0_END
+#define USTACK0_END     (USTACK0 - USTACK_SIZE)
+
+derivative nuttx_tc3xx
+{
+  core tc0
+  {
+    architecture = TC1V1.6.2;
+  }
+
+  memory pfls
+  {
+    mau = 8;
+    type = rom;
+    size = PFLS_SIZE;
+    map (dest = bus:tc0:fpi_bus, dest_offset = PFLS_BASE, size = PFLS_SIZE);
+  }
+
+  memory dspr
+  {
+    mau = 8;
+    type = ram;
+    size = DSPR_SIZE;
+    map (dest = bus:tc0:fpi_bus, dest_offset = DSPR_BASE, size = DSPR_SIZE);
+  }
+}
+
+processor mpe
+{
+  derivative = nuttx_tc3xx;
+}
+
+section_setup mpe:tc0:linear
+{
+  start_address (symbol = "__start");
+
+  /* The startup code initializes .data and .bss itself, the copy table
+   * only has to exist for the locator.
+   */
+
+  copytable (align = 4, dest = linear);
+}
+
+section_layout mpe:tc0:linear
+{
+  /* Reset entry, the trap table at +0x100 and the interrupt vector at
+   * +0x1fe0, which BIV points at with all priority bits set
+   */
+
+  group start (ordered, run_addr = PFLS_BASE)
+  {
+    select ".text.start";
+  }
+
+  group traptab (ordered, run_addr = PFLS_BASE + 0x100)
+  {
+    select ".text.traptab_cpu0";
+  }
+
+  group intvec (ordered, run_addr = PFLS_BASE + 0x1fe0)
+  {
+    select ".text.intvec";
+  }
+
+  group text (run_addr = mem:mpe:pfls)
+  {
+    select ".text*";
+    select ".rodata*";
+  }
+
+  /* Small data and constants, addressed relative to A0, A1, A8 and A9 */
+
+#include "base_address_groups.lsl"
+
+  /* .data and .bss at the start of the data scratchpad RAM, the heap
+   * from there to the idle stack
+   */
+
+  group dspr_area (ordered, contiguous, run_addr = DSPR_BASE)
+  {
+    group data (ordered, contiguous, align = 4, attributes = rwu)
+    {
+      select ".data*";
+    }
+
+    group bss (ordered, contiguous, align = 4, attributes = rwu)
+    {
+      select ".bss*";
+    }
+  }
+
+  /* The startup code copies .data as one block from flash, so its ROM
+   * copies are selected by name to get the same order as in RAM.
+   */
+
+  group data_rom (ordered, contiguous, align = 4, load_addr)
+  {
+    select ".data*";
+  }
+
+  group ustack_area (ordered, run_addr = USTACK0_END)
+  {
+    reserved "ustack" (size = USTACK_SIZE);
+  }
+
+  group istack_area (ordered, run_addr = ISTACK0_END)
+  {
+    reserved "istack" (size = ISTACK_SIZE);
+  }
+
+  group csa_area (ordered, run_addr = CSA0)
+  {
+    reserved "csa" (size = CSA_SIZE);
+  }
+
+  "__TRAPTAB_CPU0" := PFLS_BASE + 0x100;
+  "__INTTAB_CPU0" := PFLS_BASE;
+
+  "__a0_mem" := sizeof(group:a0) > 0 ? addressof(group:a0) + 0x8000 : 0;
+  "__a1_mem" := sizeof(group:a1) > 0 ? addressof(group:a1) + 0x8000 : 0;
+  "__a8_mem" := sizeof(group:a8) > 0 ? addressof(group:a8) + 0x8000 : 0;
+  "__a9_mem" := sizeof(group:a9) > 0 ? addressof(group:a9) + 0x8000 : 0;
+
+  "_sdata" = "_lc_gb_data";
+  "_edata" = "_lc_ge_data";
+  "_data_flash" = "_lc_gb_data_rom";
+  "_sbss" = "_lc_gb_bss";
+  "_ebss" = "_lc_ge_bss";
+  "_sheap" := addressof(group:bss) + sizeof(group:bss);
+  "_eheap" := USTACK0_END;
+  "__ustack" := USTACK0;
+  "__istack" := ISTACK0;
+  "__csa_begin" := CSA0;
+  "__csa_end" := CSA0_END;
+
+  /* The other cores start at the program flash of their own image */
+
+  "__psram_ustack" := 0x7010eb00;
+
+  "__start1" := 0x80300000;
+  "__start2" := 0x80600000;
+  "__start3" := 0x80900000;
+  "__start4" := 0x80c00000;
+  "__start5" := 0x80f00000;
+}
diff --git a/boards/tricore/tc3xx/a2g-tc397-5v-tft/src/CMakeLists.txt 
b/boards/tricore/tc3xx/a2g-tc397-5v-tft/src/CMakeLists.txt
index e3651b6c103..0f6fda75f4f 100644
--- a/boards/tricore/tc3xx/a2g-tc397-5v-tft/src/CMakeLists.txt
+++ b/boards/tricore/tc3xx/a2g-tc397-5v-tft/src/CMakeLists.txt
@@ -25,10 +25,8 @@ set(SRCS tc397_boardinit.c tc397_bringup.c)
 target_sources(board PRIVATE ${SRCS})
 
 if(CONFIG_TRICORE_TOOLCHAIN_TASKING)
-  set_property(
-    GLOBAL
-    PROPERTY LD_SCRIPT
-             "${NUTTX_BOARD_DIR}/scripts/Lcf_Tasking_Tricore_Tc.lsl.kernel")
+  set_property(GLOBAL PROPERTY LD_SCRIPT
+                               "${NUTTX_BOARD_DIR}/scripts/tricore.lsl")
 else()
   set_property(GLOBAL PROPERTY LD_SCRIPT
                                "${NUTTX_BOARD_DIR}/scripts/tricore.ld")
diff --git 
a/boards/tricore/tc4xx/triboard_tc4x9_com/scripts/Lcf_Tasking_Tricore_Tc.lsl.kernel
 
b/boards/tricore/tc4xx/triboard_tc4x9_com/scripts/Lcf_Tasking_Tricore_Tc.lsl.kernel
deleted file mode 100644
index cca081f45da..00000000000
--- 
a/boards/tricore/tc4xx/triboard_tc4x9_com/scripts/Lcf_Tasking_Tricore_Tc.lsl.kernel
+++ /dev/null
@@ -1,677 +0,0 @@
-/****************************************************************************
- * 
boards/tricore/tc4xx/triboard_tc4x9_com/scripts/Lcf_Tasking_Tricore_Tc.lsl.kernel
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-#include "arch/board/board_memorymap.h"
-
-#define __JOIN2(x,y)            x##y
-#define JOIN2(x,y)              __JOIN2(x,y)
-#define __JOIN3(x,y,z)          x##y##z
-#define JOIN3(x,y,z)            __JOIN3(x,y,z)
-#define __JOIN4(x,y,z,w)        x##y##z##w
-#define JOIN4(x,y,z,w)          __JOIN4(x,y,z,w)
-
-#ifdef USE_PREFIX
-#  define K_PREFIX(x)               kernel_##x
-#  define K_PREFIX_COREID_LST(x)    JOIN3(kernel_, x, CONFIG_CPU_COREID)
-#  define K_PREFIX_COREID_MID(x,y)  JOIN4(kernel_, x, CONFIG_CPU_COREID, y)
-#else
-#  define K_PREFIX(x)               x
-#  define K_PREFIX_COREID_LST(x)    JOIN2(x, CONFIG_CPU_COREID)
-#  define K_PREFIX_COREID_MID(x,y)  JOIN3(x, CONFIG_CPU_COREID, y)
-#endif
-
-#define LCF_PFLASH_KERNEL_START     
GENERATE_CORE_PFLASH_KERNEL_START(CONFIG_CPU_COREID)
-#define LCF_PFLASH_KERNEL_SIZE      
GENERATE_CORE_PFLASH_KERNEL_SIZE(CONFIG_CPU_COREID)
-#define LCF_DSPR_KERNEL_START       
GENERATE_CORE_DSPR_KERNEL_START(CONFIG_CPU_COREID)
-#define LCF_DSPR_KERNEL_SIZE        
GENERATE_CORE_DSPR_KERNEL_SIZE(CONFIG_CPU_COREID)
-#define LCF_PSPR_KERNEL_START       
GENERATE_CORE_PSPR_KERNEL_START(CONFIG_CPU_COREID)
-#define LCF_PSPR_KERNEL_SIZE        
GENERATE_CORE_PSPR_KERNEL_SIZE(CONFIG_CPU_COREID)
-#define LCF_DLMU_KERNEL_START       
GENERATE_CORE_DLMU_KERNEL_START(CONFIG_CPU_COREID)
-#define LCF_DLMU_KERNEL_SIZE        
GENERATE_CORE_DLMU_KERNEL_SIZE(CONFIG_CPU_COREID)
-#define LCF_KSTACK_START            
GENERATE_CORE_STACK_KERNEL_START(CONFIG_CPU_COREID)
-#define LCF_KSTACK_SIZE             
GENERATE_CORE_STACK_KERNEL_SIZE(CONFIG_CPU_COREID)
-
-#if CONFIG_CPU_COREID != 0
-#define LCF_SYSLOG_START            JOIN3(AURIX_RPTUN_CORE0CORE, 
CONFIG_CPU_COREID, _SYSLOG_START)
-#define LCF_SYSLOG_SIZE             JOIN3(AURIX_RPTUN_CORE0CORE, 
CONFIG_CPU_COREID, _SYSLOG_SIZE)
-#endif
-
-#define LCF_CSA_SIZE     40k
-#define LCF_USTACK_SIZE  CONFIG_IDLETHREAD_STACKSIZE
-#define LCF_ISTACK_SIZE  CONFIG_ARCH_INTERRUPTSTACK
-
-#define LCF_HEAP_SIZE 4k
-
-#define LCF_CPU0 0
-#define LCF_CPU1 1
-#define LCF_CPU2 2
-#define LCF_CPU3 3
-#define LCF_CPU4 4
-#define LCF_CPU5 5
-
-/*Un comment one of the below statements to enable CpuX DMI RAM to hold global 
variables*/
-#define LCF_DEFAULT_HOST LCF_CPU0
-
-#define LCF_CSA_OFFSET     (LCF_DSPR_KERNEL_SIZE - 1k - LCF_CSA_SIZE)
-#define LCF_ISTACK_OFFSET  (LCF_CSA_OFFSET - 256 - LCF_ISTACK_SIZE)
-#define LCF_USTACK_OFFSET  (LCF_ISTACK_OFFSET - 256 - LCF_USTACK_SIZE)
-#define LCF_HEAP_OFFSET    (LCF_USTACK_OFFSET - LCF_HEAP_SIZE)
-
-#define LCF_STARTPTR_CPU   LCF_PFLASH_KERNEL_START
-#define LCF_TRAPVEC_START  (LCF_STARTPTR_CPU + 0x100)
-#define LCF_INTVEC_START   LCF_PFLASH_KERNEL_START
-
-#define LCF_STARTPTR_NC_CPU0 NC_START(CORE0_PFLASH_KERNEL_START)
-#define LCF_STARTPTR_NC_CPU1 NC_START(CORE1_PFLASH_KERNEL_START)
-#define LCF_STARTPTR_NC_CPU2 NC_START(CORE2_PFLASH_KERNEL_START)
-#define LCF_STARTPTR_NC_CPU3 NC_START(CORE3_PFLASH_KERNEL_START)
-#define LCF_STARTPTR_NC_CPU4 NC_START(CORE4_PFLASH_KERNEL_START)
-#define LCF_STARTPTR_NC_CPU5 NC_START(CORE5_PFLASH_KERNEL_START)
-
-#define INTTAB     (LCF_INTVEC_START)
-
-#define RESET CORE0_PFLASH_KERNEL_START
-
-#include "tc1v1_8.lsl"
-
-// Specify a multi-core processor environment (mpe)
-
-processor mpe
-{
-    derivative = tc4D;
-}
-
-derivative tc4D
-{
-    core tc
-    {
-        architecture = TC1V1.8_DPFPU;
-        space_id_offset = 100;           // add 100 to all space IDs in the 
architecture definition
-        copytable_space = vtc:linear;    // use the copy table in the virtual 
core for 'bss' and initialized data sections
-    }
-
-    core vtc
-    {
-        architecture = TC1V1.8_DPFPU;
-        import tc;                     // add all address spaces of core tc to 
core vtc for linking and locating
-    }
-
-    bus sri
-    {
-        mau = 8;
-        width = 32;
-
-        // map shared addresses one-to-one to real cores and virtual cores
-        map (dest=bus:tc:fpi_bus, src_offset=0, dest_offset=0, 
size=0xc0000000);
-        map (dest=bus:vtc:fpi_bus, src_offset=0, dest_offset=0, 
size=0xc0000000);
-    }
-
-    memory dsram // Data Scratch Pad Ram
-    {
-        mau = 8;
-        size = LCF_DSPR_KERNEL_SIZE;
-        type = ram;
-        map (dest=bus:tc:fpi_bus, dest_offset=DSPR_LOCAL_START, 
size=LCF_DSPR_KERNEL_SIZE, priority=8);
-        map (dest=bus:sri, dest_offset=LCF_DSPR_KERNEL_START, 
size=LCF_DSPR_KERNEL_SIZE);
-    }
-
-    memory psram // Program Scratch Pad Ram
-    {
-        mau = 8;
-        size = LCF_PSPR_KERNEL_SIZE;
-        type = ram;
-        map (dest=bus:tc:fpi_bus, dest_offset=PSPR_LOCAL_START, 
size=LCF_PSPR_KERNEL_SIZE, priority=8);
-        map (dest=bus:sri, dest_offset=LCF_PSPR_KERNEL_START, 
size=LCF_PSPR_KERNEL_SIZE);
-    }
-
-    memory pfls
-    {
-        mau = 8;
-        size = LCF_PFLASH_KERNEL_SIZE;
-        type = rom;
-        map     cached (dest=bus:sri, dest_offset=LCF_PFLASH_KERNEL_START, 
size=LCF_PFLASH_KERNEL_SIZE);
-        map not_cached (dest=bus:sri, 
dest_offset=NC_START(LCF_PFLASH_KERNEL_START), reserved, 
size=LCF_PFLASH_KERNEL_SIZE);
-    }
-
-    memory ucb
-    {
-        mau = 8;
-        size = 80K;
-        type = rom;
-        map (dest=bus:sri, dest_offset=0xae400000, reserved, size=80K);
-    }
-
-    memory cpu_dlmu
-    {
-        mau = 8;
-        size = LCF_DLMU_KERNEL_SIZE;
-        type = ram;
-        map     cached (dest=bus:sri, dest_offset=LCF_DLMU_KERNEL_START, 
size=LCF_DLMU_KERNEL_SIZE);
-        map not_cached (dest=bus:sri, 
dest_offset=NC_START(LCF_DLMU_KERNEL_START), reserved, 
size=LCF_DLMU_KERNEL_SIZE);
-    }
-
-    memory kstack
-    {
-        mau = 8;
-        size = LCF_KSTACK_SIZE;
-        type = ram;
-        map not_cached (dest=bus:sri, dest_offset=LCF_KSTACK_START, 
size=LCF_KSTACK_SIZE);
-    }
-
-#if CONFIG_CPU_COREID != 0
-    memory syslog
-    {
-        mau = 8;
-        size = LCF_SYSLOG_SIZE;
-        type = ram;
-        map not_cached (dest=bus:sri, dest_offset=LCF_SYSLOG_START, 
size=LCF_SYSLOG_SIZE);
-    }
-#endif
-
-    section_setup :vtc:linear
-    {
-        heap "heap1" (min_size = LCF_HEAP_SIZE, align = 4);
-        heap "heap2" (min_size = LCF_HEAP_SIZE, align = 4);
-    }
-
-    section_setup :vtc:linear
-    {
-        start_address
-        (
-#if CONFIG_CPU_COREID == 0
-            symbol = "__start"
-#elif CONFIG_CPU_COREID == 1
-            symbol = "_START1"
-#elif CONFIG_CPU_COREID == 2
-            symbol = "_START2"
-#elif CONFIG_CPU_COREID == 3
-            symbol = "_START3"
-#elif CONFIG_CPU_COREID == 4
-            symbol = "_START4"
-#elif CONFIG_CPU_COREID == 5
-            symbol = "_START5"
-#endif
-        );
-    }
-
-    section_setup :vtc:linear
-    {
-        stack "ustack_tc" (min_size = 1k, fixed, align = 8);
-        stack "istack_tc" (min_size = 1k, fixed, align = 8);
-    }
-
-    /*Section setup for the copy table*/
-    section_setup :vtc:linear
-    {
-        copytable
-        (
-            align = 4,
-            dest = linear,
-            table
-            {
-                symbol = "_lc_ub_table_tc";
-                space = :tc:linear, :tc:abs24, :tc:abs18;
-            }
-        );
-    }
-
-    /*Sections located at absolute fixed address*/
-
-    section_layout :vtc:linear
-    {
-        /*Fixed memory Allocations for stack memory*/
-        group (ordered)
-        {
-            group ustack(align = 8, run_addr = mem:dsram[LCF_USTACK_OFFSET])
-            {
-                stack "ustack_tc" (size = LCF_USTACK_SIZE);
-            }
-            "__ustack"= sizeof(group:ustack) > 0  ? "_lc_ue_ustack_tc" : 0;
-            "__USTACK_END"="_lc_gb_ustack";
-            "__USTACK0_END"="_lc_gb_ustack";
-            "__USTACK1_END"="_lc_gb_ustack";
-            "__USTACK2_END"="_lc_gb_ustack";
-            "__USTACK3_END"="_lc_gb_ustack";
-            "__USTACK4_END"="_lc_gb_ustack";
-            "__USTACK5_END"="_lc_gb_ustack";
-            "__USTACK0":= "__ustack";
-            "__USTACK1":= "__ustack";
-            "__USTACK2":= "__ustack";
-            "__USTACK3":= "__ustack";
-            "__USTACK4":= "__ustack";
-            "__USTACK5":= "__ustack";
-
-            group istack(align = 8, run_addr = mem:dsram[LCF_ISTACK_OFFSET])
-            {
-                stack "istack_tc" (size = LCF_ISTACK_SIZE);
-            }
-            "__ISTACK"= sizeof(group:istack) > 0  ? "_lc_ue_istack_tc" : 0;
-            "__ISTACK_END"="_lc_gb_istack";
-            "__ISTACK0_END"="_lc_gb_istack";
-            "__ISTACK0":="__ISTACK";
-            "__istack":="__ISTACK";
-            "__ISTACK1":="__ISTACK";
-            "__ISTACK2":="__ISTACK";
-            "__ISTACK3":="__ISTACK";
-            "__ISTACK4":="__ISTACK";
-            "__ISTACK5":="__ISTACK";
-
-            group csa_tc(align = 64, attributes=rw, 
run_addr=mem:dsram[LCF_CSA_OFFSET])
-            {
-                reserved "csa_tc" (size = LCF_CSA_SIZE);
-            }
-            "__CSA"= "_lc_ub_csa_tc";
-            "__csa_end"= "_lc_ue_csa_tc";
-            "__CSA0":= "__CSA";
-            "__csa_begin":= "__CSA";
-            "__CSA0_END":= "__csa_end";
-        }
-
-        /*Fixed memory Allocations for __start*/
-        group (ordered)
-        {
-          group  interface_const (run_addr=mem:pfls[0x0020])
-          {
-            select "*.interface_const";
-          }
-          "__IF_CONST" := addressof(group:interface_const);
-          "__START0" := CORE0_PFLASH_KERNEL_START;
-
-          /* Boot stack and single boot CSA in the PSPR, which the startup
-           * code uses to disable the virtualization before it links the
-           * CSAs
-           */
-
-          "__psram_ustack" := 0x7010eb00;
-          "__psram_boot_csa" := 0x7010ec00;
-          "__psram_boot_csa_end" := 0x7010fc00;
-          "__start1" := CORE1_PFLASH_KERNEL_START;
-          "__start2" := CORE2_PFLASH_KERNEL_START;
-          "__start3" := CORE3_PFLASH_KERNEL_START;
-          "__start4" := CORE4_PFLASH_KERNEL_START;
-          "__start5" := CORE5_PFLASH_KERNEL_START;
-        }
-
-        /*Fixed memory Allocations for Trap Vector Table*/
-        group (ordered)
-        {
-            group trapvec_tc (align = 8, run_addr=LCF_TRAPVEC_START)
-            {
-                section "trapvec_tc" (size=0x100, attributes=rx, fill=0)
-                {
-#if CONFIG_CPU_COREID == 0
-                    select "(.text.traptab_cpu0*)";
-#elif CONFIG_CPU_COREID == 1
-                    select "(.text.traptab_cpu1*)";
-#elif CONFIG_CPU_COREID == 2
-                    select "(.text.traptab_cpu2*)";
-#elif CONFIG_CPU_COREID == 3
-                    select "(.text.traptab_cpu3*)";
-#elif CONFIG_CPU_COREID == 4
-                    select "(.text.traptab_cpu4*)";
-#elif CONFIG_CPU_COREID == 5
-                    select "(.text.traptab_cpu5*)";
-#endif
-                }
-            }
-            "__TRAPTAB_CPU0" := LCF_TRAPVEC_START;
-            "__TRAPTAB_CPU1" := LCF_TRAPVEC_START;
-            "__TRAPTAB_CPU2" := LCF_TRAPVEC_START;
-            "__TRAPTAB_CPU3" := LCF_TRAPVEC_START;
-            "__TRAPTAB_CPU4" := LCF_TRAPVEC_START;
-            "__TRAPTAB_CPU5" := LCF_TRAPVEC_START;
-        }
-
-        /*Fixed memory Allocations for Start up code*/
-        group (ordered, attributes=rx)
-        {
-            group start_tc (run_addr=(LCF_STARTPTR_CPU))
-            {
-#if CONFIG_CPU_COREID == 0
-                select "(.text.start*)";
-#elif CONFIG_CPU_COREID == 1
-                select "(.text.start_cpu1*)";
-#elif CONFIG_CPU_COREID == 2
-                select "(.text.start_cpu2*)";
-#elif CONFIG_CPU_COREID == 3
-                select "(.text.start_cpu3*)";
-#elif CONFIG_CPU_COREID == 4
-                select "(.text.start_cpu4*)";
-#elif CONFIG_CPU_COREID == 5
-                select "(.text.start_cpu5*)";
-#endif
-            }
-            "__ENABLE_INDIVIDUAL_C_INIT_CPU0" := 0; /* Not used */
-            "__ENABLE_INDIVIDUAL_C_INIT_CPU1" := 1; /* Not used */
-            "__ENABLE_INDIVIDUAL_C_INIT_CPU2" := 1; /* Not used */
-            "__ENABLE_INDIVIDUAL_C_INIT_CPU3" := 1; /* Not used */
-            "__ENABLE_INDIVIDUAL_C_INIT_CPU4" := 1; /* Not used */
-            "__ENABLE_INDIVIDUAL_C_INIT_CPU5" := 1; /* Not used */
-        }
-
-        /*Fixed memory Allocations for Interrupt Vector Table*/
-        group (ordered, attributes=rx)
-        {
-            group int_tab_tc (ordered)
-            {
-                group (run_addr=(INTTAB)+0x1FE0) select ".text.intvec";
-            }
-            "_lc_u_int_tab" = (LCF_INTVEC_START);
-            "__INTTAB_CPU0" = (LCF_INTVEC_START);
-            "__INTTAB_CPU1" = (LCF_INTVEC_START);
-            "__INTTAB_CPU2" = (LCF_INTVEC_START);
-            "__INTTAB_CPU3" = (LCF_INTVEC_START);
-            "__INTTAB_CPU4" = (LCF_INTVEC_START);
-            "__INTTAB_CPU5" = (LCF_INTVEC_START);
-        }
-
-        /*Fixed memory Allocations for BMHD*/
-        group (ordered)
-        {
-            group  bmh_0_orig (run_addr=mem:ucb[0x4800])
-            {
-                select ".rodata.bmhd_0_orig";
-            }
-            group  bmh_1_orig (run_addr=mem:ucb[0x5000])
-            {
-                select ".rodata.bmhd_1_orig";
-            }
-            group  bmh_2_orig (run_addr=mem:ucb[0x5800])
-            {
-                select ".rodata.bmhd_2_orig";
-            }
-            group  bmh_3_orig (run_addr=mem:ucb[0x6000])
-            {
-                select ".rodata.bmhd_3_orig";
-            }
-            group  usercfg_0_org (run_addr=mem:ucb[0x8800])
-            {
-                select ".rodata.usercfg_0_orig";
-            }
-            group  usercfg_0_cpy (run_addr=mem:ucb[0x9000])
-            {
-                select ".rodata.usercfg_0_copy";
-            }
-        }
-    }
-
-    /*Near Abbsolute Addressable Data Sections*/
-    section_layout :vtc:abs18
-    {
-        /*Near Absolute Data, selectable with patterns and user defined 
sections*/
-        group
-        {
-            group (ordered, attributes=rw, run_addr = mem:cpu_dlmu)
-            {
-                select "(.zdata.zlmudata|.zdata.zlmudata.*)";
-                select "(.zbss.zlmubss|.zbss.zlmubss.*)";
-            }
-        }
-
-        /*Near Absolute Data, selectable by toolchain*/
-        group (ordered, contiguous, align = 4, attributes=rw, run_addr = 
mem:dsram)
-        {
-            group zdata(attributes=rw)
-            {
-                select "(.zdata|.zdata.*)";
-                select "(.zbss|.zbss.*)";
-            }
-        }
-
-        /*Near Absolute Const, selectable with patterns and user defined 
sections*/
-        group
-        {
-            group (ordered, contiguous, align = 4, attributes=r, 
run_addr=mem:pfls)
-            {
-#if CONFIG_CPU_COREID == 0
-                select ".zrodata.Ifx_Ssw_Tc?.*";
-                select ".zrodata.Cpu?_Main.*";
-#elif CONFIG_CPU_COREID == 1
-                select ".zrodata.Ifx_Ssw_Tc1.*";
-                select ".zrodata.Cpu1_Main.*";
-#elif CONFIG_CPU_COREID == 2
-                select ".zrodata.Ifx_Ssw_Tc2.*";
-                select ".zrodata.Cpu2_Main.*";
-#elif CONFIG_CPU_COREID == 3
-                select ".zrodata.Ifx_Ssw_Tc3.*";
-                select ".zrodata.Cpu3_Main.*";
-#elif CONFIG_CPU_COREID == 4
-                select ".zrodata.Ifx_Ssw_Tc4.*";
-                select ".zrodata.Cpu4_Main.*";
-#elif CONFIG_CPU_COREID == 5
-                select ".zrodata.Ifx_Ssw_Tc5.*";
-                select ".zrodata.Cpu5_Main.*";
-#endif
-                /*Near Absolute Const, selectable by toolchain*/
-                select "(.zrodata|.zrodata.*)";
-            }
-        }
-    }
-
-    /*Relative A0/A1/A8/A9 Addressable Sections*/
-    section_layout :vtc:linear
-    {
-        /*Relative A0 Addressable Data, selectable by toolchain*/
-        group a0 (ordered, contiguous, align = 4, attributes=rw, run_addr = 
mem:dsram)
-        {
-            select "(.sdata|.sdata.*)";
-            select "(.data_a0|.data_a0.*)";
-            select "(.sbss|.sbss.*)";
-            select "(.bss_a0|.bss_a0.*)";
-        }
-        "_SMALL_DATA_" := sizeof(group:a0) > 0 ? addressof(group:a0) : 
addressof(group:a0) & 0xF0000000 + 32k;
-        "__a0_mem" = "_SMALL_DATA_";
-
-        /*Relative A1 Addressable Const, selectable by toolchain*/
-        /*Small constant sections, No option given for CPU specific user 
sections to make generated code portable across Cpus*/
-        group  a1 (ordered, align = 4, attributes=r, run_addr=mem:pfls)
-        {
-          select "(.srodata|.srodata.*)";
-          select "(.ldata|.ldata.*)";
-          select "(.rodata_a1|.rodata_a1.*)";
-        }
-        "_LITERAL_DATA_" := sizeof(group:a1) > 0 ? addressof(group:a1) : 
addressof(group:a1) & 0xF0000000 + 32k;
-        "__a1_mem" = "_LITERAL_DATA_";
-
-        /*Relative A9 Addressable Data, selectable with patterns and user 
defined sections*/
-        group a9 (ordered, align = 4, run_addr=mem:dsram)
-        {
-            select "(.a9sdata|.a9sdata.*)";
-            select "(.data_a9|.data_a9.*)";
-            select "(.a9sbss|.a9sbss.*)";
-            select "(.bss_a9|.bss_a9.*)";
-        }
-        "_A9_DATA_" := sizeof(group:a9) > 0 ? addressof(group:a9) : 
addressof(group:a9) & 0xF0000000 + 32k;
-        "__a9_mem" = "_A9_DATA_";
-
-        /*Relative A8 Addressable Const, selectable with patterns and user 
defined sections*/
-        group  a8 (ordered, align = 4, run_addr=mem:pfls)
-        {
-          select "(.a8srodata|.a8srodata.*)";
-          select "(.rodata_a8|.rodata_a8.*)";
-        }
-        "_A8_DATA_" := sizeof(group:a8) > 0 ? addressof(group:a8) : 
addressof(group:a8) & 0xF0000000 + 32k;
-        "__a8_mem" = "_A8_DATA_";
-    }
-
-    /*kstack ram*/
-    section_layout :vtc:linear
-    {
-        group kstack(ordered, contiguous, nocopy, run_addr=mem:kstack)
-        {
-            select "(.dtcm_stack|.dtcm_stack.*)";
-        }
-    }
-
-#if CONFIG_CPU_COREID != 0
-    /*syslog ram*/
-    section_layout :vtc:linear
-    {
-        group syslog(ordered, contiguous, nocopy, run_addr=mem:syslog)
-        {
-            select "(.syslog|.syslog.*)";
-        }
-    }
-#endif
-
-    /*Far Data / Far Const Sections, selectable with patterns and user defined 
sections*/
-    section_layout :vtc:linear
-    {
-        /*Far Data Sections, selectable with patterns and user defined 
sections*/
-
-        /*DSRAM sections*/
-        group (ordered, contiguous, align = 4, attributes=rw, run_addr = 
mem:dsram)
-        {
-            group (attributes=rw)
-            {
-                select ".data.Ifx_Ssw_Tc?.*";
-                select ".data.Cpu?_Main.*";
-                select ".bss.Ifx_Ssw_Tc?.*";
-                select ".bss.Cpu?_Main.*";
-                select ".bss.os_scheduletable_misc.*";
-                select ".bss.iob_initialize.*";
-                select "(.dspr_data|.dspr_data.*)";
-            }
-
-            group (attributes=rw, nocopy)
-            {
-                select "(.dspr_bss|.dspr_bss.*)";
-            }
-
-            /*Heap1*/
-            group heap1(attributes=rw)
-            {
-                heap "heap1" (size = LCF_HEAP_SIZE);
-            }
-            "_sheap":="_lc_ub_heap1";
-            "_eheap":="__USTACK_END";
-        }
-
-        /*LMU Data sections*/
-        group (ordered, contiguous, align = 4, attributes=rw, 
run_addr=mem:cpu_dlmu)
-        {
-            group lmubss(attributes=rw, nocopy)
-            {
-                select "(.lmubss_cpu?|.lmubss_cpu?.*)";
-            }
-
-            /* .data and .bss as one block each, which the startup code in
-             * tricore_head copies and clears itself.  They also take the
-             * uncached sections of the atomic objects, as nothing here is
-             * mapped cached.
-             */
-
-            group data(ordered, contiguous, align = 4, attributes=rwu)
-            {
-                select "(.data|.data.*)";
-            }
-
-            group bss(ordered, contiguous, align = 4, attributes=rwu)
-            {
-                select "(.bss|.bss.*)";
-            }
-
-            /*Heap2 allocation*/
-            group heap2(attributes=rw)
-            {
-                heap "heap2" (size = LCF_HEAP_SIZE);
-            }
-            "__DLMUHEAP":="_lc_ge_bss";
-            "__DLMUHEAP_END":=LCF_DLMU_KERNEL_START + LCF_DLMU_KERNEL_SIZE;
-        }
-
-        /* The ROM copies of .data, selected by name to get the order of RAM */
-
-        group data_rom(ordered, contiguous, align = 4, load_addr)
-        {
-            select "(.data|.data.*)";
-        }
-
-        "_data_flash" = "_lc_gb_data_rom";
-        "_sdata" = "_lc_gb_data";
-        "_edata" = "_lc_ge_data";
-        "_sbss" = "_lc_gb_bss";
-        "_ebss" = "_lc_ge_bss";
-
-        /*Far Const Sections, selectable with patterns and user defined 
sections*/
-        group
-        {
-            group (ordered, align = 4, attributes=r, run_addr=mem:pfls)
-            {
-                select ".rodata.Ifx_Ssw_Tc?.*";
-                select ".rodata.Cpu?_Main.*";
-            }
-        }
-
-        /*Far Const Sections, selectable by toolchain*/
-        group (ordered, align = 4, run_addr=mem:pfls)
-        {
-            select "(.rodata|.rodata.*)";
-            select "(.constant|.constant.*)";
-        }
-    }
-
-    /* PSRAM Code selections*/
-    section_layout :vtc:linear
-    {
-        /*Code Sections, selectable with patterns and user defined sections*/
-        group
-        {
-            /*Program Scratchpad Sections*/
-            group
-            {
-                group code_psram0 (ordered, attributes=rwx, copy, 
run_addr=mem:psram)
-                {
-                    select "(.text.aurix_mtd_flash|.text.aurix_mtd_flash.*)";
-                    select 
"(.text.aurix_mtd_partition|.text.aurix_mtd_partition.*)";
-                }
-            }
-        }
-    }
-
-    /* FLS Code selections*/
-    section_layout :vtc:linear
-    {
-        /*Code Sections, selectable with patterns and user defined sections*/
-        group
-        {
-            /*Cpu specific PFLASH Sections*/
-            group
-            {
-                group (ordered, align = 4, attributes=rx, run_addr=mem:pfls)
-                {
-                    select ".text.Ifx_Ssw_Tc?.*";
-                    select ".text.Cpu?_Main.*";
-                    select ".text.CompilerTasking.Ifx_C_Init";
-                }
-            }
-        }
-
-        /*Code Sections, selectable by toolchain*/
-        group text(ordered, contiguous, fill = 0, run_addr=mem:pfls)
-        {
-            select "(.text|.text.*)";
-        }
-        "_stext" = "_lc_gb_text";
-        "_etext" = "_lc_ge_text";
-    }
-}
diff --git 
a/boards/tricore/tc4xx/triboard_tc4x9_com/scripts/Lcf_Tasking_Tricore_Tc.lsl.user
 
b/boards/tricore/tc4xx/triboard_tc4x9_com/scripts/Lcf_Tasking_Tricore_Tc.lsl.user
index 7ae23ffce8c..2be1d05f385 100644
--- 
a/boards/tricore/tc4xx/triboard_tc4x9_com/scripts/Lcf_Tasking_Tricore_Tc.lsl.user
+++ 
b/boards/tricore/tc4xx/triboard_tc4x9_com/scripts/Lcf_Tasking_Tricore_Tc.lsl.user
@@ -46,13 +46,13 @@ derivative tc4D
     {
         architecture = TC1V1.8_DPFPU;
         space_id_offset = 100;           // add 100 to all space IDs in the 
architecture definition
-        copytable_space = vtc:linear;    // use the copy table in the virtual 
core for 'bss' and initialized data sections
+        copytable_space = tc0:linear;    // use the copy table in the virtual 
core for 'bss' and initialized data sections
     }
 
-    core vtc
+    core tc0
     {
         architecture = TC1V1.8_DPFPU;
-        import tc;                     // add all address spaces of core tc to 
core vtc for linking and locating
+        import tc;                     // add all address spaces of core tc to 
core tc0 for linking and locating
     }
 
     bus sri
@@ -62,7 +62,7 @@ derivative tc4D
 
         // map shared addresses one-to-one to real cores and virtual cores
         map (dest=bus:tc:fpi_bus, src_offset=0, dest_offset=0, 
size=0xc0000000);
-        map (dest=bus:vtc:fpi_bus, src_offset=0, dest_offset=0, 
size=0xc0000000);
+        map (dest=bus:tc0:fpi_bus, src_offset=0, dest_offset=0, 
size=0xc0000000);
     }
 
     memory upfls
@@ -92,7 +92,7 @@ derivative tc4D
     }
 
     /*Section setup for the copy table*/
-    section_setup :vtc:linear
+    section_setup :tc0:linear
     {
         copytable
         (
@@ -106,13 +106,13 @@ derivative tc4D
         );
     }
 
-    section_setup :vtc:linear
+    section_setup :tc0:linear
     {
         heap "uheap" (min_size = LCF_HEAP_SIZE, align = 4);
     }
 
     /* user stack section */
-    section_layout :vtc:linear
+    section_layout :tc0:linear
     {
         group ustack(ordered, contiguous, nocopy, run_addr=mem:ustack)
         {
@@ -121,7 +121,7 @@ derivative tc4D
     }
 
     /*Sections located at absolute fixed address*/
-    section_layout :vtc:linear
+    section_layout :tc0:linear
     {
         group userspace(ordered, run_addr=LCF_PFLASH_USER_START)
         {
@@ -142,7 +142,7 @@ derivative tc4D
     }
 
     /* Data & Bss section */
-    section_layout :vtc:linear
+    section_layout :tc0:linear
     {
         group uncached_data(ordered, contiguous, align = 4, attributes=rw, 
run_addr = mem:cpu_udlmu/not_cached)
         {
@@ -194,7 +194,7 @@ derivative tc4D
     * an exception. Since the page size of pflash is 32 bytes, we reserve 32
     * bytes instead of 4 bytes.
     */
-    section_layout :vtc:linear
+    section_layout :tc0:linear
     {
         group flash_reserve(ordered, run_addr=LCF_PFLASH_USER_START + 
LCF_PFLASH_USER_SIZE - 32)
         {
diff --git a/boards/tricore/tc4xx/triboard_tc4x9_com/scripts/Make.defs 
b/boards/tricore/tc4xx/triboard_tc4x9_com/scripts/Make.defs
index e20214c8773..68788f26843 100644
--- a/boards/tricore/tc4xx/triboard_tc4x9_com/scripts/Make.defs
+++ b/boards/tricore/tc4xx/triboard_tc4x9_com/scripts/Make.defs
@@ -25,7 +25,7 @@ include $(TOPDIR)/tools/Config.mk
 include $(TOPDIR)/arch/tricore/src/tc4xx/Toolchain.defs
 
 ifeq ($(CONFIG_TRICORE_TOOLCHAIN_TASKING),y)
-  ARCHSCRIPT += 
$(BOARD_DIR)$(DELIM)scripts$(DELIM)Lcf_Tasking_Tricore_Tc.lsl.kernel
+  ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)tricore.lsl
 else
   ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)tricore.ld
 endif
diff --git a/boards/tricore/tc4xx/triboard_tc4x9_com/scripts/tricore.lsl 
b/boards/tricore/tc4xx/triboard_tc4x9_com/scripts/tricore.lsl
new file mode 100644
index 00000000000..359255c2d3f
--- /dev/null
+++ b/boards/tricore/tc4xx/triboard_tc4x9_com/scripts/tricore.lsl
@@ -0,0 +1,218 @@
+/****************************************************************************
+ * boards/tricore/tc4xx/triboard_tc4x9_com/scripts/tricore.lsl
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include "arch/board/board_memorymap.h"
+
+#include "tc1v1_8.lsl"
+
+/* The memory map of tricore.ld for the TASKING locator.
+ * CPU0 only: program flash bank A, the data scratchpad RAM and a window of
+ * the DLMU of CPU0.
+ * The CSA, the interrupt stack and the idle stack are at the top of the
+ * data scratchpad RAM, the heap below them.
+ */
+
+#define PFLS_BASE       0x80000000
+#define PFLS_SIZE       1024k
+
+/* In the protected build, the user image has its stack in the DSPR below
+ * CORE0_DSPR_KERNEL_START, so the kernel takes only the DSPR above it
+ */
+
+#ifdef CONFIG_BUILD_PROTECTED
+#  define DSPR_BASE     CORE0_DSPR_KERNEL_START
+#  define DSPR_SIZE     CORE0_DSPR_KERNEL_SIZE
+#else
+#  define DSPR_BASE     0x70000000
+#  define DSPR_SIZE     240k
+#endif
+
+#define DLMU_BASE       0x90020400
+#define DLMU_SIZE       171k
+
+#define CSA_SIZE        40k
+#define ISTACK_SIZE     CONFIG_ARCH_INTERRUPTSTACK
+#define USTACK_SIZE     CONFIG_IDLETHREAD_STACKSIZE
+
+#define CSA0_END        (DSPR_BASE + DSPR_SIZE)
+#define CSA0            (CSA0_END - CSA_SIZE)
+#define ISTACK0         CSA0
+#define ISTACK0_END     (ISTACK0 - ISTACK_SIZE)
+#define USTACK0         ISTACK0_END
+#define USTACK0_END     (USTACK0 - USTACK_SIZE)
+
+derivative nuttx_tc4xx
+{
+  core tc0
+  {
+    architecture = TC1V1.8_DPFPU;
+  }
+
+  memory pfls
+  {
+    mau = 8;
+    type = rom;
+    size = PFLS_SIZE;
+    map (dest = bus:tc0:fpi_bus, dest_offset = PFLS_BASE, size = PFLS_SIZE);
+  }
+
+  memory dspr
+  {
+    mau = 8;
+    type = ram;
+    size = DSPR_SIZE;
+    map (dest = bus:tc0:fpi_bus, dest_offset = DSPR_BASE, size = DSPR_SIZE);
+  }
+
+  memory dlmu
+  {
+    mau = 8;
+    type = ram;
+    size = DLMU_SIZE;
+    map (dest = bus:tc0:fpi_bus, dest_offset = DLMU_BASE, size = DLMU_SIZE);
+  }
+}
+
+processor mpe
+{
+  derivative = nuttx_tc4xx;
+}
+
+section_setup mpe:tc0:linear
+{
+  start_address (symbol = "__start");
+
+  /* The startup code initializes .data and .bss itself, the copy table
+   * only has to exist for the locator.
+   */
+
+  copytable (align = 4, dest = linear);
+}
+
+section_layout mpe:tc0:linear
+{
+  /* Reset entry, the trap table at +0x100 and the interrupt vector at
+   * +0x1fe0, which BIV points at with all priority bits set
+   */
+
+  group start (ordered, run_addr = PFLS_BASE)
+  {
+    select ".text.start";
+  }
+
+  group traptab (ordered, run_addr = PFLS_BASE + 0x100)
+  {
+    select ".text.traptab_cpu0";
+  }
+
+  group intvec (ordered, run_addr = PFLS_BASE + 0x1fe0)
+  {
+    select ".text.intvec";
+  }
+
+  group text (run_addr = mem:mpe:pfls)
+  {
+    select ".text*";
+    select ".rodata*";
+  }
+
+  /* Small data and constants, addressed relative to A0, A1, A8 and A9 */
+
+#include "base_address_groups.lsl"
+
+  group data (ordered, contiguous, align = 4, attributes = rwu, run_addr = 
mem:mpe:dlmu)
+  {
+    select ".data*";
+  }
+
+  /* The startup code copies .data as one block from flash, so its ROM
+   * copies are selected by name to get the same order as in RAM.
+   */
+
+  group data_rom (ordered, contiguous, align = 4, load_addr)
+  {
+    select ".data*";
+  }
+
+  group bss (ordered, contiguous, align = 4, attributes = rwu, run_addr = 
mem:mpe:dlmu)
+  {
+    select ".bss*";
+  }
+
+  group heap_area (ordered, run_addr = DSPR_BASE)
+  {
+    reserved "heap" (size = USTACK0_END - DSPR_BASE);
+  }
+
+  group ustack_area (ordered, run_addr = USTACK0_END)
+  {
+    reserved "ustack" (size = USTACK_SIZE);
+  }
+
+  group istack_area (ordered, run_addr = ISTACK0_END)
+  {
+    reserved "istack" (size = ISTACK_SIZE);
+  }
+
+  group csa_area (ordered, run_addr = CSA0)
+  {
+    reserved "csa" (size = CSA_SIZE);
+  }
+
+  "__TRAPTAB_CPU0" := PFLS_BASE + 0x100;
+  "__INTTAB_CPU0" := PFLS_BASE;
+
+  "__a0_mem" := sizeof(group:a0) > 0 ? addressof(group:a0) + 0x8000 : 0;
+  "__a1_mem" := sizeof(group:a1) > 0 ? addressof(group:a1) + 0x8000 : 0;
+  "__a8_mem" := sizeof(group:a8) > 0 ? addressof(group:a8) + 0x8000 : 0;
+  "__a9_mem" := sizeof(group:a9) > 0 ? addressof(group:a9) + 0x8000 : 0;
+
+  "_sdata" = "_lc_gb_data";
+  "_edata" = "_lc_ge_data";
+  "_data_flash" = "_lc_gb_data_rom";
+  "_sbss" = "_lc_gb_bss";
+  "_ebss" = "_lc_ge_bss";
+  "_sheap" := DSPR_BASE;
+  "_eheap" := USTACK0_END;
+  "__ustack" := USTACK0;
+  "__istack" := ISTACK0;
+  "__csa_begin" := CSA0;
+  "__csa_end" := CSA0_END;
+
+  /* Boot stack and single boot CSA in the PSPR, which the startup code
+   * uses to disable the virtualization before it links the CSAs
+   */
+
+  "__psram_ustack" := 0x7010eb00;
+  "__psram_boot_csa" := 0x7010ec00;
+  "__psram_boot_csa_end" := 0x7010fc00;
+
+  /* The other cores start at the program flash of their own image */
+
+  "__start1" := 0x80200000;
+  "__start2" := 0x80580000;
+  "__start3" := 0x80680000;
+  "__start4" := 0x807e0000;
+  "__start5" := 0x8092c000;
+}
diff --git a/boards/tricore/tc4xx/triboard_tc4x9_com/src/CMakeLists.txt 
b/boards/tricore/tc4xx/triboard_tc4x9_com/src/CMakeLists.txt
index 9ca2b78de37..b0ce858ec95 100644
--- a/boards/tricore/tc4xx/triboard_tc4x9_com/src/CMakeLists.txt
+++ b/boards/tricore/tc4xx/triboard_tc4x9_com/src/CMakeLists.txt
@@ -25,10 +25,8 @@ set(SRCS tc4da_boardinit.c tc4da_bringup.c)
 target_sources(board PRIVATE ${SRCS})
 
 if(CONFIG_TRICORE_TOOLCHAIN_TASKING)
-  set_property(
-    GLOBAL
-    PROPERTY LD_SCRIPT
-             "${NUTTX_BOARD_DIR}/scripts/Lcf_Tasking_Tricore_Tc.lsl.kernel")
+  set_property(GLOBAL PROPERTY LD_SCRIPT
+                               "${NUTTX_BOARD_DIR}/scripts/tricore.lsl")
 else()
   set_property(GLOBAL PROPERTY LD_SCRIPT
                                "${NUTTX_BOARD_DIR}/scripts/tricore.ld")

Reply via email to