SIMAVR(1)

✨ SIMAVR(1) ✨

okay so bestie, buckle UP, because simavr is the whole manual for simavr β€” the lean and mean AVR simulator πŸ’… she's tiny, she's fast, she's iconic, and today we're learning her entire lore.


πŸŽ€ NAME πŸŽ€

simavr β€” lean and mean AVR simulator πŸ¦‹


🌸 SYNOPSIS 🌸

simavr [OPTION]... [FILE]

πŸ’– DESCRIPTION πŸ’–

So what does she do? She executes AVR firmware, produces VCD waveform files and/or runs a debugging session. All three. Main character energy fr fr πŸ‘‘

You can specify your simulation parameters right there in the emulated code using a .elf section, or you can just pass them as command line arguments β€” whatever feels right for your vibe 🌈

And listen β€” if you're into more complex virtual circuitry prototyping and simulation, go peek at the AVR simulator development examples and documentation. That's where the real ✨shenanigans✨ live.


πŸ’… OPTIONS πŸ’…

  • FILE β€” this is your elf or ihex formatted executable firmware πŸ“ and heads up: if it's an ihex file, she assumes the filename extension is .hex, no cap.
  • --list-cores β€” lists every single supported AVR core and then dips out. exit stage left πŸ’€
  • -m CORE, --mcu CORE β€” run the simulation on CORE. pick your queen πŸ‘‘
  • -f FREQ, --freq FREQ β€” set the core speed in HZ. she needs to know how fast to go πŸƒβ™€οΈ
  • -t, --trace β€” run a full scale decoder trace. everything. all of it. on display πŸ”₯
  • -ti VECTOR β€” add traces for IRQ vector. yes bestie, VECTOR, that one specifically.
  • -g, --gdb β€” listen for a gdb connection on port 1234. the gdb girlies are gonna eat this up 😭
  • -ff β€” load the next .hex file as flash ⚑
  • -ee β€” load the next .hex file as eeprom 🌸
  • -i INPUT, --input INPUT β€” read input signals from a .vcd file. feed her 🫢
  • -v β€” raise the verbosity level. and listen, you can pass this one more than once β€” stack them like accessories πŸ’…
  • -h, --help β€” display the usage message and exit. she'll explain herself, politely ✨

πŸ¦‹ EXAMPLES πŸ¦‹

πŸ’œ AVR GDB DEBUGGING πŸ’œ

First, run the AVR firmware simulation:

simavr -g -m atmega328p -f 16000000 firmware.elf

Then start avr-gdb β€” and optionally enable tui for better source code readability, because reading source in tui is chef's kiss πŸ‘©πŸ³πŸ’‹:

avr-gdb
(gdb) tui enable

Load the elf formatted firmware and connect to the running simulation:

(gdb) file firmware.elf
(gdb) target remote :1234

Now set a break point and go ahead, debug:

(gdb) break main
(gdb) continue
(gdb) next
(gdb) next

periodt. you're debugging, you're thriving, you're literally in your gdb era 🌈⭐


πŸ‘‘ AUTHOR πŸ‘‘

This manual page was written by Milan Kupcevic <milan@debian.org> 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. 🫢 (yes bestie, that's the legal bit β€” it stays exactly as is, no edits, iykyk)


🌟 SEE ALSO 🌟


okay that's the whole page, no skips, no summaries, every single flag accounted for πŸ’–

and that's a wrap, bestie!! this page is from the AVR simulator manual, dated April 2018, filed under SIMAVR(1) πŸŽ€πŸ’…βœ¨ go simulate something iconic πŸ¦‹