AnsweredAssumed Answered

puts()/printf() ends up at PE_DEBUGHALT() under MQX Lite

Question asked by Daniel Nagy on Feb 16, 2016
Latest reply on Feb 22, 2016 by Daniel Nagy

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!");
        /* Write your code here ... */


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:




I created my program following this piece of MQX Lite training material:


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:


Your help is highly appreciated.

Thanks and regards