chc08 on the commandline - compiler messages on stdout

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

chc08 on the commandline - compiler messages on stdout

Jump to solution
1,565 Views
vegie_stu
Contributor I
Hi,

As mentioned on an earlier post, I need to use chc08 in a makefile.  I've had no big issues doing this, however I'd like to have compilation errors display on the command shell when the build is broken.

chc08 writes these messages to EDOUT by default, however there's a compiler option -WStdoutOn. From the help file, "This option determines if error file text to the error file is also written into the stdout file."  This looks like what I need, but using it doesn't change anything about the text output:

D:\freescale\Devel_with_makefile>"C:/Program Files/Freescale/CodeWarrior for HC0
8 V5.1/prog/chc08.exe"   -WStdoutOn -Ansi -Isrc/CSP/908ey16 -Isrc -I"c:/Program
Files/Freescale/CodeWarrior for HC08V5.1/lib/hc08c/include" src/main.c -ObjN=%n.
o
D:\freescale\Devel_with_makefile>

... nothing.

Strangely, even trying to print the compiler version on the command line fails:

D:\freescale\Devel_with_makefile>"C:/Program Files/Freescale/CodeWarrior for HC0
8 V5.1/prog/chc08.exe" -V

D:\freescale\Devel_with_makefile>

... still nothing.

Does anyone have this stdout feature working?
Is there a known issue with stderr/stdout not working on the command line?


Thanks!
Stuart

Labels (1)
Tags (1)
0 Kudos
1 Solution
444 Views
CompilerGuru
NXP Employee
NXP Employee
It's not that the compiler would not print that output to stdout, the problem actually is that cmd.exe does not read it from stdout if the application happens to be a windows application (as opposed to a command line type application).
One way to work around this is to call a real command line application which does nothing else than route through stdin to stdout. The provided little piper.exe actually just does that. Just use
piper.exe chc08.exe -h
, for example.
Note for many usual clients (our own maker, microsofts nmake, many others) the stdout just works fine.
Also output redirection works actually.
chc08.exe -v > out.txt
chc08.exe -v | more
Which make do you try to use?

Daniel

View solution in original post

0 Kudos
2 Replies
445 Views
CompilerGuru
NXP Employee
NXP Employee
It's not that the compiler would not print that output to stdout, the problem actually is that cmd.exe does not read it from stdout if the application happens to be a windows application (as opposed to a command line type application).
One way to work around this is to call a real command line application which does nothing else than route through stdin to stdout. The provided little piper.exe actually just does that. Just use
piper.exe chc08.exe -h
, for example.
Note for many usual clients (our own maker, microsofts nmake, many others) the stdout just works fine.
Also output redirection works actually.
chc08.exe -v > out.txt
chc08.exe -v | more
Which make do you try to use?

Daniel
0 Kudos
444 Views
vegie_stu
Contributor I
Hi CompilerGuru,

Thanks for the tip - that's a big help and fixed the problem. There's the tiniest reference to piper.exe in the documentation - I'd never have found it.

I'm using GNU make (3.80).

Cheers,
vegie_stu

0 Kudos