Metadata-Version: 2.4
Name: simulate-circuitpython-nativesim
Version: 3.2.3
Summary: Simulate CircuitPython using Zephyr simulator
Author-email: Alec Delaney <tekktrik@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/tekktrik/simulate-circuitpython
Keywords: adafruit,blinka,circuitpython,micropython,zephyr,simulate,simulator
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Embedded Systems
Classifier: Topic :: System :: Hardware
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pre-commit~=4.5; extra == "dev"
Dynamic: license-file

# simulate-circuitpython-nativesim

Simulate CircuitPython using Zephyr simulator

## prepare-system

Prepare the runner for the simulator (and possible build process)

### Inputs

None

### Outputs

None

## build-firmware

Build the nativesim firmware (or use a cached version if available)

### Inputs

| Argument Name | Description | Default | Notes |
| --- | --- | --- | --- |
| ``version`` | Version of CircuitPython to simulate | ``latest`` | Must be a version that supports the Zephyr OS native sim |
| ``circuitpython-folder`` | Folder name to use for the CircuitPython checkout | ``cpysim`` | Change this if it conflicts with another file/folder |
| ``firmware-filepath`` | Filepath for the built firmware | ``./firmware.exe`` |  |

### Outputs

| Argument Name | Description | Notes |
| --- | --- | --- |
| ``restored`` | Whether the firmware was restored from cache |  |

## download-firmware

Download the Zephyer simulator firmware

### Inputs

| Argument Name | Description | Default | Notes |
| --- | --- | --- | --- |
| ``version`` | Version of CircuitPython to simulate | ``latest`` | Must be a version that supports the Zephyr OS native sim |
| ``firmware-filepath`` | Filepath for the downloaded firmware | ``./firmware.exe`` |  |

### Outputs

| Argument Name | Description | Notes |
| --- | --- | --- |
| ``version`` | The firmware version downloaded |  |

## prepare-circuitpy

Prepare the CIRCUITPY folder

### Inputs

| Argument Name | Description | Default | Notes |
| --- | --- | --- | --- |
| ``code-py`` | Filepath for the desired code.py file | ``''`` |  |
| ``dependencies-file`` | Filepath for a dependency file for circup | ``''`` |  |
| ``version`` | The version of CircuitPython to use (if dependencies given) | ``latest`` |  |
| ``circuitpyn`` | Filepath to the CIRCUITPY folder to be created | ``CIRCUITPY`` |  |

### Outputs

None

## prepare-flash

Prepare the flash space for the simulator

### Inputs

| Argument Name | Description | Default | Notes |
| --- | --- | --- | --- |
| ``flash-filepath`` | Filepath for the desired flash binary file | ``./flash.bin`` |  |
| ``circuitpy`` | Filepath to file or folder of files to add to the simualted CIRCUITPY | N/A (required) |  |

### Outputs

None

## simulate

Run the simulator

### Inputs

| Argument Name | Description | Default | Notes |
| --- | --- | --- | --- |
| ``firmware-filepath`` | Filepath for the built firmware | ``./firmware.exe`` |  |
| ``flash-filepath`` | Filepath for the desired flash binary file | ``./flash.bin`` |  |

### Outputs

| Argument Name | Description | Notes |
| --- | --- | --- |
| ``output-text`` | The text output from the simulator |  |

## License

This library is available under an MIT license.
