Atmel CAVR-4 ユーザーズマニュアル
CAVR-4
Part 1. Using the compiler
Getting started
5
In this example,
myfile.r90
and
myfile2.r90
are object files,
lnkm128s.xcl
is the
linker command file, and
cl3s-ec.r90
is the runtime library. The option
-s
specifies
the label where the application starts. The option
-o
specifies the name of the output
file, and the option
-F
can be used for specifying the output format. (The default output
format is
Motorola
.)
The IAR XLINK Linker produces output according to your specifications. Choose the
output format that suits your purpose. You might want to load the output to a
debugger—which means that you need output with debug information. Alternatively,
you might want to load the output to a flash loader—in which case you need output
without debug information, such as Intel-hex or Motorola S-records.
output format that suits your purpose. You might want to load the output to a
debugger—which means that you need output with debug information. Alternatively,
you might want to load the output to a flash loader—in which case you need output
without debug information, such as Intel-hex or Motorola S-records.
Basic settings for project configuration
This section gives an overview of the basic settings for the project setup that are needed
to make the compiler generate the best code for the AVR device you are using. You can
specify the options either from the command line interface or in the IAR Embedded
Workbench IDE. For details about how to set options, see Setting command line options,
page 167, and the AVR® IAR Embedded Workbench™ IDE User Guide, respectively.
to make the compiler generate the best code for the AVR device you are using. You can
specify the options either from the command line interface or in the IAR Embedded
Workbench IDE. For details about how to set options, see Setting command line options,
page 167, and the AVR® IAR Embedded Workbench™ IDE User Guide, respectively.
The basic settings available for the AVR microcontroller are:
●
●
●
●
●
In addition to these settings, there are many other options and settings available for
fine-tuning the result even further. See the chapter Compiler options for a list of all
available options.
fine-tuning the result even further. See the chapter Compiler options for a list of all
available options.
PROCESSOR CONFIGURATION
To make the compiler generate optimum code you should configure it for the AVR
microcontroller you are using.
microcontroller you are using.
The --cpu option versus the -v option
There are two processor options that can be used for configuring the processor support:
--cpu=derivative
and
-vn
Your program may use only one processor option at a time, and the same processor
option must be used by all user and library modules in order to maintain consistency.
option must be used by all user and library modules in order to maintain consistency.