How to use std::cin/cout along with fsl_debug_console?

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

How to use std::cin/cout along with fsl_debug_console?

ソリューションへジャンプ
2,142件の閲覧回数
surrealist
Contributor II

Hi forum,

I'm new to MCUXpresso 11.5.1 and the SDK 2.8.0.  I'm using a FRDM-K82F, and have an example that I am trying to run written in C++.  A similar C example was able to write to and read from the fsl_debug_console using PRINTF and SCANF.

If I use PRINTF("something\n\r"), from my C++ application, I can see output in the Terminal view.

However, if I use std::cout, I don't see anything.  Can anyone provide guidance on how to use std::cout and std::cin alongside or instead of the fsl_debug_console?

As an aside:  How can I step into/step over disassembly window content?  In other Eclipse IDEs, I have seen separate buttons for instruction step into/step over, but I can't seem to find it in MCUXpresso.

Thanks for your help!

0 件の賞賛
返信
1 解決策
2,134件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport
0 件の賞賛
返信
3 返答(返信)
2,135件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport
0 件の賞賛
返信
2,140件の閲覧回数
surrealist
Contributor II

I should mention that I'm currently using NewlibNano (nohost) for my C++ library.  I had also tried using full Newlib, but building a simple application it seems to run out of Flash!  Ouch.

Thanks again for any help.

0 件の賞賛
返信
2,108件の閲覧回数
surrealist
Contributor II

Although I got cin and cout to work with newlib-nano, I strongly advise against it.  Bringing in <iostream> causing a huge increase in the amount of Flash required.  On a Kinetis K82, a simple cin/cout example used nearly 70% of the available 256KB of Flash.  When replaced with PRINTF() and SCANF(), that dropped to around 10%.

0 件の賞賛
返信