ChibiOS/RT
2.6.0
chcore.h File Reference

Detailed Description

ARM7/9 architecture port macros and structures.

Definition in file ports/GCC/ARM/chcore.h.

#include "armparams.h"

Go to the source code of this file.

Data Structures

struct  extctx
 Interrupt saved context. More...
struct  intctx
 System saved context. More...
struct  context
 Platform dependent part of the Thread structure. More...

Functions

void port_halt (void)
void _port_thread_start (void)
 Start a thread by invoking its work function.

Defines

#define ARM_CORE_ARM7TDMI   7
#define ARM_CORE_ARM9   9
#define ARM_ENABLE_WFI_IDLE   FALSE
 If enabled allows the idle thread to enter a low power mode.
#define CH_ARCHITECTURE_ARM
 Macro defining a generic ARM architecture.
#define CH_ARCHITECTURE_ARMx
 Macro defining the specific ARM architecture.
#define CH_ARCHITECTURE_NAME   "ARMx"
 Name of the implemented architecture.
#define CH_CORE_VARIANT_NAME   "ARMxy"
 Name of the architecture variant (optional).
#define CH_PORT_INFO   "ARM|THUMB|Interworking"
 Port-specific information string.
#define CH_PORT_INFO   "Pure ARM mode"
 Port-specific information string.
#define CH_COMPILER_NAME   "GCC " __VERSION__
 Name of the compiler supported by this port.
#define SETUP_CONTEXT(workspace, wsize, pf, arg)
 Platform dependent part of the chThdCreateI() API.
#define PORT_IDLE_THREAD_STACK_SIZE   4
 Stack size for the system idle thread.
#define PORT_INT_REQUIRED_STACK   0x10
 Per-thread stack overhead for interrupts servicing.
#define STACK_ALIGN(n)   ((((n) - 1) | (sizeof(stkalign_t) - 1)) + 1)
 Enforces a correct alignment for a stack area size value.
#define THD_WA_SIZE(n)
 Computes the thread working area global size.
#define WORKING_AREA(s, n)   stkalign_t s[THD_WA_SIZE(n) / sizeof(stkalign_t)]
 Static working area allocation.
#define PORT_IRQ_PROLOGUE()
 IRQ prologue code.
#define PORT_IRQ_EPILOGUE()
 IRQ epilogue code.
#define PORT_IRQ_HANDLER(id)   __attribute__((naked)) void id(void)
 IRQ handler function declaration.
#define PORT_FAST_IRQ_HANDLER(id)   __attribute__((interrupt("FIQ"))) void id(void)
 Fast IRQ handler function declaration.
#define port_init()
 Port-related initialization code.
#define port_lock()   asm volatile ("msr CPSR_c, #0x9F" : : : "memory")
 Kernel-lock action.
#define port_unlock()   asm volatile ("msr CPSR_c, #0x1F" : : : "memory")
 Kernel-unlock action.
#define port_lock_from_isr()
 Kernel-lock action from an interrupt handler.
#define port_unlock_from_isr()
 Kernel-unlock action from an interrupt handler.
#define port_disable()
 Disables all the interrupt sources.
#define port_suspend()   asm volatile ("msr CPSR_c, #0x9F" : : : "memory")
 Disables the interrupt sources below kernel-level priority.
#define port_enable()   asm volatile ("msr CPSR_c, #0x1F" : : : "memory")
 Enables all the interrupt sources.
#define port_switch(ntp, otp)   _port_switch_arm(ntp, otp)
 Performs a context switch between two threads.

Typedefs

typedef uint32_t stkalign_t
 32 bits stack and memory alignment enforcement.
typedef void * regarm_t
 Generic ARM register.