.TH SIMAVR "1" "April 2018" "AVR simulator" "User Commands" .SH NAME simavr \- lean and mean AVR simulator .SH SYNOPSIS .B simavr [\fIOPTION\fR]... [\fIFILE\fR] .SH 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. .PP For more complex virtual circuitry prototyping and simulation see AVR simulator development examples and documentation. .SH OPTIONS FILE is an elf or ihex formatted executable firmware, assuming filename extension .hex for ihex files. .TP \fB\-\-list-cores\fR List all supported AVR cores and exit .TP \fB\-m\fR CORE, \fB\-\-mcu\fR CORE Run simulation on CORE .TP \fB\-f\fR FREQ, \fB\-\-freq\fR FREQ Set core speed in HZ .TP \fB\-t\fR, \fB\-\-trace\fR Run full scale decoder trace .TP \fB\-ti\fR VECTOR Add traces for IRQ vector .TP \fB\-g\fR, \fB\-\-gdb\fR Listen for gdb connection on port 1234 .TP \fB\-ff\fR Load next .hex file as flash .TP \fB\-ee\fR Load next .hex file as eeprom .TP \fB\-i\fR INPUT, \fB\-\-input\fR INPUT Read input signals from a .vcd file .TP \fB\-v\fR Raise verbosity level (can be passed more than once) .TP \fB\-h\fR, \fB\-\-help\fR Display usage message and exit .SH EXAMPLES AVR GDB DEBUGGING .PP Run the AVR firmware simulation: .IP simavr \fB\-g \-m\fR atmega328p \fB\-f\fR 16000000 firmware.elf .PP start avr-gdb and optionally enable tui for better source code readability: .IP avr-gdb (gdb) tui enable .PP load the elf formatted firmware and connect to the running simulation: .IP (gdb) file firmware.elf (gdb) target remote :1234 .PP set a break point and go ahead, debug: .IP (gdb) break main (gdb) continue (gdb) next (gdb) next .SH AUTHOR This manual page was written by Milan Kupcevic 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. .SH "SEE ALSO" .PP .BR gtkwave (1), .BR gdb (1)