Metadata-Version: 2.4
Name: pymcu-avr
Version: 0.1.0a1.post1
Summary: AVR support for pymcu-compiler: codegen backend + toolchain driver
Project-URL: Homepage, https://github.com/PyMCU/pymcu-avr
Project-URL: Repository, https://github.com/PyMCU/pymcu-avr
Project-URL: Bug Tracker, https://github.com/PyMCU/pymcu-avr/issues
Author-email: Iván Montiel Cardona <contact@pymcu.org>
License: MIT
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: pymcu-avr-toolchain>=15.2.0; (sys_platform == 'linux' and platform_machine == 'x86_64') or (sys_platform == 'win32' and platform_machine == 'AMD64') or (sys_platform == 'darwin' and platform_machine == 'arm64')
Requires-Dist: pymcu-sdk>=0.1.0a1
Description-Content-Type: text/markdown

# pymcu-avr

AVR (ATmega/ATtiny) backend for the PyMCU compiler. Free and open source.

Bundles the `pymcuc-avr` AOT binary that reads `.mir` IR files and emits AVR assembly,
then drives the AVR toolchain to produce a flashable Intel HEX file.

## Pipeline

```
pymcuc --emit-ir        →  firmware.mir    (target-agnostic IR)
pymcuc-avr (this pkg)   →  firmware.asm    (AVR assembly)
avr-as / avra           →  firmware.hex    (Intel HEX)
```

## Installation

```bash
pip install pymcu-avr
```

The AVR toolchain (`avr-gcc`, `avr-as`, `avr-objcopy`) is sourced (in order) from the
`pymcu-avr-toolchain` wheel cache, common system install paths, or `PATH`. A system
`avr-gcc` also works with no extra package:

```bash
# macOS
brew tap osx-cross/avr && brew install avr-gcc

# Debian/Ubuntu
apt install gcc-avr binutils-avr avr-libc
```

## Supported targets

Families: `atmega`, `attiny`, `at90`, `atxmega`.  
Examples: ATmega328P, ATmega2560, ATmega32U4, ATtiny85.

## Layout

```
src/python/pymcu/backend/avr/     backend plugin — wraps pymcuc-avr
src/python/pymcu/toolchain/avr/   AVR toolchain driver (assemble → HEX)
src/csharp/lib/                   AvrBackendProvider + codegen
src/csharp/cli/                   pymcuc-avr runner CLI
src/csharp/debugserver/           GDB-stub debug server
src/csharp/profiler/              cycle-accurate profiler
```

## Status

Alpha (API) / stable (codegen). 700+ integration tests green across ATmega328P,
ATmega2560, ATmega32U4, ATtiny85.
