Port to POSIX test harness

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

Port to POSIX test harness

Post by srl100 » Thu May 20, 2010 2:31 pm

Hi All.

I was thinking of porting Erika Enterprise to a POSIX-based test harness, mostly as a way of learning about the OS.

I realise that I would have to add support for this new CPU to the OS - I've got a vague notion of using longjmp/setjmp to handle context switching, maybe.

The big problem I can envisage is configuring the OS...since this is not a "CPU" currently supported by RT-Druid I would need to attack the problem in one of two ways:
* Add support for a new CPU type to RT-Druid
or:
* Bypass RT-Druid and configure the OS directly

It seems that RT-Druid is lagging the OS by a couple of chips (tricore and s12), so my questions are:

* Is there any way of using RT-Druid with a "generic" CPU to get a basic OS configuration that could then be manually targeted at my specific CPU?
* Is there any documentation of what the OS configuration items are (e.g. what are the required elements of eecfg.h and eecfg.c, what are the valid EEOPT values)?

Thanks for any help.

Steve.

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

Re: Port to POSIX test harness

Post by paolo.gai » Fri May 28, 2010 8:17 am

Hi!

We recently wrote some documentation on the wiki about how to port the kernel to new CPUs.

The support for S12 and Tricore *is* available... it's in the updates we released as separate plugins! did you have problems in using them?

About porting to a new CPU (which one are you considering?), take a look (and update if you wish) the wiki page
http://erika.tuxfamily.org/wiki/index.p ... controller

RT-Druid is not needed in the first steps. Once you got an architecture working, just send us the configuration files, and we will work to integrate it into RT-Druid. Note that the RT-Druid code generator will be released open soon under the EPL... we are just flooded and we do not get the time to update everything... Moreover, Christian and Nicola are working on a modification of the code generator with config files based on XSLT, which should simplify the addition of new CPUs...

about the documentation on the data structures: I wrote the ERIKA Educational manual a few years ago, which contained many informations. The code has changed a bit, but the manual is still a good idea about the general system architecture. The idea is to move it to the wiki too... soon or later I'll find the time to do that...

If you need help in the porting, please send specific questions, and we'll try to answer them the best we can...

Finally... ERIKA has an API more similar to OSEK/VDX than to POSIX... are you going to implement a POSIX pthread library for the system?

Ciao,

PJ

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

Re: Port to POSIX test harness

Post by srl100 » Fri May 28, 2010 12:24 pm

Hi!

We recently wrote some documentation on the wiki about how to port the kernel to new CPUs.

The support for S12 and Tricore *is* available... it's in the updates we released as separate plugins! did you have problems in using them?
I can see S12, but not Tricore - am I looking in the wrong place?

Code: Select all

Index of /erika/webdownload/rtdruid_updates/plugins/
Name	Last Modified	Size	Type
Parent Directory/	 	-  	Directory
com.eu.evidence.ee.templates.avr_1.5.1.201003011152.jar	2010-Mar-01 13:07:04	27.3K	application/java-archive
com.eu.evidence.ee.templates.dspic_1.5.1.201003011152.jar	2010-Mar-01 13:07:10	492.6K	application/java-archive
com.eu.evidence.ee.templates.s12_1.5.1.201003011152.jar	2010-Mar-01 13:07:26	527.9K	application/java-archive
com.eu.evidence.ee_1.5.1.201003011152.jar	2010-Mar-01 13:06:58	2.7M	application/java-archive
com.eu.evidence.rtdruid.core.ui_1.5.1.201003011152.jar	2010-Mar-01 13:03:38	68.9K	application/java-archive
com.eu.evidence.rtdruid.core_1.5.1.201003011152.jar	2010-Mar-01 13:03:30	485.9K	application/java-archive
com.eu.evidence.rtdruid.oil.arm.core_1.5.1.201003011152.jar	2010-Mar-01 13:04:36	25.2K	application/java-archive
com.eu.evidence.rtdruid.oil.arm.ui_1.5.1.201003011152.jar	2010-Mar-01 13:04:40	6.7K	application/java-archive
com.eu.evidence.rtdruid.oil.avr.core_1.5.1.201003011152.jar	2010-Mar-01 13:04:46	20.8K	application/java-archive
com.eu.evidence.rtdruid.oil.avr.ui_1.5.1.201003011152.jar	2010-Mar-01 13:04:54	60.2K	application/java-archive
com.eu.evidence.rtdruid.oil.cdt.ui_1.5.1.201003011152.jar	2010-Mar-01 13:04:16	63.0K	application/java-archive
com.eu.evidence.rtdruid.oil.core_1.5.1.201003011152.jar	2010-Mar-01 13:03:54	245.7K	application/java-archive
com.eu.evidence.rtdruid.oil.dspic.core_1.5.1.201003011152.jar	2010-Mar-01 13:05:00	39.2K	application/java-archive
com.eu.evidence.rtdruid.oil.dspic.ui_1.5.1.201003011152.jar	2010-Mar-01 13:05:06	13.2K	application/java-archive
com.eu.evidence.rtdruid.oil.ee.core_1.5.1.201003011152.jar	2010-Mar-01 13:04:24	86.7K	application/java-archive
com.eu.evidence.rtdruid.oil.ee.ui_1.5.1.201003011152.jar	2010-Mar-01 13:04:30	11.9K	application/java-archive
com.eu.evidence.rtdruid.oil.fp_edf.core_1.5.1.201003011152.jar	2010-Mar-01 13:05:14	25.1K	application/java-archive
com.eu.evidence.rtdruid.oil.frsh.core_1.5.1.201003011152.jar	2010-Mar-01 13:05:20	32.7K	application/java-archive
com.eu.evidence.rtdruid.oil.mico32.core_1.5.1.201003011152.jar	2010-Mar-01 13:06:00	21.9K	application/java-archive
com.eu.evidence.rtdruid.oil.nios2.core_1.5.1.201003011152.jar	2010-Mar-01 13:05:36	20.0K	application/java-archive
com.eu.evidence.rtdruid.oil.osek.core_1.5.1.201003011152.jar	2010-Mar-01 13:05:28	31.2K	application/java-archive
com.eu.evidence.rtdruid.oil.ppc.core_1.5.1.201003011152.jar	2010-Mar-01 13:05:40	13.9K	application/java-archive
com.eu.evidence.rtdruid.oil.s12.core_1.5.1.201003011152.jar	2010-Mar-01 13:05:48	23.9K	application/java-archive
com.eu.evidence.rtdruid.oil.s12.ui_1.5.1.201003011152.jar	2010-Mar-01 13:05:54	6.8K	application/java-archive
com.eu.evidence.rtdruid.oil.ui_1.5.1.201003011152.jar	2010-Mar-01 13:04:06	55.1K	application/java-archive
com.eu.evidence.templates.core_1.5.1.201003011152.jar	2010-Mar-01 13:03:42	26.8K	application/java-archive
About porting to a new CPU (which one are you considering?),
I am considering porting to a test harness running in the userspace of Linux - more of that later in this post...
RT-Druid is not needed in the first steps. Once you got an architecture working,
There's the point - I want to know what I have to put in eecfg.{ch} to configure the kernel, as part of testing whether the port is working.
just send us the configuration files, and we will work to integrate it into RT-Druid.
Thanks for the offer.
Finally... ERIKA has an API more similar to OSEK/VDX than to POSIX... are you going to implement a POSIX pthread library for the system?
Maybe I was unclear - I want to learn about the OSEK/VDX-like API by running the ERIKA kernel in a POSIX process:

Code: Select all

+-----------------+
+ VDX application +
+-----------------+
+  ERIKA kernel   +
+-----------------+
+  POSIX process  +
+-----------------+
+  Linux kernel   |
+-----------------+

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

Re: Port to POSIX test harness

Post by paolo.gai » Sat May 29, 2010 11:25 am

Hi!

srl100 wrote: I can see S12, but not Tricore - am I looking in the wrong place?
Hmm... probably Nicola forgot to upload the plugins... the latest "development" build has been uploaded to

http://retis.sssup.it/~durin/rtd_150/site/plugins/

I'll talk to Nicola in a way to put "nigtly builds" online :-)

About porting to a new CPU (which one are you considering?),
I am considering porting to a test harness running in the userspace of Linux - more of that later in this post...
Ok, now I understand... Nice!!! there is currently no port for x86 inside a linux process... that would be really nice for sure!

RT-Druid is not needed in the first steps. Once you got an architecture working,
There's the point - I want to know what I have to put in eecfg.{ch} to configure the kernel, as part of testing whether the port is working.
To know what to put in the eecfg.h and eecfg.c, the best thing is to start from an existing project. take for example the "FLEX/Simple periodic task" example for pic30. It will generate a set of files (makefile, eecfg.c, eecfg.h) which contains a first step to go.

The exact content of what has to be in the files generated by rt-druid depends on the kind of cpu/kernel pair selected for generation. typically the .h files in the CPU and KERNEL directory contains a commented list of the data structures that have to be present together with their initialization values...

Moreover, did you check
http://erika.tuxfamily.org/wiki/index.p ... controller
We tried to write there all steps needed to do a porting...

let me know if this info are ok, and if you need more help on that!

Bte, we are also organizing a summer school in Pisa half of June... if you are in Italy that could be a nice occasion to know each other!

Ciao,

PJ

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

Re: Port to POSIX test harness

Post by paolo.gai » Sun May 30, 2010 10:14 pm

Just a quick addition:

I have just updated the Download webpage with a "Nightly build" location where you can download the latest plugins...

http://download.tuxfamily.org/erika/web ... druid_beta

Ciao,

PJ

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

Re: Port to POSIX test harness

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

Thanks - I've updated RT-Druid from the "Nightly Build" site and can now see the support for the new CPUs.

I've got a couple more questions, but will start a new thread for them.

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

Re: Port to POSIX test harness

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

Good! I'm happy it worked out.

We'll post probably some other revision around the Summer school in Pisa Mid June...

Ciao,

PJ

Post Reply