• No results found

Chapter 4. Macro Assembler

4.2 Options

The command line options recognized by ASPIC are described in the followings sections.

4.2.1

-A: Generate Assembly File

An assembler file will be produced if this option is used rather than the usual object file format. This is useful when checking the optimized assembler produced using the -O

optimization option.

By default the output file will an extension .opt, unless the -Ooutfile output option is used to specify another name.

4.2.2

-C: Produce Cross Reference File

TABLE 4-1: ASPIC COMMAND-LINE OPTIONS

Option Meaning Default

-A Produce assembler output Produce object code -C Produce cross-reference file No cross reference

-Cchipinfo Define the chipinfo file dat\picc.ini

-E[file|digit] Set error destination/format

-Flength Specify listing page length 66

-H Output HEX values for constants

Decimal values -I List macro expansions Don’t list macros

-L[listfile] Produce listing No listing

-N Disable merging optimizations Merging optimizations enabled -O Perform optimization No optimization

-Ooutfile Specify object name srcfile.obj

-R Specify non-standard ROM

-Twidth Specify listing page width 80

-V Produce line number info No line numbers -VER=version Specify full version information

for list file title

-Wlevel Set warning level threshold 0

-X No local symbols in OBJ file --CHIP=device Specify device name

--DISL=list Specify disabled messages No message disabled --EDF=path Specify message file location

--EMAX=number Specify maximum number of errors

10 --OPT=optimization Specify optimization type

Macro Assembler

4.2.3

-C: Specify Chip Info File

Specify the chipinfo file to use. The chipinfo file is called picc.ini and can be found in the dat directory in the compiler’s installation directory. This file specifies information about the currently selected device.

4.2.4

-E: Specify Error Format/File

The default format for an error message is in the form:

filename: line: message

where the error of type message occurred on line line of the file filename. The

-E option with no argument will make the assembler use an alternate format for error and warning messages.

Specifying a filename as argument will force the assembler to direct error and warning messages to a file with the name specified.

4.2.5

-F: Specify Page Length

By default the assembly listing format is pageless, i.e. the assembler listing output is continuous. The output may be formatted into pages of varying lengths. Each page will begin with a header and title, if specified.

The -F option allows a page length to be specified. A zero value of length implies pageless output. The length is specified in a number of lines.

4.2.6

-H: Print Hexadecimal Constant

This option specifies that output constants should be shown as hexadecimal values rather than decimal values. This option affects both the assembly list file, as well as assembly output, when requested.

4.2.7

-I: List Macro Expansions

This option forces listing of macro expansions and unassembled conditionals which would otherwise be suppressed by a NOLIST assembler control, see

Section 4.3.10 “Assembler Controls”. The -L option is still necessary to produce an actual listing output.

4.2.8

-L: Generate an Assembly Listing

This option requests the generation of an assembly listing file. If listfile is specified then the listing will be written to that file, otherwise it will be written to the standard output.

This option is applied if compiling using PICC, the command-line driver and the

--ASMLIST driver option, see Section 2.7.17 “--ASMLIST: Generate Assembler List Files”.

4.2.9

-O: Optimize assembly

This requests the assembler to perform optimization on the assembly code. Note that the use of this option slows the assembly process down, as the assembler must make

4.2.10

-O: Specify Output File

By default the assembler determines the name of the object file to be created by strip- ping any suffix or extension from the first source filename and appending .obj. The

-O option allows the user to override the default filename and specify a new name for the object file.

4.2.11

-T: Specify Listing Page Width

This option allows specification of the assembly list file page width, in characters.

width should be a decimal number greater than 41. The default width is 80 characters.

4.2.12

-V: Produce Assembly Debug Information

This option will include line number and filename information in the object file produced by the assembler. Such information may be used by debuggers.

Note that the line numbers will correspond with assembler code lines in the assembler file. This option should not be used when assembling an assembly file produced by the code generator. In that case, debug information should relate back to the original C source, not the intermediate assembly code.

4.2.13

-VER:Specify Version Information

This option allows the full version information, including optional text to indicate beta builds or release candidate builds, to be passed to the assembler. This information is only used in the title of the assembly list file and is not reflected in the output to the

--VER option.

4.2.14

-X: Strip Local Symbols

The object file created by the assembler contains symbol information, including local symbols, i.e. symbols that are neither public or external. The -X option will prevent the local symbols from being included in the object file, thereby reducing the file size. description

4.2.15

--CHIP: Specify Device Name

This option defines the processor which is being used. The processor type can also be indicated by use of the PROCESSOR directive in the assembler source file, see

Section 4.3.9.27 “PROCESSOR”. You can also add your own processors to the compiler via the compiler’s chipinfo file.

This option is applied if compiling using PICC, the command-line driver and the

--CHIP driver option, see Section 2.7.20 “--CHIP: Define Processor”.

4.2.16

--DISL: Disable Messages

This option is mainly used by the command-line driver, PICC, to disable particular message numbers. It takes a comma-separate list of message numbers that will be disabled during compilation.

This option is applied if compiling using PICC, the command-line driver and the

--MSGDISABLE driver option, see Section 2.7.37 “--MSGDISABLE: Disable Warn- ing Messages”.

Macro Assembler

4.2.17

--EDF: Set Message File Path

This option is mainly used by the command-line driver, PICC, to specify the path of the message description file. The default file is located in the dat directory in the compiler’s installation directory.

See Section 2.6 “Compiler Messages” for full information about the compiler’s messaging system.

4.2.18

--EMAX: Specify Maximum Number of Errors

This option is mainly used by the command-line driver, PICC, to specify the maximum number of errors that can be encountered before the assembler terminates. The default number is 10 errors.

This option is applied if compiling using PICC, the command-line driver and the

--ERRORS driver option, see Section 2.7.28 “--ERRORS: Maximum Number of Errors”.

See Section 2.6 “Compiler Messages” for full information about the compiler’s messaging system.

4.2.19

--OPT: Specify Optimization Type

This option complements the assembler -O option and indicates specific information about optimizations required. The suboptions: speed, space and debug may be spec- ified to indicate preferences related to procedural abstraction.

Abstraction is enabled when the space option is set; disabled when speed is set. The

debug suboption limits the application of some optimizations which otherwise may severely corrupt debug information used by debuggers.

4.2.20

--VER: Print Version Number

This option printed information relating to the version and build of the assembler. The assembler will terminate after processing this option, even if other options and files are present on the command line.

In document HI-TECH C for PIC10/12/16 User s Guide (Page 108-111)

Related documents