Binding Manual

Contents

Development Tools

Compiler

Iinterrupt Level Philosophy

Supported Reference Platforms

Building and Using Projects

> Getting Started

> General Organization

Development Tools

The RTXC software development environment is the IAR Embedded Workbench, and employs the IAR tool chain including the compiler, assembler, linker, and debugger.

Compiler

All distributed RTXC C source code has been compiled using the IAR compiler and uses some IAR extensions (eg. __arm, __noinit, __fiq) for optimal performance.

Interrupt Level Philosophy

By default, all RTXC tasks begin execution with the interrupts (IRQ and FIQ) enabled. When a task makes a kernel call, the kernel remains fully interruptible except for those critical regions where interrupts (IRQ) are temporarily masked. The FIQ interrupts are not masked by RTXC.

The FIQ interrupts can be masked by RTXC when the TOTAL_FIQ_CONTROL option is used. This option causes the kernel to globally mask the FIQ or F bit in the CPSR. The state of the F bit, on or off, can be modified at the task level by calling either clear_SVCFIQbit() and set_SVCFIQbit(), respectively. . The Nulltask in rtxcmain.c calls one of these two functions depending on the #define status of INIT_FIQ_ON constant found in the rtxcopts.h module. NOTE, the clear_SVCFIQbit() and set_SVCFIQbit() functions should only be called only from the task level and not called until after the application has been switched to the SVC mode. This global mask preserves the F bit status in the CPSR across modes and tasks.

During critical regions in the kernel, the kernel masks interrupts (IRQ) briefly, performs the critical operation and then restores the processor to the state that existed prior to masking interrupts. Interrupts that interrupt the kernel may in turn also be interrupted by other interrupts.

A task or interrupt handler may use interrupt control macros, DISABLE and ENABLE, (defined in .\rtxc\include\enable.h) to briefly mask IRQ interrupts for whatever purpose. The user should be aware that if a task, task A, masks interrupts and then makes a kernel call which causes a context switch to task B, then interrupts are enabled to that of the new task.

Supported Reference Platforms

All software in the RTXC distribution has been qualified on the Evaluator-7T and CSB337 Evaluation Boards. Below is a summary of the features of the reference platform:

Evaluator-7T using Macraigor OCD Wiggler.

> - 50 MHz
> - Timers 1 and 2- interrupt driven, default 10 ms
> - Serial port - USER COM0 used as console (9600-N-1).
> - Example FIQ handler
> - 7 Segment Led Driver

CSB337 using J-Link USB.

> - 180 MHz
> - Timer 1 - interrupt driven, default 10 ms
> - Serial port - Serial 1 used as console (38400-N-8-1).
> - LED Driver for both upper and lower LED2 and upper LED1 (GPIO port B pins 0-2).

Building and Using Projects

Getting Started

The user should be familiar with the IAR Embedded Workbench.

General Organization

Under the Examples directory in the RTXC Quadros distribution, there are two directories, Quadros_dm (Dual Mode) and Quadros_ss (Single Stack). These each contain a Projects subdirectory, containing the top-level workspace files called Quadros_dm.eww and Quadros_Ss.eww The workspace files contain program projects for each supported reference platform. Each of these program projects contains two nodes, one for pure ARM mode and one for interworking with Thumb mode.

The files in the Source\MsApi subdirectory are provided for convenience, but are not essential. The Source\Kernel subdirectory contains a file, Rtxcapi.c, that has the same code as the MsApi files. For this binding, compiling the Rtxcapi.c file is faster than compiling all the separate files, so you may remove the MSapi folder if you so desire.