Page 1 of 1

Tool Output not capturing output.

Posted: Tue Jan 19, 2010 4:32 am
by John DT
I am using a C compiler (MPC) as an external tool. The tool seems to run ok as either a direct tool command or as part of a batch file. However, the Tool output window does not capture the output. Instead, the results are reported as "Tool completed with exit code 1" if there are errors, else code 0.

As a second problem, the MPC tool prefers to send the errors and warnings as a separate file, for example in V_main.err. Is there a way to convert this file to the tool output window so that I can use the regular expression technique to jump to the errors? If the error file is not commanded, the errors are output to DOS but not in a form that can be converted by regular expressions.

Posted: Tue Jan 19, 2010 9:40 am
by ben_josephs
Create a tool that runs a "DOS command" to type the file, something like:
type $FileDir\YServer.txt
Make sure Capture output is selected.
Set the Regular expression to match output to something appropriate.

Why do you say that if the error messages are sent to the command line they are "not in a form that can be converted by regular expressions"? What do they look like?

Tool Output not capturing output.

Posted: Tue Jan 19, 2010 3:39 pm
by John DT
Thank you Ben,

The batch file now contains the "type v_main.err" command. This works both in the command window and from TextPad. The results are :

Code: Select all

C:\1LMA-3D9\V_09>MPC.EXE  +l +e +dINHX8M v_main.c 

C:\1LMA-3D9\V_09>type v_main.err 
ERROR   v_main.c 58:9:ILLEGAL OR UNDEFINED ARGUMENT xyz
WARNING V_serial.c 280:17:ARGUMENT OUT OF RANGE HDataPtr (00B5) not between 0000 and 007F

Tool completed successfully
If the +e option is not checked, the errors are reported but without formating. For example:

Code: Select all

[2800] ............************************
58 ~ii = xyz;^
***** illegal or undefined argument xyz
[6250] *****************
Errors 1
Warnings 1 
[/code]