2 Invoking
The following options are only valid for the command-line version of simulavr:
- ‘-d --device <device name>’
- tell simulavr, what type of device it has to simulate. The following devices
are supported: at90s8515, at90s4433, atmega128, atmega48, atmega88, atmega168,
atmega328. To find out, which devices are supported with your current
installation, use the help option!
- ‘-f --file <name>’
- load ELF-file <name> for simulation in simulated target.
- ‘-F --cpufrequency <value>’
- set the CPU frequence to <Hz>
- ‘-g --gdbserver’
- running as avr-gdb-server
- ‘-G’
- running as avr-gdb-server and write debug info for avr-gdb-connection
- ‘-n --nogdbwait’
- do not wait for avr-gdb connection
- ‘-m <nanoseconds>’
- maximum run time of <nanoseconds>
- ‘-p <port>’
- change <port> for avr-gdb server to port
- ‘-R --readfrompipe <offset>,<file>’
- add a special pipe register to device at IO-offset and opens <file>
for reading
- ‘-t --trace <file name>’
- enable trace outputs into <file name>
- ‘-T --terminate <label> or <address>’
- stops simulation if PC runs on <label> or <address>. If this parameter
is omitted, simulavr has to be terminated manually.
For <label> you can use any label listed in the map-file of the linker -
no matter if it is ever reached or not.
- ‘-u’
- run with user interface for external pin handling at port 7777. This
does not open any graphics but activates the interface to communicate
with the environment simulation.
- ‘-v --version’
- show the software version of simulavr
- ‘-V --verbose’
- output some hints to console
- ‘-W --writetopipe <offset>,<file>’
- add a special pipe register to device at IO-Offset and opens <file> for writing
- ‘-s --irqstatistic’
- Writes IRQ statistic to stdout at the end of simulation.
- ‘-o <filename|->’
- Writes all available VCD trace sources for a device to <filename> or to stdout,
if <-> is given.
- ‘-c <trace-params>’
- Enable a trace dump, for valid <trace-params> see below.
- ‘-h --help’
- show commandline help for simulavr and what devices are supported
- ‘-a --writetoabort <offset>’
- add a special register to device at IO-Offset which aborts simulation
- ‘-e --writetoexit <offset>’
- add a special register to device at IO-Offset which exits simulation (if you
write to this IO-Offset, then the written value will be given back as exit value
of the simulator!)
The commands -R / -W / -a / -e are not AVR-hardware related. Here you can link
an address within the address space of the AVR to an input or output
pipe. This is a simple way to create a "printf"- debugger, e.g. after
leaving the debugging phase and running the AVR-Software in the simulator or to
abort/exit a simulation on a specified situation inside of your program.
For more details see the example in the directory simple_ex1.