lpcware

Redirecting console output

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by Underling on Fri Jan 20 05:42:13 MST 2012
Hi all,

I'd like to dump the console output produced by my target (using semihosting) to a file.

If I use fprintf() to log the data directly to a file, the data appears not to be committed until the file is closed. I've tried repeated opening/closing of a log file on the host machine, and it's very slow. Also, it's useful to see the data on the screen as it appears.

So, is there a simple way to copy or redirect console output to a file, other than copy and paste?

Thanks!

Outcomes