SW500009 Microchip Technology, SW500009 Datasheet - Page 53

HI-TECH FOR DSPIC/PIC24

SW500009

Manufacturer Part Number
SW500009
Description
HI-TECH FOR DSPIC/PIC24
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC24 & DsPICr
Datasheet

Specifications of SW500009

Supported Families
PIC24
Core Architecture
PIC, DsPIC
Software Edition
Standard
Kit Contents
Software And Docs
Tool Type
Compiler
Mcu Supported Families
PIC24 MCUs And DsPIC DSCs
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
DSPIC3X/PIC24
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
025
778-1003
778-1003
C Language Features
files associated with this process are deleted after they have been used. If required, the assembler
file which contains the runtime startup code can be kept after compilation and linking by using the
driver option --RUNTIME=default,+keep. The residual file will be called startup.as and will be
located in the current working directory. If you are using an IDE to perform the compilation the
destination directory is dictated by the IDE itself, however you may use the --OUTDIR option to
specify an explicit output directory to the compiler.
of the runtime code can be controlled, if required, using the --RUNTIME option. These are described
in the sections below.
3.3.4.1 Initialization of Data psects
One job of the runtime startup code is ensure that any initialized variables contain their initial value
before the program begins execution. Initialized variables are those which are not auto objects and
which are assigned an initial value in their definition, for example input in the following example.
Since auto objects are dynamically created, they require code to be positioned in the function in
which they are defined to perform their initialization. It is also possible that their initial value changes
on each instance of the function. As a result, initialized auto objects do not use the data psects.
variables will reside, and be accessed, at runtime. Space is reserved for the runtime location of
initialized variables in a psect called rdata. This psect does not contribute to the output file.
so that the RAM variables will contain their initial values before main() is executed. Each location
in the idata psect is copied to appropriate placed in the rdata psect.
For example:
unpredictable when the program begins execution. Code relying on variables containing their initial
value will fail.
with persistent, see Section 3.4.9.1. Such variables are linked at a different area of memory and are
not altered by the runtime startup code in any way.
Since the runtime startup code is generated automatically on every compilation, the generated
This is an automatic process which does not require any user interaction, however some aspects
Such initialized objects have two components and are placed within the data psects.
The actual initial values are placed in a psect called idata. The other component is where the
The runtime startup code performs a block copy of the values from the idata to the rdata psect
The block copy of the data psects may be omitted by disabling the init suboption of --RUNTIME.
–RUNTIME=default,-init
With this part of the runtime startup code absent, the contents of initialized variables will be
Variables whose contents should be preserved over a reset, or even power off, should be qualified
int input = 88;
void main(void) {
...
Files
39

Related parts for SW500009