Dear Forum Members,
I am facing an issue with an FRDM-K22F development board, on which I am trying to run a simple MQX Lite application. I am using the following tools:
- Kinetis Design Studio 3.0
- Processor Expert
- MQX Lite
I have added the MQX Lite Processor Expert component and the ConsoleIO component to be able to write to the virtual COM port. I have 3 simple tasks in the MQX Lite environment, one of which is the following:
void Task1_task(uint32_t task_init_data)
{
int counter = 0;
puts("Task 1 has started to run!");
while(1)
{
counter++;
/* Write your code here ... */
BLUE_ClrVal(0);
_time_delay_ticks(50);
BLUE_SetVal(0);
_time_delay_ticks(50);
}
}
When I try to debug the program via OpenOCD and Task1 starts, instead of writing to the serial console, it gets stuck at a piece of code in Vectors.c which looks like this:
PE_ISR(Unhandled_ivINT_Hard_Fault)
{
PE_DEBUGHALT();
}
I created my program following this piece of MQX Lite training material: http://www.nxp.com/files/training/doc/dwf/DWF13_AMF_ENT_T1017.pdf
Some additional information:
- Same issue when trying to use printf()
- If I comment out the puts() line, everything works fine
- ConsoleIO is configured correctly: in Processor Expert projects without MQX Lite, printf()/puts() work fine with the same ConsoleIO settings
- In the CPU Processor Expert component, under Build options -> Generate Linker files, Stack size is set to 0x0400 and Heap size is set to 0x0C00
Could anyone please give me some advice? I have searched the Internet extensively and found nothing helpful except some tutorials explaining how to use printf() with Kinetis microcontrollers - based on these, I should be facing no issues at all. For example: https://community.freescale.com/servlet/JiveServlet/download/104349-3-290895/Printf_Console_UART_kds...
Your help is highly appreciated.
Thanks and regards
Daniel