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!
已解决! 转到解答。
Hi @surrealist ,
Please refer to this post.
https://community.nxp.com/t5/MCUXpresso-General/UART-redirection-with-C-on-the-FRDM-K64F/m-p/731012
Or, there are some examples in RT1050 SDK use std::cout.
https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/The-Hello-World-of-TensorFlow-Lite/ta-p/1114580
Regards,
Jing
Hi @surrealist ,
Please refer to this post.
https://community.nxp.com/t5/MCUXpresso-General/UART-redirection-with-C-on-the-FRDM-K64F/m-p/731012
Or, there are some examples in RT1050 SDK use std::cout.
https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/The-Hello-World-of-TensorFlow-Lite/ta-p/1114580
Regards,
Jing
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.
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%.