Version | Last Changelog | Ready? |
---|---|---|
V1.2.x | First release version on Hardware V1 | ✅ |
V1.3.x | Add Hardware V2 support | ✅ |
V1.5.x | Rework ventilation algorithms (pressure control, alarms, code quality) | ✅ |
V3.0.x | Add Hardware V3 support, support for triggers, add mass flow meter | ✅ |
V4.0.x | Protocol V2 with ventilation modes, drop Hardware V1 & V2 support | ✅ |
V4.1.x | End-of-line test and fatal errors on the UI | ✅ |
For a full history of all minor versions, as well as details of all changes, see CHANGELOG.md.
A bleeding edge firmware version is available on the dev branch, which contains our latest improvements. This firmware version might still be work in progress and thus might not be suitable for production use.
master
branch may not contain the latest firmware version. It might not work with the latest version of makair-control-ui. In this case, please use the dev
branch instead.
Pre-compiled binaries are available in the Releases section.
Code documentation can be found there.
First, make sure arduino-cli
is installed on your system. The supported version is 0.9.0
. Newer versions are known to cause issues with compiling the firmware code.
In order to setup your environment and build the code, please follow the following commands (for MacOS):
brew install arduino-cli
arduino-cli config init --additional-urls https://github.com/stm32duino/BoardManagerFiles/raw/master/package_stmicroelectronics_index.json
arduino-cli core update-index
arduino-cli core install STMicroelectronics:stm32@2.0.0
arduino-cli lib install LiquidCrystal@1.0.7 && arduino-cli lib install OneButton@1.5.0 && arduino-cli lib install CRC32@2.0.0
Then, compile the project:
arduino-cli compile --fqbn STMicroelectronics:stm32:Nucleo_64:opt=o3std,pnum=NUCLEO_F411RE --verbose srcs/respirator.cpp --output builds/respirator-production
In order to flash the firmware that you just built using the instructions above:
- Plug your ST-Link programmer to the motherboard, and switch the motherboard to flash mode (switch position to flash mode on the motherboard);
- Plug the ST-Link programmer to your computer, over USB, and fetch its device name via the
arduino-cli board list
command (we will call it{SERIAL_PORT}
); - Make sure that STM32CubeProgrammer is installed on your computer, and run:
arduino-cli upload --port {SERIAL_PORT} --fqbn STMicroelectronics:stm32:Nucleo_64:pnum=NUCLEO_F411RE,upload_method=swdMethod --input builds/respirator-production
Make sure to replace {SERIAL_PORT} with your serial port, which should begin with /dev/
.
A few scripts are available, eg. to automate repeated manual actions:
- Compile & Flash:
./scripts/compile_and_flash.sh
(compiles firmware and flashes it over the plugged STM32 programmer); - Compile Only:
./scripts/compile_only.sh
(compiles firmware, useful to check for code mistakes);
Some specialized scripts are available, eg. that target older hardwares:
- Compile & DFU (HW3):
./scripts/compile_and_dfu_hardware_v3.sh
(compiles firmware and flashes it to Hardware V3);
The configuration options can be found in the following files:
- High-level configuration options are available and documented in includes/config.h;
- Low-level configuration options can be found in includes/parameters.h;