Delay when using the DebugIO driver for console output

キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Delay when using the DebugIO driver for console output

ソリューションへジャンプ
699件の閲覧回数
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 件の賞賛
1 解決策
233件の閲覧回数
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 件の賞賛
3 返答(返信)
233件の閲覧回数
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 件の賞賛
234件の閲覧回数
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 件の賞賛
233件の閲覧回数
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 件の賞賛