Go Down

Topic: avrdude and stdout (Read 627 times) previous topic - next topic

CrashingDutchman

I am trying to catch output from avrdude in a visual studio progam. It seems that avrdude is not using stdout for writing to the console window.

Also, a test in the command prompt (windows xp; cmd.exe) as 'avrdude -h >test.txt' should output the switches supported by avrdude and other text in the file test.txt. Should, but it doesn't.

The Arduino IDE seems to show some text coming from avrdude, for example when upload.verbose is set to true. Can anyone explain how this is done?

Thanks in advance!

mellis

It looks like avrdude writes to stderr, not stdout.  

webworm

If you've got access to the avrdude source, the following should make all output go to stdout. You will of course need to re-compile.

Code: [Select]

#!/bin/csh
foreach a (`ls *.c`)
mv $a $a.old
sed -e 's/stderr/stdout/g' $a.old > $a
end

CrashingDutchman

Ok, thanks! Using stderror solved my problem!

Go Up