ARM Cortex RX

From ErikaWiki

Revision as of 13:20, 10 November 2014 by Chris Kreuzberger (Talk | contribs)
Jump to: navigation, search

Contents

Page under construction!

ARM Cortex RX support

The Cortex R4 support includes:

  1. support for Texas Instruments compiler toolchain
  2. support for single stack configurations
  3. ISR Type 1 and Type 2 supported;



  • 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.

MCUs

Boards

  • The boards currently supported are the following:

Download and install

RT-Druid and ERIKA Enterprise RTOS

RT-Druid and ERIKA Enterprise RTOS can be freely downloaded from the following web address: http://erika.tuxfamily.org/drupal/download.html

Toolchain: Code Composer Studio

The toolchain and Debugger can be downloaded from the following web address: http://processors.wiki.ti.com/index.php/Download_CCS
Note that CCSv6 is recommended.
To tell ERIKA where to find the compiler, the sysem variable CCS_INSTALL_ROOT has to be set to the compiler path:
CCS_INSTALL_ROOT = C:\ti\ccsv6

Flasher: TI Uniflash

The flashing utility can be downloaded from the following page:>br> http://processors.wiki.ti.com/index.php/Category:CCS_UniFlash It is recommended to use the same installation path as the toolchain (C:\ti\)

HAL Code Generator: HALCoGen

Currently the whole MCU is configured via a GUI from Texas Instruments. The software can be downloaded from http://www.ti.com/tool/halcogen .


Target Configuration and Programming

ERIKA Enterprise is configured through RT-Druid and an OIL file

CPU

CPU_DATA must be set to CORTEX_RX.
The exact model is specified with the MODEL item ( R4 for Cortex R4).
The compiler is specificed with the COMPILER_TYPE item (supported values are CCS for R4).
Example of a CPU_DATA section:

 CPU_DATA = CORTEX_RX {
   MODEL = R4;
   APP_SRC = "code.c";
   COMPILER_TYPE = CCS;
   MULTI_STACK = FALSE;
 };

MCU

MCU_DATA must be set to TI for Keil MCBTMS570.
The only item supported is MODEL, which can be either TMS570 for TI.
Example of a MCU_DATA section:

   MCU_DATA = TI {
     MODEL = TMS570;
   };

Interrupt Handling

TODO: Add Support of OIL-File Interrupt Handling. Currently the Interrupts are handled via the HALCoGen tool.


OSEK/VDX Extensions

This Section contains information about the OSEK/VDX Extensions (or optional features) that have been implemented for the ARM Cortex RX support.

Resource Managament at ISR level

Not yet implemented.

System Timer

Not yet implemented.


Examples

  • The examples and tests are available in this folders:
    • [1]: TI TMS570 Development Board (Cortex R4) examples.


KEIL uVision and RT-Druid Eclipse

MDK-ARM Plug-in Configuration

KEIL uVision sopport an Eclipse plu-in called MDK-ARM Plug-in.
The MDK-ARM Plug-in components have the default installation path C:\Keil\Eclipse.
No additional software is required. However, the MDK-ARM Plug-in must be configured for the Eclipse environment.

  • Launch Eclipse and define a workspace (default workspace can be accepted).
Eclipse Workspace Selection Dialog.
  • Open the menu Help - Install New Software.
Eclipse New Software Installation.
  • Click Add...
Eclipse Software Repository Install Dialog.
  • Click Local...
Eclipse Local Software Repository Selection Dialog.
  • Select Disco locale (C:) -> Keil -> Eclipse and Click OK.
Eclipse Local Software Repository Folder Selection Dialog.
  • Fill "Name:" (Keil MDK-ARM) and Click OK.
Eclipse Local Software Repository Selection Dialog.
  • Enable "Keil MDK-ARM", Disable "Contact all update sites during install to find required software" and Click Next.
Eclipse Software Repository Install Dialog.
  • On the next screen, Click Finish.
Eclipse Software Installation Details Dialog.
  • And finally Click Restart Now.
Eclipse Software Installation Details Dialog.
  • On a successful installation, Eclipse displays a menu µVision and µVision icons in the toolbar.
Eclipse New Software Installation.

To Debug an application see "MDK-ARM Plugin for Eclipse" in Keil uVision Help.

Building stand-alone libee.a using RT-Druid Eclipse

  • Launch Eclipse and define a workspace (default workspace can be accepted).
Eclipse Workspace Selection Dialog.
  • Open the menu File - New - RT-Druid Oil and C/C++ Project.
RT-Druid Oil and C/C++ Project Menu Selection.
  • Fill "Project name:" (EEApp) and Click Finish.
C Project Setting-up.
Application Oil file writing.
  • Open the menu Project, check that "Build Automatically" is not selected and press "Build Project".
Application Building.
  • Finally stand-alone libee.a is built in Debug directory.
Application Build Finished.

Building ERIKA based application using KEIL uVision

To build an ERIKA based application using KEIL uVision, it needs that a stand-alone libee.a was built previously. See ARM Cortex MX#Building stand-alone libee.a using RT-Druid Eclipse above.

  • Launch Keil uVision.
Keil uVision Main Window.
  • Open the menu Project - New uVision Project...
Keil uVision New Project Selection.
  • Select project folder, fill "File name:" (KEEApp) then Click Save.
Keil uVision New Project Creation.
  • Select Device (Texas Instruments LM4F232H5DQ) and Click OK.
Keil uVision Device Selection.
  • In the next dialog click No because Erika provides its own startup code.
Keil uVision Device Selection.
  • Rename the target (TI Stellaris LM4F232H5QD) and sources group (EE).
Keil uVision Device Selection.
  • Right Click on source group EE and select "Add Files to Group 'EE'".
  • Select libee.a built previously, Click Add and then Close.
Keil uVision "Add Files to Group 'EE'".
  • Click on added libee.a.
  • Open the menu Project - Options for File 'libee.a'...
Keil uVision "Options for File 'libee.a'...".
  • Change "File Type:" from "Assembly language file" to "Library file" and Click OK.
Keil uVision "Options for File 'libee.a'...".
  • Right Click on "TI Stellaris LM4F232H5QD" target and select "Add Group...".
  • Rename the added group to "src".
  • Add in the group 'src' the startup assembly file for TI Stellaris LM4F232H5QD provided with Erika Enterprise pkg/mcu/ti_stellaris_lm4f232xxxx/src/ee_startup_keil.s
Keil uVision Startup File.
Keil uVision Application Source File.
  • Right Click on "TI Stellaris LM4F232H5QD" target and select "Options for Target 'TI Stellaris LM4F232H5QD'..."
  • In the Target tab change "Floating Point Hardware:" from "Use FPU" to "Not Used".
Keil uVision Taget Setup.
  • In the C/C++ tab Click "Include Paths" button "...".
Keil uVision C/C++ Setup.
  • Adds Erika Enterprise and eecfg include paths for the application and click OK.
Keil uVision Include Path Folder Setup.
  • In the Asm tab adds Erika Enterprise and eecfg include paths for the application (see above) and adds "--cpreproc" in "Misc Controls" input box.
Keil uVision Assembly Setup.
  • In the Linker tab adds "--entry EE_cortex_mx_default_reset_ISR --first EE_cortex_mx_vtable" in "Misc Controls" input box.
Keil uVision Linker Setup.
  • Open the menu Project - Build target
Keil uVision Build Target.
  • Open the menu Debug - Start/Stop Debug Session
Keil uVision Debug Session.

Benchmarks

We run a limited set of benchmarks for the kernel, which are available at the page Erika Enterprise Benchmark for Cortex M4. Other benchmarks are available on the Category:Benchmarks.

See also

Personal tools