RT-Druid multi-processing support

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Post Reply
srl100
Newbie
Posts: 15
Joined: Thu May 20, 2010 2:07 pm

RT-Druid multi-processing support

Post by srl100 » Tue Jun 01, 2010 5:49 pm

I've managed to run the PIC30 console demo on MPLAB's simulator, and now want to check out the multi-processing configuration support in RT-Druid (This is just a proof-of-concept step before porting to a Linux test harness - I don't actually have a multi-core PIC30!).

I added MASTER_CPU, ID and CPU_ID lines to my PIC30 OIL file as shown below:

Code: Select all

CPU mySystem {

	OS myOs {
		EE_OPT = "DEBUG";
		EE_OPT = "VERBOSE";
		
		MASTER_CPU = "cpu0";

		CPU_DATA = PIC30 {
		    ID = "cpu0";
			APP_SRC = "code.c";
			MULTI_STACK = FALSE;
			ICD2 = TRUE;
		};

        CPU_DATA = PIC30 {
            ID = "cpu1";
            APP_SRC = "code_cpu1.c";
            MULTI_STACK = FALSE;
            ICD2 = TRUE;
        };

		MCU_DATA = PIC30 {
			MODEL = PIC33FJ256MC710;
		};
		
		BOARD_DATA = EE_FLEX {
			USELEDS = TRUE;
			TYPE = DEMO {
				OPTIONS = ALL;
			};
		};
		
		KERNEL_TYPE = FP;

		EE_OPT = "__ADD_LIBS__";
		LIB = ENABLE {
			NAME = "CONSOLE";
		};	
		EE_OPT = "USE_CONSOLE";
		EE_OPT = "USE_CONSOLE_SERIAL";
		EE_OPT = "__USE_UART__";
		
	};

	COUNTER myCounter {
	   CPU_ID = "cpu0";
	};
	
	ALARM AlarmSend {
		COUNTER = "myCounter";
		ACTION = ACTIVATETASK { TASK = "TaskSend"; };
	};
	
	TASK TaskSend {
	    CPU_ID = "cpu0";
		PRIORITY = 1;
		STACK = SHARED;
		SCHEDULE = FULL;
	};
};
When I build the project I get the following error:

Code: Select all

C:\ERIKA\Debug\make_launcher.bat all 
C:\cygwin\bin\bash found!
make: *** No rule to make target `all'.  Stop.
What is suspicious is that the RT-Druid output doesn't show any per-CPU subdirectories when populating the make - is that right?

Code: Select all

Rebuild /pic30_console_demp/conf.oil in the project pic30_console_demp
Compute configuration's files


Check and fill folder /pic30_console_demp/Debug
	/pic30_console_demp/Debug/subdir.mk	OK (overwritten)
	/pic30_console_demp/Debug/eecfg.c	OK (overwritten)
	/pic30_console_demp/Debug/eecfg.h	OK (overwritten)
	/pic30_console_demp/Debug/cpu.mk	OK (overwritten)
	/pic30_console_demp/Debug/makefile	OK (overwritten)
	/pic30_console_demp/Debug/common.mk	OK (overwritten)
	/pic30_console_demp/Debug/subdir.mk	OK (overwritten)
	/pic30_console_demp/Debug/eecfg.c	OK (overwritten)
	/pic30_console_demp/Debug/eecfg.h	OK (overwritten)
	/pic30_console_demp/Debug/cpu.mk	OK (overwritten)
Check and fill folder pic30_console_demp/Debug
	pic30_console_demp/Debug/make_launcher.bat	OK (overwritten)

Good, it's all ok.
I was expecting to see a couple of subdirectories created at the very least (cpu0, cpu1)!

Any ideas?

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

Re: RT-Druid multi-processing support

Post by paolo.gai » Tue Jun 01, 2010 8:17 pm

Hi!

The only multicore configuration supported so far is Altera Nios II, working only on Nios Ii version 8.1.

There are currently no Multicore PICs on the market (I guess the situation will stay the same for some time...). There qill be other multicore support by the end of the year I guess, but i cannot say anything more than that right now.

The result you got are probably a mixture of single core pic30 and multicore Nios Ii... a soup that will not work for sure :-)

I'll ask Nicola to add an error check on that...

Ciao,

PJ

akimo
Newbie
Posts: 3
Joined: Thu Oct 14, 2010 1:31 pm

Re: RT-Druid multi-processing support

Post by akimo » Thu Oct 14, 2010 1:33 pm

I just wondered whether there has been any movement on this topic in the meantime. Specifically I am interested in a multicore version for the ARM branch.

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

Re: RT-Druid multi-processing support

Post by paolo.gai » Thu Oct 14, 2010 1:52 pm

Hi!

Yes, there are some news. We are going to provide support soon (probably the first months of 2011 for a dual-core PPC used in Automotive.

No news so far on ARM (we do have an MPCORE ARM11 here in Evidence, but there has not been any request so far from our customers, and we do not have boards using multicore ARM so far).

Are you planning to support multicore ARM for some project?

Ciao,

PJ

akimo
Newbie
Posts: 3
Joined: Thu Oct 14, 2010 1:31 pm

Re: RT-Druid multi-processing support

Post by akimo » Thu Oct 14, 2010 3:46 pm

I was thinking about it, but implementing Erika for multicores does not seem to be possible in the given time frame. We are planning some experiments on timing predictability of embedded multicores, and there are two possibilities for the OS support:

* Each singlecore runs an Erika instance independently (from private memory, mapped to the appropriate memory addresses)
* A single Erika controls all cores

The first version of course does not result in a real multicore system, but rather in a range of systems running in parallel on the same hardware. This is sufficient in our scenario. We planned to use ARM7 instead of ARM11, because ARM7 is more predictable (no branch-prediction, etc). Therefore it should be possible to have solution 1 running with the current Erika ARM support, if I am not missing any point?

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

Re: RT-Druid multi-processing support

Post by paolo.gai » Thu Oct 14, 2010 7:56 pm

Hi!

Yes, it could be possible to use the ARM7 porting to run the system on multiple cores... In fact, ERIKA started on a dual-core for automotive systems named Janus (that was a longtime ago... year 2002!)

What is the MCU you are targeting? Or are you using UniBo MPARM to simulate it? (I'm not aware of any multicore using ARM7)...

About the two options: ERIKA uses a partitioned approach, which is typical of many asymmetric multicores. The Altera Nios II porting does exactly what you are looking for, which is 1 ELF file for each core, interprocessor interrupts, spin locks, and cache disabling. I guess that could be a good starting point.

My suggestion could be that you could start downloading the Altera suite V. 8.1, install the package, and try to compile the examples.

Once done, you should try to replicate the same environment and directory structure for your project, using the latest version of ERIKA taken from the SVN trunk (the Altera build is currently not aligned to the trunk).

Then, if the directory structure is simple, we could integrate it with RT-Druid...

I hope this helps...

PJ

akimo
Newbie
Posts: 3
Joined: Thu Oct 14, 2010 1:31 pm

Re: RT-Druid multi-processing support

Post by akimo » Fri Oct 15, 2010 1:01 pm

Thanks for the hint with the altera sources. I'll take a look at that. I will be using a simulator indeed, most probably not MPARM, but the Comet Simulator or perhaps GNU-Arm. Nevertheless, the MPARM MCU should work for me. I just tested a simple example and it seems to work with the GNU-Arm compiler / simulator. I will first take a closer look at the Erika sources and documentation and keep you informed about the progress.

Btw, is there some way to get email notifications when new answers arrive in the forum? I could not find a notification settings page in the "User Control Panel" at the top left of the forum pages.

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

Re: RT-Druid multi-processing support

Post by paolo.gai » Sun Oct 17, 2010 6:19 pm

Thanks for your message... take a look at the code, and tell us if there is something which is not clear.

It would be also nice if, by using the tool, you could record some impressions and notes about the MPARM port. In fact, we are lacking information about the port for MPARM...

About the forum: when you post a reply, check the checkbox "Notify me when a reply is posted" in the "Options" tab below the "Submit" button...

Ciao,

PJ

Post Reply