As described in FSL_MQX_getting_started.pdf, I can route printf output to the Eclipse console by editing user_config.h. This works, but is so slow as to be unusable. The console only seems to update every 10 seconds or so, and some data is lost.
Is this a known bug? (Yes, I have ticked the box for "Show Console when Standard Out Changes").
There are some hints that optimisation is possible:
FSL_MQX_getting_started.pdf states “See the MQX I/O User Guide for more information on the DebugIO driver setting (ITM vs. semihost mode, buffer setting…).
MQXIOUG.pdf even says in the change log “Debug IO Driver chapter added.”
But there is no such chapter!
I'm using CW 10.2, MQX 3.8. P&E OSJTAG and Segger J-Link show the same problem.
Solved! Go to Solution.
Hi banjaxed,
what board are you using and can you provide the code snippet or the code? I'll test it.
The iodebug uses buffer by default and you can disable it if you set the size of the buffer to 0. Try to set default flush character to '\n'. its in init_iodebug.c :
const IODEBUG_INIT_STRUCT _bsp_iodebug_init = {
IODEBUG_MODE_SEMIHOST, /* Driver mode */
127, /* Length of buffered data */
'\n' /* Default flush character */
};
Regards,
MartinK
Bump.
Is this a problem for anyone else?
For example, if I use J-Link, I have to re-direct console I/O to the RS232 port on TWR-SER. Which means I can't use RS232 in my application.
Does the missing chapter exist?
Hi banjaxed,
what board are you using and can you provide the code snippet or the code? I'll test it.
The iodebug uses buffer by default and you can disable it if you set the size of the buffer to 0. Try to set default flush character to '\n'. its in init_iodebug.c :
const IODEBUG_INIT_STRUCT _bsp_iodebug_init = {
IODEBUG_MODE_SEMIHOST, /* Driver mode */
127, /* Length of buffered data */
'\n' /* Default flush character */
};
Regards,
MartinK
Thanks Martin.
Changing the Default flush character from IODEBUG_NOFLUSH_CHAR to '\n' seems to do the trick.
A pity this isn't mentioned anywhere in the documentation.