simavr - lean and mean AVR simulator
Contents
Description
Execute AVR firmware, produce VCD waveform files and/or run a debugging session. Specify simulation
parameters directly in the emulated code using .elf section or by passing command line arguments.
For more complex virtual circuitry prototyping and simulation see AVR simulator development examples and
documentation.
Examples
AVR GDB DEBUGGING
Run the AVR firmware simulation:
simavr -g-m atmega328p -f 16000000 firmware.elf
start avr-gdb and optionally enable tui for better source code readability:
avr-gdb
(gdb) tui enable
load the elf formatted firmware and connect to the running simulation:
(gdb) file firmware.elf
(gdb) target remote :1234
set a break point and go ahead, debug:
(gdb) break main
(gdb) continue
(gdb) next
(gdb) next
Name
simavr - lean and mean AVR simulator
Options
FILE is an elf or ihex formatted executable firmware, assuming filename extension .hex for ihex files.
--list-cores
List all supported AVR cores and exit
-m CORE, --mcu CORE
Run simulation on CORE
-f FREQ, --freq FREQ
Set core speed in HZ
-t, --trace
Run full scale decoder trace
-ti VECTOR
Add traces for IRQ vector
-g, --gdb
Listen for gdb connection on port 1234
-ff Load next .hex file as flash
-ee Load next .hex file as eeprom
-i INPUT, --input INPUT
Read input signals from a .vcd file
-v Raise verbosity level (can be passed more than once)
-h, --help
Display usage message and exit
See Also
gtkwave(1), gdb(1) AVR simulator April 2018 SIMAVR(1)
Synopsis
simavr [OPTION]... [FILE]
