Trick to see compilation errors (Flowcode V2 only)

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Trick to see compilation errors (Flowcode V2 only)

Post by Steve »

Here's something that may help some of you, especially if you embed your own C or assembly code into FlowCode.

Normally, the errors generated by the compiler are displayed so fast that it is practically impossible to see them. To get around this, I run a batch file instead of the C compiler directly and put a 'pause' statement in the batch file so that I can review the errors before proceeding.


(1) In FlowCode, select "PIC...Compiler Options" from the menu and take note of the "C Compiler" entry. For example, mine is set to the following:

d:\Program Files\Matrix Multimedia\Flowcode\C2C\c2c.exe -PPIC%p -IP%p.inc


(2) Create a batch file called "c2cpause.bat" with the following lines and save it into the same directory as your C2C compiler (as shown in the "Compiler Options" dialog):

@echo off
"D:\Program Files\Matrix Multimedia\Flowcode\C2C\c2c.exe" %1 %2 %3 %4 %5 %6 %7 %8 %9
echo "Press a key to continue..."
pause

[NOTE: replace the c2c.exe path with the one appropriate to your system - probably on the C drive]


(3) Replace the "C Compiler" entry in FlowCode with the following (again, use the appropriate path):

"d:\Program Files\Matrix Multimedia\Flowcode\C2C\c2cpause.bat" -PPIC%p -IP%p.inc

[NOTE: the quotes around the pathof the batch file are important]


Now when you compile your FlowCode programs, the messages (and errors?) generated by the C2C compiler will remain on the screen. Of course, you will need to press a key to allow FlowCode to pass the generated ASM file onto the assembler.

If you find this annoying and wish to revert to the original setting, click the "restore defaults" button in the "Compiler Options" dialog.

I hope this trick proves useful.
Last edited by Steve on Mon Dec 10, 2007 4:19 pm, edited 1 time in total.

jimhumphries
Posts: 112
Joined: Wed Oct 12, 2005 6:29 pm
Location: USA
Been thanked: 1 time
Contact:

Post by jimhumphries »

Steve:

Very cool! For what I need this answers my "expanded error messaging" wish list item for V3.

Thanks,

Jim

Post Reply