{"id":17290502,"url":"https://github.com/squell/fastavr","last_synced_at":"2026-02-24T15:37:24.877Z","repository":{"id":22797742,"uuid":"26144128","full_name":"squell/fastavr","owner":"squell","description":"Atmel AVR simulator written in x86 assembly","archived":false,"fork":false,"pushed_at":"2024-11-29T17:28:40.000Z","size":195,"stargazers_count":15,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-11T10:44:04.820Z","etag":null,"topics":["assembly","avr","c","simulation"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/squell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-11-03T23:38:27.000Z","updated_at":"2025-05-07T16:41:45.000Z","dependencies_parsed_at":"2024-03-22T01:29:35.263Z","dependency_job_id":"fde40b50-aef6-43e5-94e4-2bf0314fbcee","html_url":"https://github.com/squell/fastavr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/squell/fastavr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squell%2Ffastavr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squell%2Ffastavr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squell%2Ffastavr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squell%2Ffastavr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/squell","download_url":"https://codeload.github.com/squell/fastavr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squell%2Ffastavr/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265710797,"owners_count":23815408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assembly","avr","c","simulation"],"created_at":"2024-10-15T10:38:24.268Z","updated_at":"2026-02-24T15:37:19.844Z","avatar_url":"https://github.com/squell.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"*fastavr*\n=======\n\nDeveloping AVR code usually involves a lot of simulation, by using programs such as:\n\n* _simavr_, an excellent all-round option, http://github.com/buserror/simavr/\n* _μsim_, aimed strictly at testing crypto protocols https://github.com/hberntsen/usim\n \nfastavr is like these, but with the main design goals of raw speed and simplicity of use; as well as being able to run actual bootloaders.\n\nFeatures\n=========\n\n* Supports all common AVR instructions (see below)\n* Optional user-definable behaviour of all AVR I/O ports\n* Interrupts and single-stepping\n* Possibility of simulating components using multi-threading\n* Much faster than a physical AVR\n\nExample\n=======\n\nSee the file `tester.c`; this reads an AVR program (in IHEX8 format) and executes it on a emulated Atmega2560, causing bytes\nwritten to USART0 to be written to the console.  It also defines a watchdog timer that can be used to auto-reset/kill a program\nthat is in a run-away condition (as described in Atmel's datasheets). Also emulated are the programmable timers TIMER0 and\nTIMER1, as well as EEPROM memory (for handling non-volatile data).\n\nBuilding\n========\n\nTo build this project, you will need to have support for developing 32-bit programs installed. E.g. by installing libc6-dev-i386 on Debian.\n\nOnce you have that, this is likely to work:\n```\nmake\n```\n\nConfiguration options are found in `avr_core_x86.s`.\n\nA quick test can be performed by running `make selftest`. This will test running .hex files directly, as well as flashing\nthe simulated board with AVRdude.\n\nTodo/Limitations\n====\n* TIMER0 and TIMER1 can be set to either track \"real time\" or track emulated clock cycles.\n  In the latter case, TIMER0/1 will be \"time accelerated\" since the emulator is much faster than a physical chip (unles you slow it down yourself).\n  If you want to perform more accurate cycle measurement using TIMER0, the latter is needed, but the Optiboot bootloader needs wall time.\n  Enable `TIME_ACCELERATION` to get the second behaviour.\n  + Other configurations are possible by playing around with the `instantiate_prescaler` invocations,\n    but you need to understand the code better to do that.\n\n* No support for Reduced Core AVR; cycle count not correct for XMEGA microcontrollers.\n \n* Not all illegal opcodes will result in an error. Neither will out-of-bounds SRAM accesses.\n\n* The core has not yet been ported to x86-64.\n\nAcknowledgements\n================\n\nWriting this pet project couldn't have been possible without Michel Pollet's excellent _simavr_.\n\nWithout the μNaCl project, testing this simulator wouldn't have been possible as well:\nhttp://munacl.cryptojedi.org/atmega.shtml\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquell%2Ffastavr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsquell%2Ffastavr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquell%2Ffastavr/lists"}