Reading the repo
Opening the box…
Reading the repo
Opening the box…
How to install on macOS
HealthyPi 6 firmware — tri-core biosignal acquisition platform (STM32H757 + ESP32-C6), built on Zephyr RTOS
Saved setup from 12 h ago
Will it work on macOS?
Hardware design files — KiCad schematics and PCB layouts, HealthyLink module
boards and the enclosure — are in
protocentral_healthypi6_hardware.
Current board revision: healthypi6_v5. Earlier revisions (v2–v4) remain in
the tree and are electrically similar; v5 is the one actively built and tested.
CONTRIBUTING.mdThank you for your interest in contributing to HealthyPi 6! This document provides guidelines for contributing to the project.
This project adheres to a Code of Conduct. By participating, you are expected to uphold this code.
# Clone the repository
west init -m https://github.com/Protocentral/healthypi-6-fw --mr main hpi6-workspace
cd hpi6-workspace
west update
# Activate Zephyr environment
source ~/zephyrproject/.venv/bin/activate
# Build and test
scripts/build.sh m4 && scripts/build.sh m7
scripts/flash.sh all
There are four scripts, and they take a target:
| Command | Description |
|---------|-------------|
| scripts/build.sh m7 [dev\|prod] | M7 application + display UI → build/m7 |
| scripts/build.sh m4 | M4 algorithm core → build/m4 |
| scripts/build.sh signed [dev\|prod] | MCUboot + signed M7 → build/m7s |
| scripts/build.sh esp32 | ESP32-C6 (external HealthyBridge repo) |
| scripts/flash.sh [all\|m7\|m4\|signed\|factory\|esp32] | Flash over SWD |
| scripts/release.sh | Production build + firmware bundle (zip) |
| source scripts/env.sh | Just the environment (venv, board, paths) |
Never call west build directly. The scripts select the board variant, the
conf fragments, the DT overlays and the output directory; a raw invocation
silently drops the display fragment and the signed layer.
A build.sh m7 image cannot be updated in the field — no bootloader, no
MCUmgr img group, no recovery entry. That is fine for development and wrong for
anything that leaves the building. See docs/ARCHITECTURE.md.
Use descriptive branch names:
feature/add-ecg-filter - New featuresfix/ipc-timeout - Bug fixesdocs/update-readme - Documentationrefactor/cleanup-module - Code refactoringFollow conventional commit format:
type(scope): short description
Longer description if needed.
Fixes #123
Types: feat, fix, docs, refactor, test, chore
Examples:
feat(ecg): add digital filter for 50Hz noise rejection
fix(ipc): resolve message timeout in high-load conditions
docs(readme): update build instructions for Zephyr 4.4
/**
* @brief Send data batch via IPC
* @param type Message type (HPI_IPC_MSG_TYPE_*)
* @param data Pointer to data buffer
* @param len Length of data in bytes
* @return 0 on success, negative errno on failure
*/
int hpi_ipc_send(uint8_t type, const void *data, size_t len)
{
if (data == NULL || len == 0) {
return -EINVAL;
}
// Implementation
}
k_msgq_put() + k_work_submit()%u/%d for uint32_t/int32_t (both cores are
32-bit ARM, where uint32_t is unsigned int); %zu for size_t, %p for pointersstatic lv_style_tAll source files should include the SPDX license header:
/*
* Copyright (c) 2024-2026 Protocentral Electronics
* SPDX-License-Identifier: MIT
*/
MIT is the default for new code written for this project. Use Apache-2.0
only on a file that is derived from, or co-copyright with, upstream Zephyr, ST,
Nordic, NXP or Espressif — board definitions, devicetree bindings and panel
drivers, typically — because those cannot be relicensed. The per-file identifier
is authoritative; see LICENSE.md.
scripts/build.sh m7, scripts/build.sh m4 and scripts/build.sh signed
all build without warnings. The signed flavor is the one that ships and the one
that breaks; a green dev build says nothing about it. Signed builds use your
own dev key (keys/hp6_dev_ec256.pem, generated on first use, never
committed). To run your builds on a unit programmed at the factory, see
"Your device, your key" in .github/SECURITY.md.## Description
Brief description of changes.
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Refactoring
## Testing
- [ ] Tested on HealthyPi 6 hardware
- [ ] Builds with `scripts/build.sh m7`, `m4` and `signed`
- [ ] `tools/ci/check_layer_deps.sh` passes
- [ ] No new warnings
## Related Issues
Fixes #123
Include:
Include:
healthybridge-esp32Thank you for contributing!
Then run bash setup.sh. It stops at the first error and is safe to run again. Servers and tests aren't started; it lists them at the end. Read it first.
Compare yours with the README's “Hardware” list above before installing anything.
Needs Git: xcode-select --install
git clone https://github.com/Protocentral/healthypi-6-fw.git cd healthypi-6-fw
C/C++ compiler, CMake
xcode-select --install brew install cmake
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release cmake --build build
Install the Zephyr toolchain
first — Zephyr SDK, west, and a Python virtual environment.
# 1. Create the workspace
west init -m https://github.com/protocentral/healthypi-6-fw --mr main hpi6-workspace
cd hpi6-workspace && west update
# 2. Set up the environment (venv, board, paths)
cd healthypi-6-fw
source scripts/env.sh
# 3. Build and flash both cores
scripts/build.sh m7
scripts/build.sh m4
scripts/flash.sh all
Plug in USB: the device enumerates two serial ports and starts streaming.
No reports for macOS yet.
GitManual AI Agent reads the 8 key files and writes a step-by-step guide for macOS. Once written, it's saved for everyone.