Microchip Technology XC8 Standard Compiler (Workstation) SW006021-1 SW006021-1 ユーザーズマニュアル

製品コード
SW006021-1
ページ / 518
MPLAB
®
 XC8 C Compiler User’s Guide
DS52053B-page 112
 2012 Microchip Technology Inc.
4.8.49
--ROM: Adjust ROM Ranges
This option is used to change the default ROM which is specified for the target device. 
The default memory will include all the on-chip ROM specified for the target 
PIC10/12/16 device, thus this option only needs to be used if there are special memory 
requirements. Typically this option is used to reserve memory (reduce the amount of 
memory available). Specifying additional memory that is not in the target device will 
typically result in a successful compilation, but may lead to code failures at runtime.
The default ROM memory for each target device is specified in the chipinfo file, 
PICC18.INI
 (for PIC18 devices) or PICC.INI (for all other 8-bit devices).
Strictly speaking, this option specifies the areas of memory that may be used by 
read-only (ROM-based) objects, and not necessarily those areas of memory which 
contain physical ROM. When producing code that may be downloaded into a system 
via a bootloader, the destination memory may be some sort of (volatile) RAM. The out-
put that will be placed in the ranges specified by this option are typically executable 
code and any data variables that are qualified as const.
For example, to specify an additional range of memory to that on-chip, use:
--ROM=default,+100-2ff
This will add the range from 100h to 2ffh to the on-chip memory. To only use an external 
range and ignore any on-chip memory, use:
--ROM=100-2ff
This option may also be used to reserve memory ranges already defined as on-chip 
memory in the chip configuration file. To do this supply a range prefixed with a minus 
character, -, for example:
--ROM=default,-100-1ff
will use all the defined on-chip memory, but not use the addresses in the range from 
100h to 1ffh for allocation of ROM objects.
This option will adjust the memory ranges used by linker classes, see 
Section 7.2.1 “-Aclass =low-high,...”, and hence any object which is in a psect 
placed in this class. Any objects which are contained in a psect that are explicitly placed 
at a memory address by the linker (see Section 7.2.19 “-Pspec”), i.e., are not placed 
into a memory class, are not affected by the option. For an introductory guide to psects, 
see Section 5.15.1 “Program Sections”.
Note that some psects must be linked above a threshold address, most notably some 
psects that hold const data. Using this option to remove the upper memory ranges may 
make it impossible to place these psects.
4.8.50
--RUNTIME: Specify Runtime Environment
The --RUNTIME option is used to control what is included as part of the runtime envi-
ronment. The runtime environment encapsulates any code that is present at runtime 
which has not been defined by the user, instead supplied by the compiler, typically as 
library code or compiler-generated source files.
All required runtime features are enabled by default and this option is not required for 
normal compilation.