microhil

microHIL


Project maintained by electux Hosted on GitHub Pages — Theme by mattgraham

microHIL

microhil is development device which can be used for HWIL.

The README is used to introduce the tool and provide instructions on how to install the tool, any machine dependencies it may have and any other information that should be provided before the tool is installed.

Table of Contents

Statistics

Contributing activities

GitHub issues open GitHub contributors

SW Firmware checks

microhil_base C checker microhil_base_ble C checker microhil_base_wifi C checker microhil_nuttx C checker microhil_upy Python checker

SW Firmware test checks

microhil_base tests microhil_base_ble tests microhil_base_wifi tests microhil_nuttx tests microhil_upy tests

SW Desktop checks

microhildesk build checker microhil-desktop build checker

SW Desktop test checks

microhildesk tests

Development

SW Firmware Application

microhil-base

A C-based firmware designed for the microHIL hardware controller (Raspberry Pi Pico). It acts as the direct hardware interface layer, managing physical relays, status LEDs, and buzzer alerts by parsing and executing command protocols received over standard serial interfaces.

microhil-base-ble

A C-based firmware designed for the microHIL hardware controller (Raspberry Pi Pico W). It integrates the CYW43439 wireless chipset with the BTstack Bluetooth stack, exposing a Nordic BLE UART (SPP) GATT service for wireless HWIL control, physical relay management, status LEDs, and buzzer alerts.

microhil-base-wifi

A C-based firmware designed for the microHIL hardware controller (Raspberry Pi Pico W). It utilizes the CYW43439 Wi-Fi chipset, lwIP raw TCP socket server, and on-board Flash NVM storage, allowing full remote HWIL control over Wi-Fi TCP/IP (Access Point or Station mode) with live USB-Serial network provisioning.

microhil-nuttx

An RTOS-based firmware built on Apache NuttX (v12.0.0+) for the microHIL hardware controller (Raspberry Pi Pico). It runs a low-latency, non-blocking background daemon (microhil_daemon) for controlling hardware channels and features a combined boot mode that exposes a NuttX Shell (NSH) console on the physical UART0 interface.

microhil-upy

A MicroPython-based firmware designed for the microHIL hardware controller (Raspberry Pi Pico). It implements a non-blocking execution loop that manages channel states, timer-based activities, status LEDs, and buzzer beeps by processing command strings in a structured <mh#...#end> format received over serial connections.

SW Desktop Application

microhildesk

A desktop GUI application built in C++ using gtkmm. It acts as the primary orchestration and control panel, allowing users to interact with and manage microHIL hardware controllers visually.

Installation

Debian Linux OS

Navigate to release page download and extract release archive.

SW Firmware Application installation

To install microhil-base type the following

# Clone the repository
git clone https://github.com/electux/microhil.git
cd microhil/sw/microhil_base

# Create build directory
mkdir build && cd build

# Configure build (ensure PICO_SDK_PATH is set)
cmake -DPICO_SDK_PATH=/path/to/pico-sdk ..

# Build
make

# Deploy by copying the generated microhil-base.uf2 file to the Pico mounted storage
cp src/microhil-base.uf2 /media/$USER/RPI-RP2/

To install microhil-base-ble type the following

# Clone the repository
git clone https://github.com/electux/microhil.git
cd microhil/sw/microhil_base_ble

# Create build directory
mkdir build && cd build

# Configure build (ensure PICO_SDK_PATH is set)
cmake -DPICO_SDK_PATH=/path/to/pico-sdk ..

# Build
make

# Deploy by copying the generated microhil-base-ble.uf2 file to the Pico W mounted storage
cp src/microhil-base-ble.uf2 /media/$USER/RPI-RP2/

To install microhil-base-wifi type the following

# Clone the repository
git clone https://github.com/electux/microhil.git
cd microhil/sw/microhil_base_wifi

# Create build directory
mkdir build && cd build

# Configure build (ensure PICO_SDK_PATH is set)
cmake -DPICO_SDK_PATH=/path/to/pico-sdk ..

# Build
make

# Deploy by copying the generated microhil-base-wifi.uf2 file to the Pico W mounted storage
cp src/microhil-base-wifi.uf2 /media/$USER/RPI-RP2/

To install microhil-nuttx type the following

# Clone the repository recursively (to pull the NuttX submodule)
git clone --recursive https://github.com/electux/microhil.git
cd microhil/sw/microhil_nuttx
 
# Build the firmware (automatically configures if .config is missing)
make
 
# Deploy by copying the generated microhil-nuttx.uf2 file to the Pico mounted storage
# Note: Ensure the Pico is in BOOTSEL mode before running
make flash

To install microhil-upy type the following

# Clone the repository recursively (to pull the MicroPython submodule)
git clone --recursive https://github.com/electux/microhil.git
cd microhil/sw/microhil_upy
 
# Setup virtual environment and generate typings for development
make env

# Compile the MicroPython OS firmware image (.uf2) from source
make firmware

# Flash the compiled OS firmware to Raspberry Pi Pico (in BOOTSEL mode)
make flash
 
# Compile Python application scripts to .mpy bytecodes and stage deployment package
make
 
# Deploy the compiled scripts to Raspberry Pi Pico (using mpremote)
make deploy

SW Desktop Application installation

To install microhildesk type the following

From Source:

# Clone the repository
git clone https://github.com/electux/microhil.git
cd microhil/sw/microhildesk/build

# Build the release version
make release

# Run the application
./microhildesk

As a Debian Package (.deb):

# Generate the .deb package
python3 sw/microhildesk/scripts/deb/create_deb.py

# Install the package
sudo dpkg -i sw/microhildesk/build/deb_dist/microhildesk_*.deb

Dependencies

SW Firmware Application dependencies

microhil-base requires next modules and libraries

microhil-base-ble requires next modules and libraries

microhil-base-wifi requires next modules and libraries

microhil-nuttx requires next modules and libraries

microhil-upy requires next modules and libraries

SW Desktop Application dependencies

microhildesk requires next modules and libraries

Docs

Documentation Status

More documentation and info at

microHIL Licenses

License: GPL v3 License

microhil is free software and is dual-licensed under the GPLv3 and Apache 2.0 licenses. Copyright (C) 2020 - 2026 by electux.github.io/microhil.

Third-Party Component Licenses

This project utilizes several open-source technologies, each under their respective licenses:

Lets help and support Raspberry PI, Nuttx, MicroPython and GNOME.

GNOME&&RPi