ChibiOS/RT Logo ChibiOS/RT

Architecture - Reference Manual - Guides

ARM7TDMI
[Ports]

Collaboration diagram for ARM7TDMI:


Description

The ARM7 architecture is quite complex for a microcontroller and some explanations are required about the port choices.

The ARM7 modes

The ARM7 port supports three modes:

Mapping of the System States in the ARM7 port

The ChibiOS/RT logical System States are mapped as follow in the ARM7 port:

The ARM7 modes

The ARM7 port makes some assumptions on the application code organization:

ARM7 Interrupt Handlers

ARM7 Interrupt handlers do not save function-saved registers so you need to make sure your code saves them or does not use them (this happens because in the ARM7 port all the OS interrupt handler functions are declared naked).
Function-trashed registers (R0-R3, R12, LR, SR) are saved/restored by the system macros CH_IRQ_PROLOGUE() and CH_IRQ_EPILOGUE().
The easiest way to ensure this is to just invoke a normal function from within the interrupt handler, the function code will save all the required registers.
Example:

 CH_IRQ_HANDLER(irq_handler) {
   CH_IRQ_PROLOGUE();

   serve_interrupt();

   VICVectAddr = 0; // This is LPC214x-specific.
   CH_IRQ_EPILOGUE();
 }

This is not a bug but an implementation choice, this solution allows to have interrupt handlers compiled in thumb mode without have to use an interworking mode (the mode switch is hidden in the macros), this greatly improves code efficiency and size. You can look at the serial driver for real examples of interrupt handlers.

Modules

 Configuration Options
 

ARM7 specific configuration options.


 Core Port Implementation
 

ARM7 specific port code, structures and macros.


 Startup Support
 

ARM7 startup code support.


 AT91SAM7 Support
 

AT91SAM7 specific support.


 LPC214x Support
 

LPC214x specific support.



Generated on Sun Jul 11 13:13:18 2010 for ChibiOS/RT by doxygen 1.6.3