SIMULATOR(1)

πŸ“¦
version 15.1 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ‘‘ SIMULATOR β€” the GNU simulator for AVR, bestie edition

okay so. this is the manual page for simulator, the GNU simulator for AVR, and it lives in section 1 of the manual, under User Commands. it's literally the whole vibe. let's get into it πŸ’…


✨ NAME ✨

simulator β€” GNU simulator for AVR. that's the name, that's the game, no cap.


🌸 SYNOPSIS 🌸

avr-run [options] [VAR=VAL|--] program [program args]

like... that's it. that's the whole entrance exam. options, then a program, and optionally some env vars or a -- and then the program's own args. iconic behavior honestly πŸ¦‹


πŸŽ€ OPTIONS πŸŽ€

here's where it gets long, bestie. strap in. every single one of these is real and every single one matters.

  • -t[on|off], --trace[=on|off] β€” trace useful things ✨ the general-purpose tracing switch.
  • --trace-insn[=on|off] β€” do instruction tracing. one instruction at a time, we love to see it.
  • --trace-disasm[=on|off] β€” disassemble instructions. it's slower, but more accurate β€” pick your fighter.
  • --trace-decode[=on|off] β€” trace instruction decoding.
  • --trace-extract[=on|off] β€” trace instruction extraction.
  • --trace-linenum[=on|off] β€” do line number tracing. heads up: this implies --trace-insn, so it comes with friends.
  • --trace-memory[=on|off] β€” trace memory operations.
  • --trace-alu[=on|off] β€” trace ALU (Arithmetic Logic Unit) operations.
  • --trace-fpu[=on|off] β€” trace FPU (Floating Point Unit) operations.
  • --trace-vpu[=on|off] β€” trace VPU (Vector Processing Unit) operations.
  • --trace-branch[=on|off] β€” trace branching. where are we going?? nowhere, we're branching.
  • --trace-semantics[=on|off] β€” does ALU, FPU, VPU, MEMORY, and BRANCH tracing all at once. the combo meal πŸ“
  • --trace-model[=on|off] β€” include model performance data.
  • --trace-core[=on|off] β€” trace core operations.
  • --trace-events[=on|off] β€” trace events.
  • --trace-syscall[=on|off] β€” trace system calls.
  • --trace-register[=on|off] β€” trace cpu register accesses.
  • --trace-debug[=on|off] β€” adds information useful for debugging the simulator itself to the tracing output. simulator-ception.
  • --trace-file FILE NAME β€” specify the tracing output file.
  • -p[on|off], --profile[=on|off] β€” do profiling.
  • --profile-insn[=on|off] β€” do instruction profiling.
  • --profile-memory[=on|off] β€” do memory profiling.
  • --profile-core[=on|off] β€” do CORE profiling.
  • --profile-model[=on|off] β€” do model profiling.
  • --profile-cpu-frequency CPU FREQUENCY β€” specify the speed of the simulated cpu clock.
  • --profile-file FILE NAME β€” specify the profile output file.
  • --profile-pc[=on|off] β€” do PC profiling.
  • -F PC PROFILE FREQUENCY, --profile-pc-frequency PC PROFILE FREQUENCY β€” the specified PC profiling frequency.
  • -S PC PROFILE SIZE, --profile-pc-size PC PROFILE SIZE β€” specify PC profiling size.
  • --profile-pc-granularity PC PROFILE GRANULARITY β€” specify PC profiling sample coverage.
  • --profile-pc-range BASE,BOUND β€” specify PC profiling address range.
  • --hw-info, --info-hw β€” list configurable hw regions.
  • --hw-trace[=on|off], --trace-hw β€” trace all hardware devices. all of them. every last one πŸ”₯
  • --hw-device DEVICE β€” add the specified device.
  • --hw-list β€” list the device tree.
  • --hw-file FILE β€” add the devices listed in the file.
  • --sockser-addr SOCKET ADDRESS β€” set serial emulation socket address.
  • --watch-cycles-ACTION [+]COUNT β€” watch the simulator, take ACTION in COUNT cycles (+ for every COUNT cycles). ACTION is int breakpoint.
  • --watch-pc-ACTION [!]ADDRESS β€” watch the PC, take ACTION when it matches ADDRESS (in range ADDRESS,ADDRESS). ! negates the test.
  • --watch-clock-ACTION [+]MILLISECONDS β€” watch the clock, take ACTION after MILLISECONDS (+ for every MILLISECONDS).
  • --watch-delete IDENT|all|pc|cycles|clock β€” delete a watchpoint.
  • --watch-info β€” list scheduled watchpoints.
  • --memory-delete ADDRESS|all, --delete-memory ADDRESS β€” delete memory at ADDRESS (or all addresses).
  • --memory-region ADDRESS,SIZE[,MODULO] β€” add a memory region.
  • --memory-alias ADDRESS,SIZE{,ADDRESS} β€” add memory shadow.
  • --memory-size <size>[in bytes, Kb (k suffix), Mb (m suffix) or Gb (g suffix)] β€” add memory at address zero.
  • --memory-fill VALUE β€” fill subsequently added memory regions.
  • --memory-clear β€” clear subsequently added memory regions.
  • --memory-mapfile FILE β€” memory-map the next memory region from a file.
  • --memory-info, --info-memory β€” list configurable memory regions.
  • --map-info β€” list mapped regions.
  • --model MODEL β€” specify the model to simulate.
  • --model-info, --info-model β€” list selectable models.
  • -v, --verbose β€” verbose output. say more, king.
  • -E B|big|L|little, --endian B|big|L|little β€” set endianness.
  • --environment user|virtual|operating β€” set running environment.
  • --alignment strict|nonstrict|forced β€” set memory access alignment.
  • -D, --debug β€” print debugging messages.
  • --debug-insn β€” print instruction debugging messages.
  • --debug-file FILE NAME β€” specify the debugging output file.
  • --do-command COMMAND β€” (the original page gives no description here, bestie. it's giving mystery. we simply report it and move on πŸ™ˆ)
  • -h, --help β€” print help information.
  • --version β€” print version information.
  • --architecture MACHINE β€” specify the architecture to use.
  • --architecture-info, --info-architecture β€” list supported architectures.
  • --target BFDNAME β€” specify the object-code format for the object files.
  • --target-info, --info-target β€” list supported targets.
  • --load-{lma,vma} β€” use VMA or LMA addresses when loading the image. default is LMA.
  • --sysroot SYSROOT β€” root for system calls with absolute file-names and cwd at start.
  • --argv0 ARGV0 β€” set argv[0] to the specified string.
  • --env-set VAR=VAL β€” set the variable in the program's environment.
  • --env-unset VAR β€” unset the variable in the program's environment.
  • --env-clear β€” clear the program's environment.
πŸ“Œ Note: depending on the simulator configuration, some options may not be applicable. so if one of these is ghosting you, that might be why.

and then the two positional-ish things:

  • VAR=VAL β€” environment variables to set. ignored if -- is used.
  • program args β€” arguments to pass to the simulated program.
πŸ’€ Note: very few simulators support this. (the program args thing. just so you know what you're walking into.)

Copyright Β© 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.

(that's the actual legal text, bestie β€” free software means free to change and redistribute, and NO WARRANTY means exactly that, no cap.)


🌈 SEE ALSO 🌈

the full documentation for simulator is maintained as a Texinfo manual. if the info and simulator programs are properly installed at your site, the command

info simulator

should give you access to the complete manual. go read it, it's the director's cut 🫢


and that's a wrap, babes πŸ’œ this was GNU simulator (SIM) 13.2, dated September 2023. periodt. ✨

πŸ“¦ where this page comes from