AURIX Multicore Configuration OIL

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Post Reply
flat6
Newbie
Posts: 5
Joined: Fri Feb 12, 2016 7:50 am

AURIX Multicore Configuration OIL

Post by flat6 » Fri Feb 12, 2016 10:14 am

Ciao tutti,

I am new to ErikaEnterprise and OSEK language and trying to use EE on an Infineon AURIX TC 297. Infineon provided an example for Erika Enterprise which was working fine. I was also able to use my own oil-file to add tasks etc. I used oscfg as a make target and everything was fine. RTDruid created the EE files exactly the way I expected them.

This is the working oil-file for single-core-implementation:

Code: Select all

CPU TC27X { 

	OS IFX_TRICORE { 
		MCU_DATA = TRICORE {
        	MODEL = TC27x;
        };
        CPU_DATA = TRICORE {
            CPU_CLOCK = 200.0;
            COMPILER_TYPE = GNU;
            MULTI_STACK = TRUE {
                IRQ_STACK = TRUE {
                    SYS_SIZE = 256;
                };
           };
        };
		STATUS = EXTENDED; 
		PRETASKHOOK = FALSE;
		POSTTASKHOOK = FALSE;
		USERESSCHEDULER = FALSE;
		KERNEL_TYPE = ECC2;
	};
	
   APPMODE TRICORE_CPU {
    EVENT = IFX_OSCFG_EVENT1;
    EVENT = IFX_OSCFG_EVENT2;
    EVENT = IFX_OSCFG_EVENT3;
    TASK = IFX_OSTASK_EVENT1;
    TASK = IFX_OSTASK_EVENT2;
    TASK = IFX_OSTASK_EVENT3;
    TASK = IFX_OSTASK_1MS;
    TASK = IFX_OSTASK_5MS;
    TASK = IFX_OSTASK_10MS;
    TASK = IFX_OSTASK_20MS;
    TASK = IFX_OSTASK_50MS;
    TASK = IFX_OSTASK_100MS;
    TASK = IFX_OSTASK_200MS;
    TASK = IFX_OSTASK_BACKGROUND;
    TASK = IFX_OSTASK_INIT;
    COUNTER = HW_COUNTER;
    ALARM = IFX_OSTASK_ALARM_1MS;
    ALARM = IFX_OSTASK_ALARM_5MS;
    ALARM = IFX_OSTASK_ALARM_10MS;
    ALARM = IFX_OSTASK_ALARM_20MS;
    ALARM = IFX_OSTASK_ALARM_50MS;
    ALARM = IFX_OSTASK_ALARM_100MS;
   };
	
	EVENT IFX_OSCFG_EVENT1 {
		MASK = 0x01;
	};
	
	EVENT IFX_OSCFG_EVENT2 {
		MASK = 0x02;
	};
	
	EVENT IFX_OSCFG_EVENT3 {
		MASK = 0x04;
	};
	
	TASK IFX_OSTASK_EVENT1{ 
		PRIORITY = 64; 
		ACTIVATION = 1;
		AUTOSTART = FALSE;
		EVENT = IFX_OSCFG_EVENT1;
		SCHEDULE = FULL;
		STACK = PRIVATE {
            SYS_SIZE = 256;
        };
	};
	
	TASK IFX_OSTASK_EVENT2{ 
		PRIORITY = 64; 
		ACTIVATION = 1;
		AUTOSTART = FALSE;
		EVENT = IFX_OSCFG_EVENT2;
		SCHEDULE = FULL;
		STACK = PRIVATE {
            SYS_SIZE = 256;
        };
	};
	
	TASK IFX_OSTASK_EVENT3{ 
		PRIORITY = 64; 
		ACTIVATION = 1;
		AUTOSTART = FALSE;
		EVENT = IFX_OSCFG_EVENT3;
		SCHEDULE = FULL;
		STACK = PRIVATE {
            SYS_SIZE = 256;
        };
	};

	TASK IFX_OSTASK_1MS{ 
		PRIORITY = 64; 
		ACTIVATION = 1;
		AUTOSTART = FALSE;
		SCHEDULE = FULL;
		STACK = SHARED;
	};
	
	TASK IFX_OSTASK_5MS{ 
		PRIORITY = 32; 
		ACTIVATION = 1;
		AUTOSTART = FALSE; 
		SCHEDULE = FULL;
		STACK = SHARED;
	};
	
	TASK IFX_OSTASK_10MS{ 
		PRIORITY = 16; 
		ACTIVATION = 1;
		AUTOSTART = FALSE; 
		SCHEDULE = FULL;
		STACK = SHARED;
	};

	TASK IFX_OSTASK_20MS{ 
		PRIORITY = 8; 
		ACTIVATION = 1;
		AUTOSTART = FALSE; 
		SCHEDULE = FULL;
		STACK = SHARED;
	};
	
	TASK IFX_OSTASK_50MS{ 
		PRIORITY = 4; 
		ACTIVATION = 1;
		AUTOSTART = FALSE; 
		SCHEDULE = FULL;
		STACK = SHARED;
	};
	
	TASK IFX_OSTASK_100MS{ 
		PRIORITY = 2; 
		ACTIVATION = 1;
		AUTOSTART = FALSE; 
		SCHEDULE = FULL;
		STACK = SHARED;
	};
	
	TASK IFX_OSTASK_200MS{ 
		PRIORITY = 2; 
		ACTIVATION = 1;
		AUTOSTART = FALSE; 
		SCHEDULE = FULL;
		STACK = SHARED;
	};
	

	TASK IFX_OSTASK_BACKGROUND{ 
		PRIORITY = 1; 
		ACTIVATION = 1;
		AUTOSTART = FALSE; 
		SCHEDULE = FULL;
		STACK = SHARED;
	};
	
	TASK IFX_OSTASK_INIT{ 
		PRIORITY = 2; 
		ACTIVATION = 1;
		AUTOSTART = TRUE { APPMODE = TRICORE_CPU; };
		SCHEDULE = FULL;
		STACK = SHARED;
	};
	
	COUNTER IFX_OSTASK_COUNTER
	{
		MINCYCLE = 5;
		MAXALLOWEDVALUE = 10000;
		TICKSPERBASE = 1;
	};
		
	ALARM IFX_OSTASK_ALARM_1MS
	{
	    ACTION = ACTIVATETASK
	    {
	      TASK = IFX_OSTASK_1MS;
	    };
    	COUNTER = IFX_OSTASK_COUNTER;
    	/* AUTOSTART = TRUE { APPMODE = TRICORE_CPU; CYCLETIME = 10;}; */
  	};
	
	ALARM IFX_OSTASK_ALARM_5MS
	{
	    ACTION = ACTIVATETASK
	    {
	      TASK = IFX_OSTASK_5MS;
	    };
    	COUNTER = IFX_OSTASK_COUNTER;
    	/* AUTOSTART = TRUE { APPMODE = TRICORE_CPU; CYCLETIME = 10;}; */
  	};
  	
	ALARM IFX_OSTASK_ALARM_10MS
	{
	    ACTION = ACTIVATETASK
	    {
	      TASK = IFX_OSTASK_10MS;
	    };
    	COUNTER = IFX_OSTASK_COUNTER;
    	/* AUTOSTART = TRUE { APPMODE = TRICORE_CPU; CYCLETIME = 10;}; */
  	};
  	
 	ALARM IFX_OSTASK_ALARM_20MS
	{
	    ACTION = ACTIVATETASK
	    {
	      TASK = IFX_OSTASK_20MS;
	    };
    	COUNTER = IFX_OSTASK_COUNTER;
    	/* AUTOSTART = TRUE { APPMODE = TRICORE_CPU; CYCLETIME = 10;}; */
  	};
  	
	ALARM IFX_OSTASK_ALARM_50MS
	{
	    ACTION = ACTIVATETASK
	    {
	      TASK = IFX_OSTASK_50MS;
	    };
    	COUNTER = IFX_OSTASK_COUNTER;
    	/* AUTOSTART = TRUE { APPMODE = TRICORE_CPU; CYCLETIME = 10;}; */
  	};
  	
	ALARM IFX_OSTASK_ALARM_100MS
	{
	    ACTION = ACTIVATETASK
	    {
	      TASK = IFX_OSTASK_100MS;
	    };
    	COUNTER = IFX_OSTASK_COUNTER;
    	/* AUTOSTART = TRUE { APPMODE = TRICORE_CPU; CYCLETIME = 10;}; */
  	};
	
	ALARM IFX_OSTASK_ALARM_200MS
	{
	    ACTION = ACTIVATETASK
	    {
	      TASK = IFX_OSTASK_200MS;
	    };
    	COUNTER = IFX_OSTASK_COUNTER;
    	/* AUTOSTART = TRUE { APPMODE = TRICORE_CPU; CYCLETIME = 10;}; */
  	};

};




Then, I modified my oil file to use two of the three cores. The APPSrc is currently not in use as I suspected a problem there, but the build does not finish.

Code: Select all

CPU TC27X { 

	OS IFX_TRICORE { 
	
		MASTER_CPU = "master";
        CPU_DATA = TRICORE {
        	ID = "master";
			//APP_SRC = "OSTASK.c";
            CPU_CLOCK = 200.0;
            COMPILER_TYPE = GNU;
            MULTI_STACK = TRUE {
                IRQ_STACK = TRUE {
                    SYS_SIZE = 256;
                };
           };
        };
        
        CPU_DATA = TRICORE {
            CPU_CLOCK = 200.0;
             	ID = "slave";
			//APP_SRC = "OSTASKS.c";
            COMPILER_TYPE = GNU;
            MULTI_STACK = TRUE {
                IRQ_STACK = TRUE {
                    SYS_SIZE = 256;
                };
           };
        };
		

		MCU_DATA = TRICORE {
        	MODEL = TC27x;
        };
        
        
		STATUS = EXTENDED; 
		PRETASKHOOK = FALSE;
		POSTTASKHOOK = FALSE;
		USERESSCHEDULER = FALSE;
		KERNEL_TYPE = ECC2;
	};
	
   APPMODE TRICORE_CPU {
    TASK = IFX_OSTASK_1MS;
    TASK = IFX_OSTASK_100MS;
    TASK = IFX_OSTASK_BACKGROUND;
    TASK = IFX_OSTASK_INIT;
    COUNTER = HW_COUNTER;
    ALARM = IFX_OSTASK_ALARM_1MS;
    ALARM = IFX_OSTASK_ALARM_100MS;

   };
 
	TASK IFX_OSTASK_1MS{ 
		PRIORITY = 64; 
		ACTIVATION = 1;
		CPU_ID = "master";
		AUTOSTART = FALSE;
		SCHEDULE = FULL;
		STACK = SHARED;
	};
	

	
	TASK IFX_OSTASK_100MS{ 
		PRIORITY = 2; 
		ACTIVATION = 1;
		AUTOSTART = FALSE;
		CPU_ID = "slave"; 
		SCHEDULE = FULL;
		STACK = SHARED;
	};
	

	TASK IFX_OSTASK_BACKGROUND{ 
		PRIORITY = 1; 
		ACTIVATION = 1;
		AUTOSTART = FALSE; 
		CPU_ID = "master";
		SCHEDULE = FULL;
		STACK = SHARED;
	};
	
	TASK IFX_OSTASK_INIT{ 
		PRIORITY = 2; 
		ACTIVATION = 1;
		AUTOSTART = TRUE { APPMODE = TRICORE_CPU; };
		SCHEDULE = FULL;
		CPU_ID = "master";
		STACK = SHARED;
	};
	
	COUNTER IFX_OSTASK_COUNTER
	{
		MINCYCLE = 5;
		MAXALLOWEDVALUE = 10000;
		CPU_ID = "master";
		TICKSPERBASE = 1;
	};
	
COUNTER IFX_OSTASK_COUNTER2
	{
		MINCYCLE = 5;
		MAXALLOWEDVALUE = 10000;
	     CPU_ID = "slave";
		TICKSPERBASE = 1;
	};


	ALARM IFX_OSTASK_ALARM_1MS
	{
	
	    ACTION = ACTIVATETASK
	    {
	      TASK = IFX_OSTASK_1MS;
	    };
	   
 	   COUNTER = IFX_OSTASK_COUNTER;
    	/* AUTOSTART = TRUE { APPMODE = TRICORE_CPU; CYCLETIME = 10;}; */
  	};
	

  	
	ALARM IFX_OSTASK_ALARM_100MS
	{
	    ACTION = ACTIVATETASK
	    {
	      TASK = IFX_OSTASK_100MS;
	    };
    	COUNTER = IFX_OSTASK_COUNTER2;
    	/* AUTOSTART = TRUE { APPMODE = TRICORE_CPU; CYCLETIME = 10;}; */
  	};
	

};

From my understanding, RT-druid should create two instances of the OS. Master and Slave? E.g. files like EECFG.h should be created twice?

When I build it, I get the following problem:

Code: Select all

make oscfg 
make[1]: Entering directory `C:/Users/..../workspaceAURIX/ErikaMulticoreTryout'
Operating system configurations generated ..

[LOAD      1_ToolEnv\0_Build\1_Config\CfgErikaOS.oil]
[WORKING   Prepare configuration's files]
[          Start to save]
[WRITE     2_Out\Gnuc\RT_Druid\master\eecfg.c]
[WRITE     2_Out\Gnuc\RT_Druid\master\eecfg.h]
[WRITE     2_Out\Gnuc\RT_Druid\master\common.c]
[WRITE     2_Out\Gnuc\RT_Druid\makefile]
[WRITE     2_Out\Gnuc\RT_Druid\common.mk]
[WRITE     2_Out\Gnuc\RT_Druid\master\makefile]
[WRITE     2_Out\Gnuc\RT_Druid\slave\eecfg.c]
[WRITE     2_Out\Gnuc\RT_Druid\slave\eecfg.h]
[WRITE     2_Out\Gnuc\RT_Druid\slave\makefile]
cp: cannot stat `2_Out/Gnuc/RT_Druid/eecfg.h': No such file or directory
make[1]: Leaving directory `C:/Users/..../workspaceAURIX/ErikaMulticoreTryout'
make[1]: *** [0_Src/3_OS/Config/eecfg.c] Error 1
make: *** [oscfg] Error 2
10:06:39 Build Finished (took 3s.557ms)
If I create the files 2_Out/Gnuc/RT_Druid/eecfg.h res. eecfg.c manually (just empty files), the build process finishes, but not in the way i want. My question is, why does RTD even try to write an eecfg in addition to the ones created for the master and slave instances? And why is not able to create the file (if neccesary). It is able to create slave/eecfg and master/eecfg.

Every kind of help is highly appreciated.

Kind regards.

nicola.serreli
Jr. Member
Posts: 68
Joined: Mon Aug 02, 2010 10:11 am

Re: AURIX Multicore Configuration OIL

Post by nicola.serreli » Sat Feb 13, 2016 9:30 am

Ciao,
Infineon provided an example for Erika Enterprise which was working fine.
This example is one of those provided with erika sources or is a "custom" one?

I used oscfg as a make target and everything was fine.
I'm not 100% sure that erika sources does not contain this word, but I do not remember it as makefile target.

My question is, why does RTD even try to write an eecfg in addition to the ones created for the master and slave instances?
RT-Druid do not try to create an additional eecfg file. RT-Druid creates only those file listed in the log lines that start with [WRITE.

And why is not able to create the file
If RT-Druid is not able to crate a file, it will show a line that states that problem.


Moreover RT-Druid is a java program, so it will never use 'cp' program to copy a file.

It looks like (to me) that the problem is in the makefile you are using. Probably is a custom makefile tailored for a single core build, that fails when the system is a multicore one.

If you are allowed to post it, we may be able to look at it and search the error. Otherwise, you have to ask to who wrote it.


By the way .. what means
The APPSrc is currently not in use as I suspected a problem there
  • If you use them, does RT-Druid throw an error?
  • The generated master and slave makefiles does not contains the c files listed in the APP_SRC variables?
  • Something else ?

best regads,
Nicola

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re: AURIX Multicore Configuration OIL

Post by paolo.gai » Sat Feb 13, 2016 9:53 am

Hi,

I know that Infineon is providing examples with ERIKA Enterprise in their software releases. I guess the example you took is taken from their distribution of ERIKA Enterprise.

We can only support the examples which are provided on this website. We have no knowledge of what Infineon did on the Kernel and on their examples!!!

I guess the options you have are the following:
- You may want to ask your Infineon FAE for more help about compiling your app configured from their distribution.
- You may want to use the version of ERIKA from this website, and in case you have problems we can help you (either for free in this forum (in our background time), or with a support contract from Evidence)

Btw, we'll be at Embedded World 2016... hall4 stand 545. If you are coming to the fair please stop at our booth I'll be happy to chat!

Ciao,

PJ

flat6
Newbie
Posts: 5
Joined: Fri Feb 12, 2016 7:50 am

Re: AURIX Multicore Configuration OIL

Post by flat6 » Tue Feb 16, 2016 9:50 am

Hello everyone,

thanks for your help. I am now working with the Eclipse environment and makefiles provided directly by your website. It seems that in the infineon example the whole building process was a little bit different.

At the moment I do not know if I make it to the EW or not. If yes, I will certainly stop by.

flat6
Newbie
Posts: 5
Joined: Fri Feb 12, 2016 7:50 am

Re: AURIX Multicore Configuration OIL

Post by flat6 » Tue Feb 16, 2016 3:29 pm

Okay, after I successfully wrote a little single core test to my TC297, I now started with multicore and get a mistake I do not understand. Maybe someone can help me :)

This is the whole output (error in the last 4-5 lines).

Code: Select all

c:\cygwin\bin\bash.exe found!
Using erika files in /cygdrive/c/evidence/eclipse/plugins/COMEUE~4.201/ee_files
make -C master TARGET_NAME=myProject_master CPU_NUMID=0 GLOBAL_LINKSCRIPT=../shared_sym.lsl all
make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
make[1]: Entering directory `/cygdrive/c/Users/../workspaceErika/CanYouDoItMulti/Debug/master'
RM  myProject_master.elf
LD myProject_master.elf
************************************
Compilation terminated successfully!
make[1]: Leaving directory `/cygdrive/c/Users/../workspaceErika/CanYouDoItMulti/Debug/master'
Building shared symbol table shared_sym.lsl
make -C slave TARGET_NAME=myProject_slave CPU_NUMID=1 GLOBAL_LINKSCRIPT=../shared_sym.lsl all
make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
make[1]: Entering directory `/cygdrive/c/Users/../workspaceErika/CanYouDoItMulti/Debug/slave'
RM  myProject_slave.elf
CC    ee_tc2Yx_cstart.c
C:\evidence\eclipse\plugins\COMEUE~4.201\ee_files\pkg\mcu\infineon_common_tc2Yx\src\ee_tc2Yx_cstart.c: In function 'EE_tc2Yx_cpu1_start':
C:\evidence\eclipse\plugins\COMEUE~4.201\ee_files\pkg\mcu\infineon_common_tc2Yx\src\ee_tc2Yx_cstart.c:570:20: error: 'EE_tc_cpu1_IRQ_tos' undeclared (first use in this function)
C:\evidence\eclipse\plugins\COMEUE~4.201\ee_files\pkg\mcu\infineon_common_tc2Yx\src\ee_tc2Yx_cstart.c:570:20: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [obj/pkg/mcu/infineon_common_tc2Yx/src/ee_tc2Yx_cstart.o] Error 1
make[1]: Leaving directory `/cygdrive/c/Users/../workspaceErika/CanYouDoItMulti/Debug/slave'
make: *** [CPU1-all] Error 2
Master seems to work fine.

I do not understand why it is in the "standard-files" provided by EE? Maybe my Oil-configuration is wrong?

This is my OIL:

Code: Select all

CPU TC27X { 

	OS EAEA_ERIKA_OS { 
	
	CFLAGS =  "-I ../../include/McHal/Tricore";
	CFLAGS =  "-I ../../include/McHal/Tricore/_Reg";
	CFLAGS =  "-I ../../include/McHal";
	CFLAGS =  "-I ../../include/SrvSw";
	CFLAGS =  "-I ../../include/AppSw/Config/Common";

    EE_OPT = "EE_DEBUG";
    EE_OPT = "EE_EXECUTE_FROM_RAM";
    EE_OPT = "EE_SAVE_TEMP_FILES";
    //EE_OPT = "EE_MM_OPT";
    EE_OPT = "EE_ICACHE_ENABLED";
    EE_OPT = "EE_DCACHE_ENABLED";


		MCU_DATA = TRICORE {
        	MODEL = TC27x;
        };
        
        
        MASTER_CPU = "master";
            
        CPU_DATA = TRICORE {
        	ID = "master";
            CPU_CLOCK = 200.0;
            APP_SRC ="include/McHal/Tricore/Scu/Std/IfxScuWdt.c";
            APP_SRC ="include/McHal/Tricore/Port/Std/IfxPort.c";
         	APP_SRC ="include/McHal/Tricore/Scu/Std/IfxScuCcu.c";
         	APP_SRC ="include/McHal/Tricore/Stm/Std/IfxStm.c";
        	APP_SRC ="include/McHal/Tricore/_Impl/IfxStm_cfg.c";
            APP_SRC = "master.c";
            COMPILER_TYPE = GNU;
            MULTI_STACK = TRUE {
                IRQ_STACK = TRUE {
                    SYS_SIZE = 256;
                };
           };
        };
        
        CPU_DATA = TRICORE {
      		ID = "slave";
      		APP_SRC = "slave.c";
      		MULTI_STACK = TRUE;
      		SYS_STACK_SIZE = 256;
      		COMPILER_TYPE = GNU;
    	};
        
		STATUS = EXTENDED; 
		PRETASKHOOK = FALSE;
		POSTTASKHOOK = FALSE;
		USERESSCHEDULER = FALSE;
		KERNEL_TYPE = ECC2;
	};
	
   APPMODE EAEA_EVAL_SYSTEM {
	   TASK = EVAL_OSTASK_100MS;
	   TASK = EVAL_OSTASK_200MS;
	   TASK = EVAL_OSTASK_BACKGROUND;
	   TASK = EVAL_OSTASK_INIT;
	   COUNTER = HW_COUNTER;
	   COUNTER = IFX_OSTASK_COUNTER;
	   COUNTER = system_timer;
	   COUNTER = system_timer_slave;
	   ALARM = AlarmMaster_100ms;
	   ALARM = AlarmSlave_200ms;
   };
	


	 COUNTER system_timer {
	    MINCYCLE = 1;
	    CPU_ID = "master";
	    MAXALLOWEDVALUE = 2147483647;
	    TICKSPERBASE = 1;
	    TYPE = HARDWARE {
	      DEVICE = "STM_SR0";
	      SYSTEM_TIMER = TRUE;
	      PRIORITY = 2;
	    };
	    SECONDSPERTICK = 0.001;
	  };
	  
	 COUNTER system_timer_slave {
	
	    MINCYCLE = 1;
	    CPU_ID = "slave";
	    MAXALLOWEDVALUE = 2147483647;
	    TICKSPERBASE = 1;
	    TYPE = HARDWARE {
	      DEVICE = "STM_SR0";
	      SYSTEM_TIMER = TRUE;
	      PRIORITY = 2;
	    };
	    SECONDSPERTICK = 0.001;
	  };
  
	  ALARM AlarmMaster_100ms {
	    COUNTER = system_timer;
	    ACTION = ACTIVATETASK { TASK = EVAL_OSTASK_100MS; };
	    AUTOSTART = TRUE { ALARMTIME = 100; CYCLETIME = 100; };
	  };
	  
	  ALARM AlamSlave_200ms {
	    COUNTER = system_timer_slave;
	    ACTION = ACTIVATETASK { TASK = EVAL_OSTASK_200MS; };
	    AUTOSTART = TRUE { ALARMTIME = 200; CYCLETIME = 100; };
	  };

	TASK EVAL_OSTASK_100MS{ 
		PRIORITY = 4; 
		CPU_ID = "master";
		ACTIVATION = 1;
		AUTOSTART = FALSE; 
		SCHEDULE = FULL;
		STACK = SHARED;
	};
	
	
	TASK EVAL_OSTASK_200MS{ 
		PRIORITY = 2; 
		CPU_ID = "slave";
		ACTIVATION = 1;
		AUTOSTART = FALSE; 
		SCHEDULE = FULL;
		STACK = SHARED;
	};
	

	TASK EVAL_OSTASK_BACKGROUND{ 
		CPU_ID = "master";
		PRIORITY = 1; 
		ACTIVATION = 1;
		AUTOSTART = FALSE; 
		SCHEDULE = FULL;
		STACK = SHARED;
	};
	
	TASK EVAL_OSTASK_INIT{ 
		PRIORITY = 2; 
		CPU_ID = "master";
		ACTIVATION = 1;
		AUTOSTART = TRUE { APPMODE = EAEA_EVAL_SYSTEM; };
		SCHEDULE = FULL;
		STACK = SHARED;
	};
		
};

And this is Slave.c

Code: Select all

/* ###*B*###
 * ERIKA Enterprise - a tiny RTOS for small microcontrollers
 *
 * Copyright (C) 2002-2012  Evidence Srl
 *
 * This file is part of ERIKA Enterprise.
 *
 * ERIKA Enterprise is free software; you can redistribute it
 * and/or modify it under the terms of the GNU General Public License
 * version 2 as published by the Free Software Foundation, 
 * (with a special exception described below).
 *
 * Linking this code statically or dynamically with other modules is
 * making a combined work based on this code.  Thus, the terms and
 * conditions of the GNU General Public License cover the whole
 * combination.
 *
 * As a special exception, the copyright holders of this library give you
 * permission to link this code with independent modules to produce an
 * executable, regardless of the license terms of these independent
 * modules, and to copy and distribute the resulting executable under
 * terms of your choice, provided that you also meet, for each linked
 * independent module, the terms and conditions of the license of that
 * module.  An independent module is a module which is not derived from
 * or based on this library.  If you modify this code, you may extend
 * this exception to your version of the code, but you are not
 * obligated to do so.  If you do not wish to do so, delete this
 * exception statement from your version.
 *
 * ERIKA Enterprise is distributed in the hope that it will be
 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License version 2 for more details.
 *
 * You should have received a copy of the GNU General Public License
 * version 2 along with ERIKA Enterprise; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301 USA.
 * ###*E*### */

/*
 * Copyright (C) 2002-2012 Paolo Gai
 */

#include "ee.h"
#include "ee_irq.h"
#include "include/McHal/Tricore/Port/Std/IfxPort.h"
#include "include/McHal/Tricore/_Reg/IfxStm_reg.h"
#include "include/McHal/Tricore/Stm/Std/IfxStm.h"

#define OS_TICK_IN_SECONDS (0.0001) // Original 0.1 ms


volatile unsigned int ERROR_FLAG = 0;
volatile int led_status = 0;
volatile int myErrorCounter;

DeclareTask(EVAL_OSTASK_200MS);

int ledActive = 0;
TASK(EVAL_OSTASK_200MS) {

	{
		if (Ifx_OSTask_100ms_Count % 100 == 0) {
			meineVariable++;
		}

		// Heartbeat LED:
		if (ledActive == 1) {
			ledActive = 0;
			IfxPort_setPinState(0xF003D300u, 7,IfxPort_State_high);
		} else {
			IfxPort_setPinState(0xF003D300u, 7,IfxPort_State_low);
		}
		ledActive++;
	}
	TerminateTask();
}


/* MAIN */
int main(void)
{
  StartOS(DONOTCARE);
  return 0;
}


flat6
Newbie
Posts: 5
Joined: Fri Feb 12, 2016 7:50 am

Re: AURIX Multicore Configuration OIL

Post by flat6 » Fri Feb 19, 2016 10:16 am

I solved all problems, and Erika is now running fine on all cores of my TC297 :)

As it might be interested for other "newbies" like me:

The last problem was related to the IRQ-Stack in the OIL-File.

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re: AURIX Multicore Configuration OIL

Post by paolo.gai » Sat Feb 20, 2016 7:42 am

I'm really happy it works fine!

Btw, will you pass by Embedded World next week? we'll have a booth there and I'll be there Tue/Wed!

Ciao,

Paolo

flat6
Newbie
Posts: 5
Joined: Fri Feb 12, 2016 7:50 am

Re: AURIX Multicore Configuration OIL

Post by flat6 » Thu Feb 25, 2016 1:55 pm

Hello Paolo,

I am sorry, I did not make it to the embedded world this year, maybe next year :)

I have another question, I know it is not directly Erika related, but maybe you can help me.

Is there a solution to flash the three elf-files created by Erika permanently to a AURIX microcontroller with Lauterbach Trace32? It is no problem to the test the application by using data.load.elf for the respective core, but my standard flashing methods do not work. From the Lauterbach scripts provided by Erika I can see that you had some issues about that as well. (Comments says "this solution does not work, neither this does work, does not work in multicore, etc.". Have you found a solution so far?

Ciao,

Andre

e.guidieri
Full Member
Posts: 166
Joined: Tue May 10, 2011 2:05 pm

Re: AURIX Multicore Configuration OIL

Post by e.guidieri » Thu Feb 25, 2016 3:28 pm

Our scripts work with supported platform if you are having problem is tied to the fact that you are using an unsupported platform.

http://erika.tuxfamily.org/wiki/index.p ... neon_Aurix

Errico

Post Reply