I would like to define an interrupt stack in the internal RAM with the following structure:
const MQX_INITIALIZATION_STRUCT MQX_init_struct =
{
/* PROCESSOR_NUMBER */ BSP_DEFAULT_PROCESSOR_NUMBER,
/* START_OF_KERNEL_MEMORY */ BSP_DEFAULT_START_OF_KERNEL_MEMORY,
/* END_OF_KERNEL_MEMORY */ BSP_DEFAULT_END_OF_KERNEL_MEMORY,
/* INTERRUPT_STACK_SIZE */ BSP_DEFAULT_INTERRUPT_STACK_SIZE,
/* TASK_TEMPLATE_LIST */ MQX_template_list,
/* MQX_HARDWARE_INTERRUPT_LEVEL_MAX*/ BSP_DEFAULT_MQX_HARDWARE_INTERRUPT_LEVEL_MAX,
/* MAX_MSGPOOLS */ BSP_DEFAULT_MAX_MSGPOOLS,
/* MAX_MSGQS */ BSP_DEFAULT_MAX_MSGQS,
/* IO_CHANNEL */ BSP_DEFAULT_IO_CHANNEL,
/* IO_OPEN_MODE */ BSP_DEFAULT_IO_OPEN_MODE,
/* INTERRUPT_STACK_LOCATION */ BSP_DEFAULT_INTERRUPT_STACK_LOCATION
};
In the linker file the interrupt stack is located as follows:
# interrupt stack
interrupt_stack (RW) : ORIGIN = 0x80010000, LENGTH = 0x0000F800
end_of_is (RW) : ORIGIN = 0x8001F7FF, LENGTH = 0x00000000
Is this setup correct? MQX is starting up and the stack seems to be initialized, but the interrupts are not working correctly. I have tested my code with default interrupt stack (external RAM) and this is working.
What is missing? Is the init of MQX correct?
Regards,
Patrick
已解决! 转到解答。