/* rtxcopts.h - lo level RTXC Kernel compile time options */ /* * RTXC Quadros Version 1.0 * Copyright (c) 1999-2003 * Quadros Systems, Inc. * ALL RIGHTS RESERVED * * THE INFORMATION HEREIN IS CONFIDENTIAL AND PROPRIETARY. * UNAUTHORIZED DISCLOSURE OR DISTRIBUTION IS PROHIBITED. */ /* * modification history * * wld 04-feb-2003 added HAS_GLOBALPPL support - under test * wld 20-feb-2003 moved HAS_GLOBALPPL to RTXCgen domain * wld 20-feb-2003 removed HAS_CSF from system (required now) * wld 13-apr-2003 added MCF5272/MCF5282 & MAC/EMAC config error detection * */ #ifndef _RTXCOPTS_H /* { */ #define _RTXCOPTS_H #pragma explicit_zero_data on /* avoid "const int i = 0" mapping to .bss */ #include "koptions.h" #undef HAS_READABLE_VBR /* MCF5272/82 VBR not readable (see GetVBR.c) */ #undef KWS_GLOBAL /* works OK but generates larger code size (ONCHIP KWS use) */ #define HAS_MULTIPLE_RTXCINIT /* define iff multiple sysprops */ /* Metrowerks specific size_t anti-redefinition handling */ #if !defined(__size_t__) && !defined(_MSL_SIZE_T_DEFINED) /* { */ #define __size_t__ #define _MSL_SIZE_T_DEFINED typedef unsigned long size_t; #endif /* } __size_t__ || _MSL_SIZE_T_DEFINED */ #if defined(HAS_MAC_SUPPORT) && defined(HAS_EMAC_SUPPORT) /* { */ #error "Configuration Error - Both MAC_SUPPORT and EMAC_SUPPORT are DEFINED in RTXCgen" #endif /* } HAS_MAC_SUPPORT && HAS_EMAC_SUPPORT */ #if defined(HAS_EMAC_SUPPORT) && defined(HAS_MCF5272) /* { */ #error "Configuration Error - EMAC_SUPPORT and MCF5272 are DEFINED in RTXCgen" #endif /* } HAS_EMAC_SUPPORT && HAS_MCF5272 */ #if defined(HAS_MAC_SUPPORT) && defined(HAS_MCF5282) /* { */ #error "Configuration Error - MAC_SUPPORT and MCF5282 are DEFINED in RTXCgen" #endif /* } HAS_MAC_SUPPORT && HAS_MCF5282 */ /************************************************************************ ONLY_SUPERVISOR_TASKS If defined, assumes all tasks execute in supervisor mode. User services for writing/reading the system IRQ level can be handle by assembly function setintlv() and in-line C macro which access the system IRQ level variable. For application's writing/reading the system IRQ level there is a speed increase and code size decrease. NOTE: If defined all user services which change the MCU mode (supervisor/ user) are not compiled. Any references to these services will result in an undefined symbol/function compilation error. ***********************************************************************/ #undef ONLY_SUPERVISOR_TASKS /* define as needed */ /* NOTE: ONLY_SUPERVISOR_TASKS MUST be #defined for RTXCss only system to allow for access to KS_UserService equivalent services */ #undef ONLY_SUPERVISOR_TASKS /* force OFF */ #define ONLY_SUPERVISOR_TASKS /* now force ON to avoid redefinition */ /************************************************************************ INLINE_MACRO_EXPANSION option The INLINE_MACRO_EXPANSION option allows for selecting expansion of various C macros used in the kernel as inline C code versus function calls. The inline code is typically faster than the alternative (explicit function calls). The penalty for using macro expansion is that the RTXC kernel object code is slightly larger. The size should only be a concern in small microcontroller or extremely ROM-limited environments. ***********************************************************************/ #define INLINE_MACRO_EXPANSION /* select #define or #undef */ /************************************************************************ RTXC call model specification The next macros define how RTXC shall handle the kernel's Trap vector ISR exceptions. All macros have a corresponding assembly definition in rtxcopts.inc. Below is description of each: RTXC_VECTOR: This defines the trap exception vector used for Kernel calls. ***********************************************************************/ #define VECTOR_BASED /* CALL_BASED NOT SUPPORTED for ColdFire */ #define RTXC_VECTOR (32+TRAP_NO) /* TRAP vector (Vector 32-47 = TRAP 0-15) */ /************************************************************************ RTXC Task's startup execution state specification The next macros define status register bits for supervisor/user mode, a task's initial startup state, and the minimum and maximum IRQ ceilings for tasks and the kernel. Only the last two may be changed by the user. Changes to any of the others ISR exceptions. Below is description of each: SUPVMODE: Status register (SR) bit setting for supervisor mode. SR_TO: Task's initial startup state. All tasks are started in supervisor mode. Once a task has begun execution it may change its mode to user and vice-versa using UKS_UserMode() and UKS_SupvMode().. Once a task has begun execution it can change its level via the user system call UKS_SetIRQLev(). (see rtxcuapi.c). FR_TO: A task's startup format word definition NOTE: If a task changes only its IRQ mask level via a "MOVE #newSR,SR", DISABLE or ENABLE macros, any kernel calls made will be executed at the level assigned the system via the UKS_SetIRQLevel(). For example, the system level is 0 and a task sets its level to 7. Then any kernel calls (KS_xxxx) will execute at the current system level 0, thereby opening up a window such that any or all interrupts occurring during the execution of system call will be processed. Furthermore, the processing of interrupts during this time may result in task context switch. A task is guaranteed that the kernel call has been completed before the context switch. It is not guaranteed that control will be returned to the task before making a context switch to another task. RTXC_LEVEL: RTXC's IRQ ceiling. All kernel/user system calls will raise the IRQ level to this setting during execution of critical code areas. Applications which need a very low latency for a specific device can set this value to less than the device's IRQ level and write a "private" exception handler for the device. The device exception must never make a kernel call (i.e. KS_ISRxxxxx) and the IRQ level of the device must be greater or equal to RTXC_LEVEL. ***********************************************************************/ #define SUPVMODE 0x2000 /* Do NOT change */ #define USERMODE 0x0000 /* Do NOT change */ #define SR_T0 (SUPVMODE) /* Do NOT change */ /* note: 0x4000 assumes a 4-byte aligned stack */ #define FR_T0 (0x4000 | (RTXC_VECTOR * 4)) /* Do NOT change */ /***********************************************************************/ /***********************************************************************/ /* SANITY CHECKS FOLLOW - DO NOT CHANGE */ /***********************************************************************/ #ifdef HAS_Threads /* { */ #define HAS_INIT_LevelClassProp /* internal use only */ #define HAS_TS_DefLevelProp /* internal use only */ #endif /* } HAS_Threads */ #if defined(HAS_KernelTraceMode) || defined(HAS_SystemTraceMode) /* { */ #define HAS_TraceMode #endif /* } HAS_KernelTraceMode || HAS_SystemTraceMode */ /* * Check if all classes defined */ #if defined(HAS_Tasks) || defined(HAS_Semaphores) || defined(HAS_Mailboxes) || \ defined(HAS_Partitions) || defined(HAS_Queues) || defined(HAS_Mutexes) || \ defined(HAS_Threads) || defined(HAS_Pipes) || defined(HAS_EventSources) || \ defined(HAS_Counters) || defined(HAS_Alarms) || defined(HAS_Exceptions) /* { */ #define HAS_AllClasses #endif /* } */ #if defined(HAS_TaskDiagnosticMode) || defined(HAS_SemaphoreDiagnosticMode) || \ defined(HAS_QueueDiagnosticMode) || defined(HAS_PartitionDiagnosticMode) || \ defined(HAS_MutexDiagnosticMode) || defined(HAS_MailboxDiagnosticMode) || \ defined(HAS_ThreadDiagnosticMode) || defined(HAS_PipeDiagnosticMode) || \ defined(HAS_EventSourceDiagnosticMode) || defined(HAS_CounterDiagnosticMode) || \ defined(HAS_AlarmDiagnosticMode) || defined(HAS_ExceptionDiagnosticMode) /* { */ #define HAS_DiagnosticMode #ifdef HAS_Dynamics /* { */ #define HAS_DynamicDiagnosticMode #endif /* } HAS_Dynamics */ #endif /* } ? HAS_[Class]DiagnosticMode */ #if defined(HAS_TaskTraceMode) || defined(HAS_SemaphoreTraceMode) || \ defined(HAS_QueueTraceMode) || defined(HAS_PartitionTraceMode) || \ defined(HAS_MutexTraceMode) || defined(HAS_MailboxTraceMode) || \ defined(HAS_ThreadTraceMode) || defined(HAS_PipeTraceMode) || \ defined(HAS_EventSourceTraceMode) || defined(HAS_CounterTraceMode) || \ defined(HAS_AlarmTraceMode) || defined(HAS_ExceptionTraceMode) /* { */ #define HAS_TraceMode #endif /* } ? HAS_[Class]DiagnosticMode */ /* ** Check If Lookup Object is Defined ** */ #if defined(HAS_KS_LookupTask) || defined(HAS_KS_LookupSema) || \ defined(HAS_KS_LookupQueue) || defined(HAS_KS_LookupPart) || \ defined(HAS_KS_LookupMutx) || defined(HAS_KS_LookupMbox) || \ defined(HAS_KS_LookupThread) || defined(HAS_KS_LookupPipe) || \ defined(HAS_KS_LookupEventSource) || defined(HAS_KS_LookupCounter) || \ defined(HAS_KS_LookupAlarm) || defined(HAS_KS_LookupException) /* { */ #define HAS_LookupObject #endif /* } ? HAS_KS_Lookup[Class] */ #if defined(HAS_KS_TestSemaW) || defined(HAS_KS_TestSemaT) /* { */ #define HAS_TestSemaWaiters #endif /* } HAS_KS_TestSemaW || HAS_KS_TestSemaT */ #if defined(HAS_KS_TestSemaMW) || defined(HAS_KS_TestSemaMT) /* { */ #define HAS_TestSemaMWaiters #endif /* } HAS_KS_TestSemaMW || HAS_KS_TestSemaMT */ #if defined(HAS_KS_SendMsgW) || defined(HAS_KS_SendMsgT) /* { */ #define HAS_SendMsgWaiters #endif /* } HAS_KS_SendMsgW || HAS_KS_SendMsgT */ #if defined(HAS_KS_ReceiveMsgW) || defined(HAS_KS_ReceiveMsgT) /* { */ #define HAS_ReceiveMsgWaiters #endif /* } HAS_KS_ReceiveMsgW || HAS_KS_ReceiveMsgT */ #if defined(HAS_KS_PutQueueDataW) || defined(HAS_KS_PutQueueDataT) /* { */ #define HAS_PutQueueWaiters #endif /* } HAS_KS_PutQueueDataW || HAS_KS_PutQueueDataT */ #if defined(HAS_KS_GetQueueDataW) || defined(HAS_KS_GetQueueDataT) /* { */ #define HAS_GetQueueWaiters #endif /* } HAS_KS_GetQueueDataW || HAS_KS_GetQueueDataT */ #if defined(HAS_KS_TestAckW) || defined(HAS_KS_TestAckT) /* { */ #define HAS_TestAckWaiters #endif /* } HAS_KS_TestAckW || HAS_KS_TestAckT */ #if defined(HAS_KS_AllocBlkW) || defined(HAS_KS_AllocBlkT) /* { */ #define HAS_AllocBlkWaiters #endif /* } HAS_KS_AllocBlkW || HAS_KS_AllocBlkT */ #if defined(HAS_KS_TestMutxW) || defined(HAS_KS_TestMutxT) /* { */ #define HAS_TestMutxWaiters #endif /* } HAS_KS_TestMutxW || HAS_KS_TestMutxT */ #if defined(HAS_KS_TestAlarmW) || defined(HAS_KS_TestAlarmT) /* { */ #define HAS_TestAlarmWaiters #endif /* } HAS_KS_TestAlarmW || HAS_KS_TestAlarmT */ /* * see which class define for define class properties */ #ifdef HAS_RTXCss /* { */ #ifdef HAS_Threads /* { */ #define HAS_TS_DefThreadProp #endif /* } HAS_Threads */ #ifdef HAS_Pipes /* { */ #define HAS_TS_DefPipeProp #endif /* } HAS_Pipes */ #ifdef HAS_EventSources /* { */ #define HAS_TS_DefEventSourceProp #endif /* } HAS_EventSources */ #ifdef HAS_Counters /* { */ #define HAS_TS_DefCounterProp #endif /* } HAS_Counters */ #ifdef HAS_Alarms /* { */ #define HAS_TS_DefAlarmProp #endif /* } HAS_Alarms */ #ifdef HAS_Exceptions /* { */ #define HAS_TS_DefExceptionProp #endif /* } HAS_Exceptions */ #endif /* } HAS_RTXCss */ #endif /* } _RTXCOPTS_H */ /* end of file - rtxcopts.h */