Example

For the following examples, the actual base filename for the modifiers is: C:\Freescale\my demo\TheWholeThing.myExt.

The %p modifier gives the path only with a file separator:

     C:\Freescale\my demo\  

Using the %N modifier results in a filename in 8.3 format (that is, the name with only eight characters):

     TheWhole  

The %n modifier returns the whole the filename without extension:

     TheWholeThing  

The %E modifier gives the extension in 8.3 format (that is, the extension with only three characters):

     myE  

Use the %e modifier to get the whole extension:

     myExt  

The %f modifier gives the path plus the filename:

     C:\Freescale\my demo\TheWholeThing  

When the path contains a space, we recommend using %" or %'. Thus, %"%f%" gives (using double quotes):

     "C:\Freescale\my demo\TheWholeThing"  

Using %'%f%' gives (using single quotes):

     `C:\Freescale\my demo\TheWholeThing'  

The modifier %(envVariable) uses an environment variable. The Compiler ignores a file separator following %(envVariable) if the environment variable is empty or non-existent. In other words, if you set TEXTPATH to:

     TEXTPATH=C:\Freescale\txt,   

the Compiler replaces:

     %(TEXTPATH)\myfile.txt   

with:

     C:\Freescale\txt\myfile.txt  

But if TEXTPATH is empty or non-existent, the Compiler replaces:

    %(TEXTPATH)\myfile.txt  

with:

     myfile.txt  

Use the %% modifier to print a percent sign. Using %e%% gives:

     myExt%  

The following table lists the command-line options for the HCS08 compiler:

Table 1. Compiler Command-line Options
-!: Filenames are clipped to DOS Length
-AddIncl: Additional Include File
-Ansi: Strict ANSI
-ArgFile: Specify a file from which additional command line options will be read
-Asr: It is Assumed that HLI Code Saves Written Registers
-BfaB: Bitfield Byte Allocation
-BfaGapLimitBits: Bitfield Gap Limit
-BfaTSR: Bitfield Type Size Reduction
-C++ (-C++f, -C++e, -C++c): C++ Support
-Cc: Allocate Const Objects into ROM
-Ccx: Cosmic Compatibility Mode for Space Modifiers and Interrupt Handlers
-Ci: Bigraph and Trigraph Support
-Cn[={Vf|Tpl|Ptm...}]: Disable compactC++ features
-Cni: No Integral Promotion on Characters
-Cppc: C++ Comments in ANSI-C
-Cq: Propagate const and volatile Qualifiers for Structs
-C[s08|08]: Generate Code for Specific HC08 Families
-CswMaxLF: Maximum Load Factor for Switch Tables
-CswMinLB: Minimum Number of Labels for Switch Tables
-CswMinLF: Minimum Load Factor for Switch Tables
-CswMinSLB: Minimum Number of Labels for Switch Search Tables
-Cu: Loop Unrolling
-Cx: Switch Off Code Generation
-D: Macro Definition
-Ec: Conversion from 'const T*' to 'T*'
-Eencrypt: Encrypt Files
-Ekey: Encryption Key
-Env: Set Environment Variable
-F (-Fh, -F1, -F1o, -F2, -F2o,-F6, or -F7): Object-File Format
-Fd: Double is IEEE32
-H: Short Help
-I: Include File Path
-La: Generate Assembler Include File
-Lasm: Generate Listing File
-Lasmc: Configure Listing File
-Ldf: Log Predefined Defines to File
-Li: List of Included Files to ".inc" File
-Lic: License Information
-LicA: License Information about Every Feature in Directory
-LicBorrow: Borrow License Feature
-LicWait: Wait until Floating License is Available from Floating Li- cense Server
-Ll: Write Statistics Output to File
-Lm: List of Included Files in Make Format
-LmCfg: Configuration for List of Included Files in Make Format (option -Lm)
-Lo: Append Object File Name to List (enter [<files>])
-Lp: Preprocessor Output
-LpCfg: Preprocessor Output Configuration
-LpX: Stop after Preprocessor
-M (-Mb, -Ms, -Mt): Memory Model
-MMU: Enable Memory Management Unit (MMU) Support
-N: Show Notification Box in Case of Errors
-NoBeep: No Beep in Case of an Error
-NoClrVol: Do not use CLR for volatile variables in the direct page
-NoDebugInfo: Do not Generate Debug Information
-NoEnv: Do Not Use Environment
-NoPath: Strip Path Info
-O(-Os, -Ot): Main Optimization Target
-O0 : Disable Optimizations
-Obfv: Optimize Bitfields and Volatile Bitfields
-ObjN: Object File Name Specification
-Oc: Common Subexpression Elimination (CSE)
-OdocF: Dynamic Option Configuration for Functions
-Of and-Onf: Create Sub-Functions with Common Code
-Oi: Inlining
-Oilib: Optimize Library Functions
-Ol: Try to Keep Loop Induction Variables in Registers
-Ona: Disable Alias Checking
-OnB: Disable Branch Optimizer
-Onbf: Disable Optimize Bitfields
-Onbt: Disable ICG Level Branch Tail Merging
-Onca: Disable any Constant Folding
-Oncn: Disable Constant Folding in Case of a New Constant
-OnCopyDown: Do Generate Copy Down Information for Zero Values
-OnCstVar: Disable CONST Variable by Constant Replacement
-One: Disable any Low Level Common Subexpression Elimination
-OnP: Disable Peephole Optimization
-OnPMNC: Disable Code Generation for NULL Pointer to Member Check
-Ont: Disable Tree Optimizer
-OnX: Disable Frame Pointer Optimization
-Or: Allocate Local Variables into Registers
-Ous, -Ou, and -Onu: Optimize Dead Assignments
-Pe: Do Not Preprocess Escape Sequences in Strings with Absolute DOS Paths
-Pio: Include Files Only Once
-Prod: Specify Project File at Startup
-Qvtp: Qualifier for Virtual Table Pointers
-Rp (-Rpe, -Rpt): Large Return Value Type
-T: Flexible Type Management
-V: Prints the Compiler Version
-View: Application Standard Occurrence
-WErrFile: Create "err.log" Error File
-Wmsg8x3: Cut Filenames in Microsoft Format to 8.3
-WmsgCE: RGB Color for Error Messages
-WmsgCF: RGB Color for Fatal Messages
-WmsgCI: RGB Color for Information Messages
-WmsgCU: RGB Color for User Messages
-WmsgCW: RGB Color for Warning Messages
-WmsgFb (-WmsgFbv, -WmsgFbm): Set Message File Format for Batch Mode
-WmsgFi (-WmsgFiv, -WmsgFim): Set Message Format for Interactive Mode
-WmsgFob: Message Format for Batch Mode
-WmsgFoi: Message Format for Interactive Mode
-WmsgFonf: Message Format for No File Information
-WmsgFonp: Message Format for No Position Information
-WmsgNe: Maximum Number of Error Messages (enter <number>)
-WmsgNi: Maximum Number of Information Messages (enter <number>)
-WmsgNu: Disable User Messages
-WmsgNw: Maximum Number of Warning Messages (enter <number>)
-WmsgSd: Setting a Message to Disable
-WmsgSe: Setting a Message to Error
-WmsgSi: Setting a Message to Information
-WmsgSw: Setting a Message to Warning
-WOutFile: Create Error Listing File
-Wpd: Error for Implicit Parameter Declaration
-WStdout: Write to Standard Output
-W1: Don't Print Information Messages
-W2: Do not Print INFORMATION or WARNING Messages