simavr1
Lean and mean avr simulator
Usage
simavr [OPTION] ...
[FILE]
Overview
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.
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
Examples
AVR GDB DEBUGGING
Run the AVR firmware simulation:
-
simavr -g -m atmega328p
-f16000000 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
Releases
Unchanged in 4 releases since Debian 10 (Buster).