Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pipe01/InfiniEmu

Emulates an ARM Cortex M4 CPU capable of running InfiniTime
https://github.com/pipe01/InfiniEmu

arm armv7 armv7m emulator pinetime pinetime-smartwatch

Last synced: 4 months ago
JSON representation

Emulates an ARM Cortex M4 CPU capable of running InfiniTime

Awesome Lists containing this project

README

        

# InfiniEmu

InfiniEmu is an emulator that emulates a full [PineTime](https://pine64.org/devices/pinetime/) smartwatch, which includes:

* [NRF52832](https://www.nordicsemi.com/Products/nRF52832) along with its ARM Cortex M4 CPU and peripherals,
* BMA425 I2C accelerometer
* CST816S I2C touch screen controller
* HRS3300 I2C heart rate sensor
* ST7789 SPI LCD display controller
* A generic SPI flash based on the XT25F32B-S

## Disclaimer

This project isn't production ready by any means, and the emulation almost definitely doesn't completely match a real device.

The goal is to be able to run the same image with the emulator as you would flash on a real device, however InfiniTime 1.14.0 doesn't work on InfiniEmu because of [an issue](https://github.com/InfiniTimeOrg/InfiniTime/pull/2070) that's already fixed but hasn't yet been released on an InfiniTime version. Compiling the latest commit from the InfiniTime repo works fine.

Many things are yet to be implemented, including but not limited to:

* Adjusting battery voltage input
* Sending heartrate data
* Bluetooth

# Usage

There are currently no releases, the easiest way to run InfiniEmu is to download the AppImage artifact from the latest successful [action run](https://github.com/pipe01/InfiniEmu/actions).

To run InfiniEmu, use the following command: `./InfiniEmu-x86_64.AppImage `, where `` is the path to the ELF or binary file containing the firmware to run. If an ELF file with symbols is passed, additional information such as FreeRTOS free heap size will be available.

## Online previewer

There is a hosted version of the web previewer at `tools/web-previewer` available at `https://pipe01.net/infiniemu/preview`. This endpoint can take the following parameters:

- `fw`: specifies what firmware to run. This can be either a pull request number in the form `pr/123`, a Git commit hash or a Git ref like `heads/main` or `tags/1.10.0`.
- `info`: include information about the run at the bottom of the image.
- `no-cache`: do not reuse cached data about the run.
- `script`: the script to run. A script consists of one or more commands separated by commas. You can use underscores where spaces would usually go for convenience when pasting the script into a URL. For an up to date list of commands check the [`script.go`](https://github.com/pipe01/InfiniEmu/blob/master/frontend/desktop/script/script.go) file, specifically the `commands` map.

> [!CAUTION]
> When using a preview URL inside a GitHub markdown document (READMEs, issues, pull requests, etc) make sure to visit the URL on your browser before adding it to the markdown text, otherwise GitHub's servers will time out the request before the preview is generated.

> [!NOTE]
> Previews can take a bit to generate depending on your script, please allow up to 30 seconds before giving up.

### Example:

`https://pipe01.net/infiniemu/preview?fw=heads/main&script=run_1s,screenshot`

![](https://pipe01.net/infiniemu/preview?fw=heads/main&script=run_1s,screenshot)

`https://pipe01.net/infiniemu/preview?fw=heads/main&info=true&script=run_1s,screenshot,swipe_right,run_300ms,screenshot,tap_180_180,run_300ms,screenshot,tap_120_200,run_300ms,screenshot,tap_36_203,run_300ms,screenshot,button_1s,run_300ms,screenshot`

![](https://pipe01.net/infiniemu/preview?fw=heads/main&info=true&script=run_1s,screenshot,swipe_right,run_300ms,screenshot,tap_180_180,run_300ms,screenshot,tap_120_200,run_300ms,screenshot,tap_36_203,run_300ms,screenshot,button_1s,run_300ms,screenshot)

# Screenshots

![](docs/screenshot.jpg)