chc08 on the commandline - compiler messages on stdout

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

chc08 on the commandline - compiler messages on stdout

跳至解决方案
1,784 次查看
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

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
663 次查看
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 项奖励
回复
2 回复数
664 次查看
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 项奖励
回复
663 次查看
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 项奖励
回复