Skip to content

A set of C and Python based utilities for the Signaloid C0-microSD

License

Notifications You must be signed in to change notification settings

signaloid/C0-microSD-utilities

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C0-microSD Utilities

This repository offers a set of common C and Python libraries for building host applications that interact with the Signaloid C0-microSD hot-pluggable hardware module, as well as the C0_microSD_toolkit, which you can use to flash new bitstreams and firmware to the device.

Interfacing with the Signaloid C0-microSD

When connected to a host computer, the Signaloid C0-microSD presents itself as an unformatted block storage device. Communication with the device is achieved through block reads and writes to a set of pre-defined addresses. The C0-microSD can operate in two different modes when connected to a host: Bootloader mode and Signaloid SoC mode.

  • Bootloader mode: This mode allows flashing new bitstreams and firmware to the device.
  • Signaloid SoC mode: This is the built-in Signaloid C0 SoC, which features a subset of Signaloid's uncertainty-tracking technology.

Interfacing with the C0-microSD varies depending on the active mode.

In the src/ folder, you will find common functions and classes for building C and Python applications that interact with the C0-microSD when the Signaloid SoC mode is active.

Using the C0_microSD_toolkit.py tool

You can use the C0_microSD_toolkit.py Python script to configure the C0-microSD and flash new firmware. The script is written and tested in Python 3.11 on MacOS 14.5 and does not use any additional libraries. Following are the program's command-line arguments and usage examples:

usage: C0_microSD_toolkit.py [-h] -t TARGET_DEVICE [-b INPUT_FILE] [-u | -q | -w | -s | -i] [-f]

Signaloid C0_microSD_toolkit. Version 1.1

options:
  -h, --help        Show this help message and exit.
  -t TARGET_DEVICE  Specify the target device path.
  -b INPUT_FILE     Specify the input file for flashing (required with -u, -q, or -w).
  -u                Flash user data.
  -q                Flash new Bootloader bitstream.
  -w                Flash new Signaloid SoC bitstream.
  -s                Switch boot mode.
  -i                Print target C0-microSD information, and run data verification.
  -f                Force flash sequence (do not check for bootloader).

Important

All options except of -s require the C0-microSD to be in Bootloader mode.

Examples:

The following examples assume that the C0-microSD is located in/dev/sda.

Flash new custom user bitstream:

sudo python3 ./C0_microSD_toolkit.py -t /dev/sda -b user-bitstream.bin

Flash new user data:

sudo python3 ./C0_microSD_toolkit.py -t /dev/sda -b program.bin -u

Flash new Bootloader bitstream:

sudo python3 ./C0_microSD_toolkit.py -t /dev/sda -b bootloader-bitstream.bin -q

Flash new Signaloid SoC bitstream:

sudo python3 ./C0_microSD_toolkit.py -t /dev/sda -b signaloid-soc.bin -w

Toggle boot mode of C0-microSD:

sudo python3 ./C0_microSD_toolkit.py -t /dev/sda -s

Print target C0-microSD information and verify loaded bitstreams:

sudo python3 ./C0_microSD_toolkit.py -t /dev/sda -i

Note

Using the -s option will toggle the active configuration. So, if the device has booted in Bootloader mode, this option will switch to Signaloid SoC mode, and vice versa.

About

A set of C and Python based utilities for the Signaloid C0-microSD

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published