NAME
ava - Algebraical Virtual Assembler for Atmel’s AVR MCUs
SYNOPSIS
ava [ -pLv ] [ -Adevice ] [ -lIfilename ] [ -Idirname ] [ -Tfilename ]
[ -Dmacro=val ] [ -fmacro=val ] [ -o outfile ] [ --version ] [
--multiple-output-files ] [ --motorola ] [ --intel ] files libraries
DESCRIPTION
AVA is an advanced assembler and linker for Atmel’s family of 8 bit and
16 bit AVR microcontrollers, but can be extended to 32 bit families
also. It offers a C-like preprocessor, powerful segments, and virtual
symbols. These two features improve modular programming and allow
objects to be completely independent from each other.
The assembler is not compatible with Atmel’s assembler syntax.
AVA integrates two functions: assembler and linker. Depending on the
command line it executes either the first or the second one. Libraries
are supported by the ordinary objects where each function can be
declared in its own segment which is removed if not needed.
USAGE
AVA is a console application running in batch mode. It reads input
either from a file or from the standard input (stdin). Output is
written to another file or to the standard output (stdout). By
default, error messages are printed to the standard error (stderr).
Assembler and linker are integrated, which of them is invoked is
identified by the source filename extension. If stdin or stdout are
specified, AVA automatically invokes the assembler, since the linker
cannot used these two streams as input or output. See the FILES
section for a description of the supported formats.
Assembler can only assemble one file at a time.
The order of the options (beginning with -) does not matter. The order
of the filenames, however, is very important: files are linked in
exactly the same sequence as listed in the command line. This has a
strong effect on virtual symbols.
Examples
ava -o project main.o print.o
This command links the files main.o and print.o into one project
file.
ava -p < file.s | gzip > file.o.gz
This command assemblies file.s. The assembled code is directed
towards stdout, where the gzip command processes it.
ava -v -v -o example example.o mylib
This command links the file example.o with the libraries
contained in mylib, into the example file, with extra verbose
level.
OPTIONS
Many options can be specified, regarding the assembler and linker, the
report format or the output format. A summary of the options supported
by AVA is included below.
General Options
-h, --help
Show summary of options.
--version
output version information and exit
-o file
Redirect the output to file, if you want to redirect it to
standard output, use -o stdout
-p Use stdin for input and stdout for output, if -o is not set.
Assembler and linker options
-Dmacro=val
Define macro with value val, if val is not given 1 is assumed.
Examples:
ava -DVER=2 main.s
ava -DSTR="string" main.s
-f macro=val
Define public macro of the form __macro{=val}
Example:
ava -favr_noskipbug main.s
-Tfile Auto-include the file, if no filename is given, then target.inc
is included. The file specifed by this option is always first
in the queue, before those specified by the -I option. It is
searched in the default directory and then on the predefined
list.
-Adevice
Declare target device; same as: -Ddevice -Tarch.inc
-Iname Add the directory name to the search list or include the file
name to the source.
Report Options
-v Verbose output. More than one -v can be specified to increase
the verbose level.
-L Generate listing report for the file being assembled.
-llogfile
Append segment tree information and status reports to the
logfile. Errors and warnings are reported both to stderr and
logfile.
Output Formats
--multiple-output-files
Saves each segment in a separate file. File name is extended
with the name base segment. For example: a.out.flash,
a.out.eeprom, ...
--intel
Set Intel standard 16 bit output format (sets -- multiple-
output-files by default).
--motorola
Set Motorola S-record S1/S2 (16/24) bit output format. Address
is limited to 24 bits.
--uasm Set Micro Assembler output format (default)
AVR specific options
-favr_noskipbug
Do not check bad return address.
-favr_noendianbug
Do not swap bytes in the flash segment. (this will be the
default in future releases)
FILES
The files types that AVA understands are:
file.s Assembler source. This is an input file, that will cause AVA to
work as assembler.
file.o Object. This is an input/output file, that will cause AVA to
work as linker.
a.out Linker default output file name. This is an output file to be
used when linking.
a.out.name
Linker extended file name if --multiple-output-files is given.
The extension name is replaced with segment name.
file.lst
Listing report. This is an output file, generated when using
the -L parameter.
libraries
A library is a directory of object files. It may also contain
other files as long as they do not have the suffix of the object
file.
Each function should be placed in separate removable segments.
Only in this case can the linker check function dependencies and
remove unused pieces of code.
VERSION
0.3b
SEE ALSO
uisp(1), avra(1), avrp(1), and the AVA’s User Manual.
AUTHOR
Uros Platise <uros.platise@ijs.si>
This man-page was written by Margarita Manterola <debian@marga.com.ar>
for the Version 0.3b of the ava program.