Delay when using the DebugIO driver for console output

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Delay when using the DebugIO driver for console output

Jump to solution
986 Views
banjaxed
Contributor I

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.

0 Kudos
1 Solution
520 Views
c0170
Senior Contributor III

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

View solution in original post

0 Kudos
3 Replies
520 Views
banjaxed
Contributor I

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?

 

0 Kudos
521 Views
c0170
Senior Contributor III

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

0 Kudos
520 Views
banjaxed
Contributor I

Thanks Martin.

 

Changing the Default flush character from IODEBUG_NOFLUSH_CHAR to '\n' seems to do the trick. :smileyhappy:

A pity this isn't mentioned anywhere in the documentation. :smileymad:

 

 

 

 

 

0 Kudos