- Removed outdated TODOs and legacy references in hardware documentation. - Added details on the new CH32V203-based Sensor Module for CAN bus soil moisture sensors. - Documented updates to the Battery Management System (CH32V203-based) replacing the older bq34z100 design. - Refined sensor, pump, and power module descriptions with updated specifications. - Expanded firmware documentation to include Rust-based ESP32-C6 platform details, new OTA procedure, and MQTT telemetry topics. - Simplified toolchain setup and compilation process with updated scripts and instructions.
1.6 KiB
1.6 KiB
title, date, draft, description, tags
| title | date | draft | description | tags | ||
|---|---|---|---|---|---|---|
| compiling | 2025-02-20 | false | How to compile the project |
|
Preconditions:
- Rust:
rustupinstalled with the Rust toolchain. - ESP32 Toolchain:
espupinstalled for ESP32 support. - Build Utilities:
ldproxyandespflashinstalled via cargo. - Node.js:
npminstalled (for the web interface).
Cloning the Repository
Clone the repository including submodules:
git clone --recursive https://git.mannheim.ccc.de/C3MA/PlantCtrl.git
cd PlantCtrl/Software/MainBoard/rust
Toolchain Setup
The project uses Rust with ESP32-C6 support. The toolchain setup involves installing the necessary components:
- Rust Toolchain:
rustup toolchain install stable rustup default stable
Building the Web Interface
The configuration website is built using TypeScript and Webpack, then embedded into the Rust binary.
cd src_webpack/
npm install
npx webpack
cd ..
Compiling the Firmware using Build Scripts
To simplify the process, several bash scripts are provided in the Software/MainBoard/rust directory:
image_build.sh: Automatically builds the web interface, compiles the Rust firmware in release mode, and creates a flashableimage.bin.all.sh: Performs all steps fromimage_build.shand additionally flashes the firmware to a connected device and starts the serial monitor.wokwi_build.sh: Builds a debug version of the firmware and creates a full 16MB flash image for use with the Wokwi simulator.