If Crasycat's pointer didn't help, here's the scoop on compiling from the command line. All of the command-line modules are in the sub-directory \prog within the CodeWarrior directory. HCH12.exe is the compiler. Knowing this we can write a command line invocation program.
Assume that the path to the CodeWarrior directory is "C:\Program Files\Freescale\CW for HC12 V4.5\".
Also assume that within CodeWarrior is the sub-directory MyPWMChannel0\Sources\, with a source file of Start12.c. This is the file we want to compile.
Now we write:
Code:
"C:\Program Files\Freescale\CW for HC12 V4.5\prog\chc12.exe" MyPWMChannel0\Sources\Start12.c -I"C:\Program Files\Freescale\CW for HC12 V4.5\lib\hc12c\include" -Mb -CpuHCS12 -WmsgFbv -WmsgFob"%f%e(%l): %k %d: %m\n"REM pause
The -I options points to the include files directory. -Mb is for banked memory, and -CpuHCS12 doesn't need an explanation. The weird-looking -W options have the compiler emit verbose error messages into an error file--something you really want to have happen while debugging the batch file code.
I placed this into the Pre-Linker option of the Target Mode window, and it built the file, so it appears to work.
As for why this is so difficult, I don't know. I think you can mark a file as dirty using Tcl or Perl, but I don't understand any of the particulars. There are some scripting examples in the (CodeWarrior Examples) sub-directory, but I don't think they're applicable to you situation.
---Tom
Message Edited by J2MEJediMaster on
2007-09-04 10:56 PM