X86

From ErikaWiki

Revision as of 10:35, 29 July 2014 by Pj (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

temporary page as a skeleton for x86 support

x86 support

ERIKA Enterprise supports the x86 platforms. The support for RT-Druid is not yet available.

The x86 support includes:

  1. support for XXX compiler toolchains;
  2. support for single and multi stack configurations;
  3. ISR Type 1 and Type 2 supported;
  4. support for XXX Debuggers.
  5. support for XXX execution environment (QEMU/...)
  • Supported IDEs:
    • RT-Druid IDE
  • Mode of operation:
    • Mono-stack: The Monostack configuration of the ERIKA Kernel models the fact that all tasks and ISRs in the system share the same stack.
    • Multi-stack: Every task can have its private stack, or it can share it with other tasks.

Download and install

RT-Druid and ERIKA Enterprise RTOS can be freely downloaded from the following web address:

Once downloaded, extract all the files contained in it and copy the folder named eclipse in your preferred directory on your PC (a recommended path is: C:\Evidence\). Now, launch the program by double-clicking on the executable eclipse.exeinside the C:\Evidence\eclipse folder and choose the path of your workspace. The workspace is the default working directory in which the projects will be created.

If you want to download only a selected revision of the kernel, open the Cygwin shell and get an anonymous SVN checkout typing this command:

 svn co svn://svn.tuxfamily.org/svnroot/erika/erikae/repos/ee/trunk/ee -r number_of_revision

Note: Cygwin can be downloaded from this web site: http://www.cygwin.com/. To use SVN, the Cygwin SVN package must to be installed using the Cygwin Setup utility.

The Cortex MX plug-in for Eclipse is part of the official distribution of RT-Druid.


How to run a simple demo on the Virtual Machine

(give a small description on how to compile on the VM we distribute (could be te simplest way to run a demo)

Target Configuration and Programming

Compiler Path

It is possible to choose the path of the compiler in three different ways:


CPU

CPU_DATA must be set to X86.
The exact model is specified with the MODEL item (supported values are M0 for Cortex M0 and M4 for Cortex M4).
The compiler is specificed with the COMPILER_TYPE item (supported values are IAR and KEIL for M0 model and CCS and KEIL for M4).
Example of a CPU_DATA section:

 CPU_DATA = CORTEX_MX {
   MODEL = M4;
   APP_SRC = "code.c";
   COMPILER_TYPE = KEIL;
   MULTI_STACK = TRUE {
     IRQ_STACK = TRUE {
       SYS_SIZE=512;
     };
   };
 };

MCU

MCU_DATA must be set to XXX.
The only item supported is MODEL, which can be either LPC12xx ... .
Example of a MCU_DATA section:

 MCU_DATA = STELLARIS {
   MODEL = LM4F232xxxx;
 };

Interrupt Handling

Interrupts in ERIKA are handled...

To define each ISR an ISR object is needed to be added in the CPU object of the OSEK/VDX configuration:

 ISR <SYMBOL> {
   CATEGORY = <ISR_TYPE>;
   ENTRY = "<ENTRY>";
 };

Where <ISR_TYPE> is the type of the ISR (1 or 2), <SYMBOL> is the symbol that must be the parameter of ISR<ISR_TYPE>() ISR signature, and <ENTRY> is the fixed Interrupt Vector Table Entry identifier.

Boards

(say somethug about QEMU)


OSEK/VDX Extensions

This Section contains information about the OSEK/VDX Extensions (or optional features) that have been implemented for the ARM Cortex MX support. All of these features are not yet implemented in Cortex M0 (NXP LPCXpresso LPC12xx MCU) porting of ERIKA Enterprise.

Resource Managament at ISR level

This feauture is automatically enabled by RT-Druid during the configuration generation step. To specify that a Resource is used by both a Task and a ISR you need to add that respource to the corrisponding ISR object as follows:

 TASK Task1 {
   ...
   RESOURCE = "ResourceA";
 };
 
 ISR <SYMBOL> {
   PRIORITY = <PRIORITY_LEVEL>;
   CATEGORY = <ISR_TYPE>;
   ENTRY = "<ENTRY>";
   RESOURCE = "ResourceA";
 };
 
 RESOURCE ResourceA { RESOURCEPROPERTY = STANDARD; };

System Timer

The OSEK/VDX standard provides support for a System Counter (a counter that is automatically linked to hardware timers). The System Timer is used to give a coherent timing reference across the entire application.

In ERIKA Enterprise, this special counter has been named System Timer. To use it, you need to set a specific attribute in a Counter definition. Please note that only one counter can be the System Timer.

A Counter which is not a System Counter must be incremented manually using the primitive IncrementCounter.

The following is an example OIL definition for a System Counter:

 CPU_DATA = CORTEX_MX {
   CPU_CLOCK = 16.0;
   ...
 };
 
  COUNTER SystemTimer {
   MINCYCLE = 1;
   MAXALLOWEDVALUE = 2147483647;
   TICKSPERBASE = 1;
   TYPE = HARDWARE {
     DEVICE = "SYSTICK";
     SYSTEM_TIMER = TRUE;
   };
   SECONDSPERTICK = 0.001;
 };

The meaning of the various attributes is as follows:

  • CPU_DATA/CPU_CLOCK is used to declare the clock frequency (in MHZ)
  • COUNTER/TYPE must be set to "HARDWARE", and SYSTEM_TIMER must be set to true.
  • COUNTER/TYPE/DEVICE must be a valid device that can be used for a system timer. Currently, for Cortex ARM MX only "SYSTICK" is a valid device for system timer.
  • SECONDSPERTICK is used to declare the wanted time duration of one hardware tick in seconds.

The System Timer can be attached to ALARMs as usual, as in the following example:

 ALARM AlarmExample {
   COUNTER = SystemTimer;
   ACTION  = ACTIVATETASK{
      TASK = TaskExample;
   };
 };

Benchmarks

(probably none for now)

Personal tools