ARM Cortex MX

From ErikaWiki

(Difference between revisions)
Jump to: navigation, search
(AUTOSAR Drivers)
(Examples)
Line 178: Line 178:
* The examples and tests are available in this folders:
* The examples and tests are available in this folders:
-
** [http://svn.tuxfamily.org/viewvc.cgi/erika_erikae/repos/ee/trunk/ee/examples/cortex_mx/lpc12xx NXP LPC12xx examples] (Cortex M0)
+
** [http://svn.tuxfamily.org/viewvc.cgi/erika_erikae/repos/ee/trunk/ee/examples/cortex_mx/lpc12xx examples/cortex_mx/lpc12xx]: NXP LPCXpresso LPC12xx examples (Cortex M0)
-
** [http://svn.tuxfamily.org/viewvc.cgi/erika_erikae/repos/ee/trunk/ee/examples/cortex_mx/lm4f232xxxx  Texas Instruments Stellaris LM4F232xxxx examples] (Cortex M4)
+
** [http://svn.tuxfamily.org/viewvc.cgi/erika_erikae/repos/ee/trunk/ee/examples/cortex_mx/lm4f232xxxx  examples/cortex_mx/lm4f232xxxx]: Texas Instruments Stellaris LM4F232xxxx examples (Cortex M4)
= See also =
= See also =

Revision as of 14:42, 26 January 2012

Contents

ARM Cortex MX support

ERIKA Enterprise supports ARM Cortex MX microcontrollers. The support for RT-Druid is now available.

The Cortex M0 support includes:

  1. support for IAR and Keil ARM Compilers;
  2. support for single and multi stack configurations;
  3. ISR Type 1 and Type 2 supported;
  4. support for IAR J-Link and Keil ULINK2 Debuggers.

The Cortex M4 support includes:

  1. support for Texas Instruments TMS470 and Keil ARM Compilers;
  2. support for single and multi stack configurations;
  3. ISR Type 1 and Type 2 supported;
  4. support for Texas Instruments Stellaris ICDI and Keil ULINK2 Debuggers.
  • Supported IDEs:
    • IAR Embedded Workbench. (Cortex M0)
    • Texas Instruments Code Composer Studio. (Cortex M4)
    • Keil uVision. (Cortex M0 and Cortex M4)
  • 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 HAL: Every task can have its private stack, or it can share it with other tasks.

MCUs

  • The MCUs currently supported are the following:
    • NXP LPC12xx. (Cortex M0)
    • Texas Instruments Stellaris LM4F232xxxx. (Cortex M4)

Boards

  • The boards currently supported are the following:
    • NXP LPCXpresso LPC1227 demo board. (Cortex M0)
    • Texas Instruments Stellaris LM4F232H5QD evaluation board. (Cortex M4)
  • List of functions:
    • Currently the NXP LPCXpresso demo board (Cortex M0) is supported through the CMSIS library.
    • Currently the Texas Instruments Stellaris LM4F232H5QD (Cortex M4) evaluation board is supported through AUTOSAR Drivers.

Choosing compiler

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

  • environment var:
    • IAR compiler: the IAR_CCDIR variable is able to override the path compiler set in RT-Druid during the build progress.
    • Texas Instruments TMS40 compiler: CCS_INSTALL_ROOT variable is able to override the path compiler set in RT-Druid during the build progress.
    • Keil ARM compiler: ARM_ROOT variable is able to override the path compiler set in RT-Druid during the build progress.
  • configuration file:
    • command line versions of RT-Druid accept a configuration file, usually located at configuration/common_oil.pref.
      This file is in the java properties format (i.e. each line is composed by keyword=value).
      The keyword preference_cortex_m0__path_for_cc_compiler can be used to set the compiler path for Cortex MX.
  • gui:
    • inside eclipse preferences, it is possible to set the path of Cortex MX complier

Download and install

RT-Druid and Erika Enterprise RTOS (version 1.6.0), for Microsoft Windows, 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.

Libraries

CMSIS OIL file configuration

To enable CMSIS Library with NPX LPCXpresso LPC1227 demo board, the following code is needed in the OS object of the OSEK/VDX configuration:

 EE_OPT = "__ADD_LIBS__";
 LIB = ENABLE {
   NAME = "CMSIS";
 };
 EE_OPT = "__USE_LPC12XX_CMSIS_V2__";

It's possible to include all library functions by EE_OPT attribute in the OS object of the OSEK/VDX configuration:

 EE_OPT = "__USE_CMSIS_ALL__";

It's possibile to include ONLY selected library modules functions by EE_OPT attributes in the OS object of the OSEK/VDX configuration:

 EE_OPT = "__USE_CMSIS_SYSCTRL__";
 EE_OPT = "__USE_CMSIS_GPIO__";
 EE_OPT = "__USE_CMSIS_IOCON__";
 ...

AUTOSAR Drivers

To enable AUTOSAR Drivers with Texas Instruments Stellaris LM4F232H5QD evaluation board and Keil ARM compiler, the following EE_OPT attribute is needed in the OS object of the OSEK/VDX configuration:

 EE_OPT = "__AUTOSAR_R4_0__";

AUTOSAR Drivers need to be configured by C header compiler file (Compiler_Cfg.h). These file (for now) needs to be manually written.
Template of these file can be found in contrib/as/arch/stellaris/config/.

The configuration C header compiler file inclusion is done by CFLAGS attribute in the OS object of the OSEK/VDX configuration:

 CFLAGS = "-I<PATH>";

Where <PATH> is the absolute or relative directory path which configuration C header compiler file is stored.

Note: Each AUTOSAR Driver must be enabled individually.

AUTOSAR MCU Driver

To enable AUTOSAR MCU Driver for Texas Instruments Stellaris LM4F232H5QD evaluation board and Keil ARM compiler, the following EE_OPT attribute is needed in the OS object of the OSEK/VDX configuration:

 EE_OPT = "__AS_MCU_DRIVER__";

The AUTOSAR MCU Driver needs to be configured by C header and source files (Mcu_Cfg.h and Mcu_Cfg.c). These files (for now) need to be manually written.
Templates of these files can be found in contrib/as/arch/stellaris/config/.

The configuration C header file inclusion is done by CFLAGS attribute in the OS object of the OSEK/VDX configuration:

 CFLAGS = "-I<PATH>";

Where <PATH> is the absolute or relative directory path which configuration C header file is stored.

Instead the configurations C source file is added to the compilation process by APP_SRC attribute in the CPU_DATA object of the OSEK/VDX configuration:

 APP_SRC = "<PATH>/Mcu_Cfg.c";

Where <PATH> is the absolute or relative directory path which configuration C source file is stored.

AUTOSAR PORT Driver

To enable AUTOSAR PORT Driver for Texas Instruments Stellaris LM4F232H5QD evaluation board and Keil ARM compiler, the following EE_OPT attribute is needed in the OS object of the OSEK/VDX configuration:

 EE_OPT = "__AS_PORT_DRIVER__";

The AUTOSAR PORT Driver needs to be configured by C header and source files (Port_Cfg.h and Port_Cfg.c). These files (for now) need to be manually written.
Templates of these files can be found in contrib/as/arch/stellaris/config/.

The configuration C header file inclusion is done by CFLAGS attribute in the OS object of the OSEK/VDX configuration:

 CFLAGS = "-I<PATH>";

Where <PATH> is the absolute or relative directory path which configuration C header file is stored.

Instead the configurations C source file is added to the compilation process by APP_SRC attribute in the CPU_DATA object of the OSEK/VDX configuration:

 APP_SRC = "<PATH>/Port_Cfg.c";

Where <PATH> is the absolute or relative directory path which configuration C source file is stored.

AUTOSAR DIO Driver

To enable AUTOSAR DIO Driver for Texas Instruments Stellaris LM4F232H5QD evaluation board and Keil ARM compiler, the following EE_OPT attribute is needed in the OS object of the OSEK/VDX configuration:

 EE_OPT = "__AS_DIO_DRIVER__";

The AUTOSAR DIO Driver needs to be configured by C header and source files (Dio_Cfg.h and Dio_Cfg.c). These files (for now) need to be manually written.
Templates of these files can be found in contrib/as/arch/stellaris/config/.

The configuration C header file inclusion is done by CFLAGS attribute in the OS object of the OSEK/VDX configuration:

 CFLAGS = "-I<PATH>";

Where <PATH> is the absolute or relative directory path which configuration C header file is stored.

Instead the configurations C source file is added to the compilation process by APP_SRC attribute in the CPU_DATA object of the OSEK/VDX configuration:

 APP_SRC = "<PATH>/Dio_Cfg.c";

Where <PATH> is the absolute or relative directory path which configuration C source file is stored.

Examples

See also

Personal tools