ARM Cortex RX
From ErikaWiki
Contents |
Page under construction!
ARM Cortex RX support
The Cortex R4 support includes:
- support for Texas Instruments compiler toolchain
- support for single stack configurations
- ISR Type 1 and Type 2 supported;
- Supported IDEs:
- Texas Instruments Code Composer Studio (Cortex R4)
- 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
- The MCUs currently supported are the following:
- Hercules TMS570 MCUs (Cortex R4)
Boards
- The boards currently supported are the following:
- Keil MCBTMS570 (Cortex R4)
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).
- Open the menu Help - Install New Software.
- Click Add...
- Click Local...
- Select Disco locale (C:) -> Keil -> Eclipse and Click OK.
- Fill "Name:" (Keil MDK-ARM) and Click OK.
- Enable "Keil MDK-ARM", Disable "Contact all update sites during install to find required software" and Click Next.
- On the next screen, Click Finish.
- And finally Click Restart Now.
- On a successful installation, Eclipse displays a menu µVision and µVision icons in the toolbar.
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).
- Open the menu File - New - RT-Druid Oil and C/C++ Project.
- Fill "Project name:" (EEApp) and Click Finish.
- Write conf.oil file with
EE_OPT = "__NO_APP__"
attibute inOS
object and NOAPP_SRC
attibutes inCPU_DATA
object. - conf.oil file used here can be found in examples/cortex_mx/lm4f232xxxx/EElib0/conf.oil
- Open the menu Project, check that "Build Automatically" is not selected and press "Build Project".
- Finally stand-alone libee.a is built in Debug directory.
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.
- Open the menu Project - New uVision Project...
- Select project folder, fill "File name:" (KEEApp) then Click Save.
- Select Device (Texas Instruments LM4F232H5DQ) and Click OK.
- In the next dialog click No because Erika provides its own startup code.
- Rename the target (TI Stellaris LM4F232H5QD) and sources group (EE).
- Right Click on source group EE and select "Add Files to Group 'EE'".
- Select libee.a built previously, Click Add and then Close.
- Click on added libee.a.
- Open the menu Project - Options for File 'libee.a'...
- Change "File Type:" from "Assembly language file" to "Library file" and Click OK.
- 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
- Add in the gourp 'src' the application source file (E.g. main.c).
- main.c file used here can be found in examples/cortex_mx/lm4f232xxxx/EElib0/main.c
- 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".
- In the C/C++ tab Click "Include Paths" button "...".
- Adds Erika Enterprise and eecfg include paths for the application and click OK.
- In the Asm tab adds Erika Enterprise and eecfg include paths for the application (see above) and adds "--cpreproc" in "Misc Controls" input box.
- In the Linker tab adds "--entry EE_cortex_mx_default_reset_ISR --first EE_cortex_mx_vtable" in "Misc Controls" input box.
- Open the menu Project - Build target
- Open the menu Debug - Start/Stop 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
- Tutorial: Installing ERIKA and RT-Druid, and compile your first application
- Tutorial: RT-Druid and OIL basics
- NXP Semiconductor - Microcontrollers (LPCXpresso) - Web site
- Texas Instruments - Stellaris LM4F232 USB+CAN Evaluation Kits - Web site
- IAR Systems Web site
- Keil Embedded Development Tools Web site