simavr(1)

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 -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

Releases

Unchanged in 4 releases since Debian 10 (Buster).

  1. 10–13

Author

This manual page was written by Milan Kupcevic <[email protected]> for the Debian project. Permission is granted to copy, redistribute and/or modify this document under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

From simavr 1.6+dfsg-3+b3 in Debian 13 (Trixie). Parsed by carta from the page's man source.