SIMULATOR(1)
π 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 isint 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β setargv[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 π
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
- debian trixie: gdb-avr 15.1-1+b3 Β· GPL-3.0-or-later
- ubuntu noble: gdb-avr 13.2-3ubuntu3 Β· GPL-3.0-or-later
- ubuntu questing: gdb-avr 15.1-1
- ubuntu resolute: gdb-avr 15.1-1build1 Β· GPL-3.0-or-later
- ubuntu stonking: gdb-avr 15.1-1build1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms