#if defined(CORE0_IS_ASR)
group Core0_RAM( ordered, run_addr = mem:mpe:dspr0 )
{
   /* lets pretend that currently there is no near */
   /* thus you won't need the stack safety gap */
   /* start with the stacks */
   group osAllStacksCore0(ordered, contiguous, fill, align=8)
   {
      #define OS_LINK_KERNEL_STACKS
      #include OS_LINK_CORE0_STACKS_LSL
   }
   "osEndOf_Core0Stack" = "_lc_ge_osAllStacksCore0";
   "osEndOf_Core0StackInAlias" = (("_lc_ge_osAllStacksCore0")&~0xF0000000)|0xD0000000;

   group osFarCore0(ordered, contiguous, fill, align=8)
   {
      /* Kernel Variables */
      group osFarKernelCore0
      {
         #define OS_LINK_VAR_KERNEL
         #include OS_LINK_CORE0_LSL
      }
      /* Kernel Barriers */
      group osBarriersFarOnCore0
      {
         #define OS_LINK_KERNEL_BARRIERS
         #include OS_LINK_CORE0_LSL
      }
      /* Kernel Corestatus */
      group osCoreStatusFarOnCore0
      {
         #define OS_LINK_KERNEL_CORESTATUS
         #include OS_LINK_CORE0_LSL
      }
      /* Global Shared */
      group osGlobalSharedFarOnCore0
      {
         #define OS_LINK_VAR_GLOBALSHARED
         #include OS_LINK_LSL
      }
      "osBeginOf_SharedData" = "_lc_gb_osGlobalSharedFarOnCore0";
      "osEndOf_SharedData" = "_lc_ge_osGlobalSharedFarOnCore0";

      /* Spinlocks */
      group osSpinlocksFarOnCore0
      {
         #define OS_LINK_SPINLOCKS
         #include OS_LINK_LSL
      }
      
      /* No cache data */
      group osNoCacheOnCore0
      {
         #define OS_LINK_VAR_KERNEL
         #include OS_LINK_LSL
      }
      
      /* Application private */
      #define OS_LINK_VAR_APP_SYSTEMAPPLICATION_OSCORE0
      #define OS_LINK_VAR_APP_APPLICATION3_CORE0
      #define OS_LINK_VAR_APP_TRACEAPPLICATION
      #define OS_LINK_VAR_APP_APPLICATION4_CORE0
      #define OS_LINK_VAR_APP_APPLICATION_TRUSTED_NONPRIV_CORE0
      #define OS_LINK_VAR_APP_APPLICATION_HIDEACCESS_CORE0
      #define OS_LINK_VAR_APP_APPLICATION5_CORE0
      #include OS_LINK_CORE0_LSL

      /*----------------------------------------------------------------------------------------------*/
      /* aggregate all variables of Application1_Core0 --------------------------------------------*/
      /*----------------------------------------------------------------------------------------------*/
      group Group_Application1_Core0_All
      {
         group Group_Application1_Core0
         {
            #define OS_LINK_VAR_APP_APPLICATION1_CORE0
            #include OS_LINK_CORE0_LSL
         }
           group Group_Task1_Core0_Basic_Non_Prio1_MaxAct1
         {
            #define OS_LINK_VAR_TASK_TASK1_CORE0_BASIC_NON_PRIO1_MAXACT1 
            #include OS_LINK_CORE0_LSL
         }
         group Group_ISR2_Cat2_Core0_Level2
         {
            #define OS_LINK_VAR_ISR_ISR2_CAT2_CORE0_LEVEL2
            #include OS_LINK_CORE0_LSL
         }
         group Group_TestTimer_Cat2_Core0_Level3
         {
            #define OS_LINK_VAR_ISR_TESTTIMER_CAT2_CORE0_LEVEL3
            #include OS_LINK_CORE0_LSL
        
         }
      }
      "osBeginOf_Group_Application1_Core0" =                  "_lc_gb_Group_Application1_Core0";
      "osEndOf_Group_Application1_Core0" =                    "_lc_ge_Group_Application1_Core0";
      "osBeginOf_Group_Task1_Core0_Basic_Non_Prio1_MaxAct1" = "_lc_gb_Group_Task1_Core0_Basic_Non_Prio1_MaxAct1";
      "osEndOf_Group_Task1_Core0_Basic_Non_Prio1_MaxAct1" =   "_lc_ge_Group_Task1_Core0_Basic_Non_Prio1_MaxAct1";
      "osBeginOf_Group_ISR2_Cat2_Core0_Level2" =              "_lc_gb_Group_ISR2_Cat2_Core0_Level2";
      "osEndOf_Group_ISR2_Cat2_Core0_Level2" =                "_lc_ge_Group_ISR2_Cat2_Core0_Level2";
      "osBeginOf_Group_TestTimer_Cat2_Core0_Level3" =         "_lc_gb_Group_TestTimer_Cat2_Core0_Level3";
      "osEndOf_Group_TestTimer_Cat2_Core0_Level3" =           "_lc_ge_Group_TestTimer_Cat2_Core0_Level3";
      "osBeginOf_Group_Application1_Core0_All" =              "_lc_gb_Group_Application1_Core0_All";
      "osEndOf_Group_Application1_Core0_All" =                "_lc_ge_Group_Application1_Core0_All";
      /*----------------------------------------------------------------------------------------------*/

      /*----------------------------------------------------------------------------------------------*/
      /* aggregate all variables of Application2_Core0 --------------------------------------------*/
      /*----------------------------------------------------------------------------------------------*/
      group Group_Application2_Core0_All
      {
         group Group_Application2_Core0(ordered, contiguous, fill, align=8)
         {
            #define OS_LINK_VAR_APP_APPLICATION2_CORE0
            #include OS_LINK_CORE0_LSL
         }
         group Group_Task1_Core0_Basic_Full_Prio1_MaxAct1
         {
            #define OS_LINK_VAR_TASK_TASK1_CORE0_BASIC_FULL_PRIO1_MAXACT1
            #include OS_LINK_CORE0_LSL
         }
         group Group_Task1_Core0_Basic_Full_Prio2_MaxAct1
         {
            #define OS_LINK_VAR_TASK_TASK1_CORE0_BASIC_FULL_PRIO2_MAXACT1
            #include OS_LINK_CORE0_LSL
         }
         group Group_Task1_Core0_Basic_Full_Prio2_MaxAct2
         {
            #define OS_LINK_VAR_TASK_TASK1_CORE0_BASIC_FULL_PRIO2_MAXACT2
            #include OS_LINK_CORE0_LSL
         }
         group Group_Task1_Core0_Basic_Full_Prio3_MaxAct1
         {
            #define OS_LINK_VAR_TASK_TASK1_CORE0_BASIC_FULL_PRIO3_MAXACT1
            #include OS_LINK_CORE0_LSL
         }
         group Group_ISR1_Cat2_Core0_Level1Low(ordered, contiguous, fill, align=8)
         {
            #define OS_LINK_VAR_ISR_ISR1_CAT2_CORE0_LEVEL1LOW
            #include OS_LINK_CORE0_LSL
         }
      }  
      "osBeginOf_Group_Application2_Core0_All" =               "_lc_gb_Group_Application2_Core0_All";
      "osEndOf_Group_Application2_Core0_All" =                 "_lc_ge_Group_Application2_Core0_All";
      "osBeginOf_Group_Application2_Core0" =                   "_lc_gb_Group_Application2_Core0";
      "osEndOf_Group_Application2_Core0" =                     "_lc_ge_Group_Application2_Core0";
      "osBeginOf_Group_Task1_Core0_Basic_Full_Prio1_MaxAct1" = "_lc_gb_Group_Task1_Core0_Basic_Full_Prio1_MaxAct1";
      "osEndOf_Group_Task1_Core0_Basic_Full_Prio1_MaxAct1" =   "_lc_ge_Group_Task1_Core0_Basic_Full_Prio1_MaxAct1";
      "osBeginOf_Group_Task1_Core0_Basic_Full_Prio2_MaxAct1" = "_lc_gb_Group_Task1_Core0_Basic_Full_Prio2_MaxAct1";
      "osEndOf_Group_Task1_Core0_Basic_Full_Prio2_MaxAct1" =   "_lc_ge_Group_Task1_Core0_Basic_Full_Prio2_MaxAct1";
      "osBeginOf_Group_Task1_Core0_Basic_Full_Prio2_MaxAct2" = "_lc_gb_Group_Task1_Core0_Basic_Full_Prio2_MaxAct2";
      "osEndOf_Group_Task1_Core0_Basic_Full_Prio2_MaxAct2" =   "_lc_ge_Group_Task1_Core0_Basic_Full_Prio2_MaxAct2";
      "osBeginOf_Group_Task1_Core0_Basic_Full_Prio3_MaxAct1" = "_lc_gb_Group_Task1_Core0_Basic_Full_Prio3_MaxAct1";
      "osEndOf_Group_Task1_Core0_Basic_Full_Prio3_MaxAct1" =   "_lc_ge_Group_Task1_Core0_Basic_Full_Prio3_MaxAct1";
      "osBeginOf_Group_ISR1_Cat2_Core0_Level1Low" =            "_lc_gb_Group_ISR1_Cat2_Core0_Level1Low";
      "osEndOf_Group_ISR1_Cat2_Core0_Level1Low" =              "_lc_ge_Group_ISR1_Cat2_Core0_Level1Low";
      /*----------------------------------------------------------------------------------------------*/
      
      /* Task private */
      #define OS_LINK_VAR_TASK_IDLETASK_OSCORE0
      #define OS_LINK_VAR_TASK_TASK1_CORE0_BASIC_NON_PRIO2_MAXACT1
      #define OS_LINK_VAR_TASK_TASK1_CORE0_BASIC_NON_PRIO3_MAXACT1
      #define OS_LINK_VAR_TASK_TASK1_CORE0_EXTENDED_FULL_PRIO1_MAXACT1
      #define OS_LINK_VAR_TASK_TASK1_CORE0_EXTENDED_FULL_PRIO2_MAXACT1
      #define OS_LINK_VAR_TASK_TASK1_CORE0_EXTENDED_FULL_PRIO3_MAXACT1
      #define OS_LINK_VAR_TASK_TASK1_CORE0_EXTENDED_NON_PRIO1_MAXACT1
      #define OS_LINK_VAR_TASK_TASK1_CORE0_EXTENDED_NON_PRIO2_MAXACT1
      #define OS_LINK_VAR_TASK_TASK1_CORE0_EXTENDED_NON_PRIO3_MAXACT1
      #define OS_LINK_VAR_TASK_TASK1_CORE0_TIMINGPROTECTION
      #define OS_LINK_VAR_TASK_TASK2_CORE0_BASIC_FULL_PRIO1_MAXACT1
      #define OS_LINK_VAR_TASK_TASK2_CORE0_BASIC_FULL_PRIO2_MAXACT1
      #define OS_LINK_VAR_TASK_TASK2_CORE0_BASIC_FULL_PRIO3_MAXACT1
      #define OS_LINK_VAR_TASK_TASK2_CORE0_BASIC_NON_PRIO2_MAXACT1
      #define OS_LINK_VAR_TASK_TASK2_CORE0_BASIC_NON_PRIO3_MAXACT1
      #define OS_LINK_VAR_TASK_TASK2_CORE0_EXTENDED_NON_PRIO3_MAXACT1
      #define OS_LINK_VAR_TASK_TASK3_CORE0_BASIC_FULL_PRIO3_MAXACT1
      #define OS_LINK_VAR_TASK_TASK4_CORE0_BASIC_FULL_PRIO3_MAXACT1
      #define OS_LINK_VAR_TASK_TASK_MAIN
      #define OS_LINK_VAR_TASK_TASK_NOTACCESSIBLE
      #define OS_LINK_VAR_TASK_TASK_PRESTARTOS_CORE0

      /* ISR private */
      #define OS_LINK_VAR_ISR_COUNTERISR_COUNTER_HIRES_CORE0
      #define OS_LINK_VAR_ISR_COUNTERISR_COUNTER_PIT_CORE0
      #define OS_LINK_VAR_ISR_ISR3_CAT2_CORE0_LEVEL4
      #define OS_LINK_VAR_ISR_XSIGNALISR_OSCORE0
      #include OS_LINK_CORE0_LSL
      
      /* Test data */
      select ".bss.main.*";
   }
}
#else
group Core0_RAM( ordered, run_addr = mem:mpe:dspr0 )
{
   /* if core0 is not an Autosar Core we still need global shared and spinlock sections */
   group osFarCore0(ordered, contiguous, fill, align=8)
   {
      /* Global Shared */
      group osGlobalSharedFarOnCore0
      {
         #define OS_LINK_VAR_GLOBALSHARED
         #include OS_LINK_LSL
      }
      
      /* Spinlocks */
      group osSpinlocksFarOnCore0
      {
         #define OS_LINK_SPINLOCKS
         #include OS_LINK_LSL
      }
      
      /* We need to link this non autosar section here, because otherwise the linker will put it into cached LMURAM */
      select ".bss.OS_CORESTATUS_CORE0_VAR_NOCACHE_NOINIT";
   }

   /* Symbols used for MPU labels */
   "osEndOf_Core0Stack" = 0x70000000; /* Dummy needed for the MPU Config */
   "osBeginOf_SharedData" = "_lc_gb_osGlobalSharedFarOnCore0";
   "osEndOf_SharedData" = "_lc_ge_osGlobalSharedFarOnCore0";
}
#endif


