Skip to main content

What is it ?

yasimavr - Yet another simulator for Microchip AVR microcontrollers - is a simulator for AVR 8-bits microcontrollers. It is mainly aimed at the Mega0 and later XT core series with a possibility to work with older series. (ATMega48/88/168/328 for example)

It is composed of 2 layers:

  • a C++ layer for the core API and the various peripheral simulation models

  • a Python layer to handle the configuration, utilities, data recording, and external components

Installation

Prerequisites:

  • Python (>=3.9) and PIP

  • For Linux distributions, libelf-dev is required: (for example: sudo apt-get install libelf-dev)

Install:

  • execute: pip install yasimavr

The python bindings for the C++ librairies are built with the SIP tool from RiverbankComputing (https://www.riverbankcomputing.com)

Thanks

Quite a few ideas in this software - and even big chunks of code - originate from simavr. (https://github.com/buserror/simavr) Big thanks to the simavr authors for this great tool !

Supported Cores

The package includes a predefined set of MCU models:

  • ATMegaxx8 series (ATMega48/88/168/328)

  • ATTinyx4 series (ATTiny24/44/84)

  • ATMega 0-series (ATMega808/809/1608/1609/3208/3209/4808/4809)

  • ATTiny 0-series (ATTiny202/204/402/404/406/804/806/807/1604/1606/1607)

  • ATTiny 1-series (ATTiny212/214/412/414/416/814/816/817/1614/1616/1617/3216/3217)

  • ATTiny 2-series (ATTiny424/426/427/824/826/827/1624/1626/1627/3226/3227)

Other device models can be easily simulated by creating a YAML config file. A template is provided, and the example atgiga4809 shows how to load and use a customised device configuration. New simulation models for peripherals can be created in Python or C++ using the provided API.

Features

  • Real-time/Fast mode : yasimavr can try to sync the simulated time with system time or run as fast as possible

  • AVR-GDB integration : yasimavr can acts as a GDB backend stub, with support for breakpoints and watchpoints

  • VCD export : yasimavr can export traces of pin states, GPIO ports, interrupt vectors, memory locations or generic signals in Value Change Dump (VCD) files

  • MCU dump : at any point of the simulation, yasimavr can create a snapshot of the state of the MCU model, including all registers and memories and save it in a text file.

  • “Zombie” mode : yasimavr can directly interact with simulated peripherals by acting as the CPU. This is useful to verify customised peripheral models or a test script.

  • Probing : yasimavr can read/write CPU registers or memories on-the-fly. This is useful to force the firmware into certain branches for example, improving test coverage.

How to use

yasimavr can be used as a Python package to run a prepared simulation script. (See the examples for how it looks like)

It also supports direct command line use:

python -m yasimavr [options] [firmware]

For the list of command line options:

python -m yasimavr -h

Some simple script examples are available here: https://github.com/clesav/yasimavr/tree/main/examples

Documentation

The documentation is still a work in progress but will be progressively completed. The online version, including an API reference, can be read on the Read the Docs:

Metadata

Release files for yasimavr 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yasimavr 0.2.0
File Size Uploaded Provenance Actions
yasimavr-0.2.0.tar.gz 367.9 kB Without provenance Details for yasimavr-0.2.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for yasimavr 0.2.0
File Actions
yasimavr-0.2.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for yasimavr-0.2.0-cp314-cp314-win_amd64.whl
yasimavr-0.2.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for yasimavr-0.2.0-cp313-cp313-win_amd64.whl
yasimavr-0.2.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for yasimavr-0.2.0-cp312-cp312-win_amd64.whl
yasimavr-0.2.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for yasimavr-0.2.0-cp311-cp311-win_amd64.whl
yasimavr-0.2.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for yasimavr-0.2.0-cp310-cp310-win_amd64.whl
yasimavr-0.2.0-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for yasimavr-0.2.0-cp39-cp39-win_amd64.whl

Total release size: 11.2 MB

Release files / yasimavr-0.2.0.tar.gz

Download URL yasimavr-0.2.0.tar.gz
Size 367.9 kB
Tags Source
SHA-256 checksum
How to use checksums
42185ed145cda1a6c485602b905dff2f15e4f89f924c2fa216670cd272272e15
BLAKE2b-256 checksum
How to use checksums
a5b40ae79231e8c283bdd31099743bc6083a787767b6692a0e2f33379d12a904
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / yasimavr-0.2.0-cp314-cp314-win_amd64.whl

Download URL yasimavr-0.2.0-cp314-cp314-win_amd64.whl
Size 1.9 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
443f461bf02bca30babae9b10450b12fb4cd426a966b0f881d4a5b525fd4ef77
BLAKE2b-256 checksum
How to use checksums
d0359a117e355ebedfd31feb5cb5bf7ad8927828ecfa7e3fed354842dece6d57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / yasimavr-0.2.0-cp313-cp313-win_amd64.whl

Download URL yasimavr-0.2.0-cp313-cp313-win_amd64.whl
Size 1.8 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
c80227f9382f8bdeabdbfd954bd93ecb8bdee466cf77a2c2a76cac1f02f76c3f
BLAKE2b-256 checksum
How to use checksums
c89defae22524a874a2bd77883e31bdfd029aeecfd893148e5f96fac8d4c4aa1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / yasimavr-0.2.0-cp312-cp312-win_amd64.whl

Download URL yasimavr-0.2.0-cp312-cp312-win_amd64.whl
Size 1.8 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
2bac7f80c173037039a971a4f6ae5202fb9407e0823cd75a597c23e92572008d
BLAKE2b-256 checksum
How to use checksums
00fd4924ce727ffe7788f768f3940c21442165d616fae043cc820ffcd3a23404
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / yasimavr-0.2.0-cp311-cp311-win_amd64.whl

Download URL yasimavr-0.2.0-cp311-cp311-win_amd64.whl
Size 1.8 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
484963f15a83fe5464353e4e01c29936c594b69315c36d6c855e581467aff9df
BLAKE2b-256 checksum
How to use checksums
45efee7b334bbce724759eee8a1381e561246edb91c8555fa25001224860bb1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / yasimavr-0.2.0-cp310-cp310-win_amd64.whl

Download URL yasimavr-0.2.0-cp310-cp310-win_amd64.whl
Size 1.8 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
bbb7e252f8403f54bfeab3c3ed329033493f855b23503f6ee21ab1420b827326
BLAKE2b-256 checksum
How to use checksums
dab21ea641fa1cb1adce0a4406f149076ce43e6045d29131cc5a53392d6b0b86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / yasimavr-0.2.0-cp39-cp39-win_amd64.whl

Download URL yasimavr-0.2.0-cp39-cp39-win_amd64.whl
Size 1.8 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
46839ee16a4f5babed294a15df598160c8e016c27c4697ace758df034941d91f
BLAKE2b-256 checksum
How to use checksums
677f8c3d914a5e8ab1143a94941cfac3a5d1a60055eb59853e377f606dc1dae7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for yasimavr 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page