The MQX Lite initialization structure defines parameters of the application and target hardware.
typedef struct mqxlite_initialization_struct
{
_mqx_uint PROCESSOR_NUMBER;
pointer START_OF_KERNEL_MEMORY;
pointer END_OF_KERNEL_MEMORY;
_mqx_uint MQX_HARDWARE_INTERRUPT_LEVEL_MAX;
_mem_size INTERRUPT_STACK_SIZE;
pointer INTERRUPT_STACK_LOCATION;
_mem_size IDLE_TASK_STACK_SIZE;
pointer IDLE_TASK_STACK_LOCATION;
TASK_TEMPLATE_STRUCT_PTR TASK_TEMPLATE_LIST;
} MQXLITE_INITIALIZATION_STRUCT, * MQXLITE_INITIALIZATION_STRUCT_PTR;
For a description of each field, see the Freescale MQX™ Lite RTOS Reference Manual (MQXLITERM).
The MQX Lite initialization structure is generated automatically by the PEx based on the MQX Lite component settings and can be found in the Generated_Code\<MQXLiteComponentName>.c (for example, MQX1.c) file. This is an example of the initialization structure:
/* MQX Lite initialization structure */
const MQXLITE_INITIALIZATION_STRUCT MQX_init_struct =
{
/* PROCESSOR NUMBER */ 1,
/* START OF KERNEL MEMORY */ __KERNEL_DATA_START,
/* END OF KERNEL MEMORY */ __KERNEL_DATA_END,
/* MQX_HARDWARE_INTERRUPT_LEVEL_MAX */ 1,
/* INTERRUPT STACK SIZE */ sizeof(mqx_interrupt_stack),
/* INTERRUPT STACK LOCATION */ mqx_interrupt_stack,
/* IDLE_TASK STACK SIZE */ sizeof(mqx_idle_task_stack),
/* IDLE_TASK STACK_LOCATION */ mqx_idle_task_stack,
/* TASK TEMPLATE LIST */ (TASK_TEMPLATE_STRUCT_PTR)&MQX_template_list[0]
};