Project Structure
The IronOS codebase is organized into several key directories:Key Components
BSP Layer
The Board Support Package provides hardware-specific implementations for each supported device. Each BSP contains:- Hardware initialization code
- I2C read/write implementations
- PWM control for tip heating
- IRQ handlers and hardware-specific configurations
Drivers
Drivers abstract physical hardware components:- OLED display controllers
- Accelerometers
- Button handling
- Tip temperature response modeling
Threads
IronOS uses FreeRTOS for task management:- PID Thread - Controls tip temperature using PID or integrator algorithms
- UI Thread - Handles user interface logic and screen rendering
- Movement Thread - Detects device motion for sleep/wake features
UI Architecture
The user interface is split into two parts:- Logic (
Threads/UI/logic/) - Handles button events and mode logic - Drawing (
Threads/UI/drawing/) - Screen rendering, organized by display type (mono_96x16, mono_128x32, etc.)
Development Requirements
Hardware Requirements
For devices to be supported by IronOS: Hard Requirements:- Supported processor (ARM Cortex or RISC-V with FreeRTOS support)
- 64KB+ flash memory (128KB+ preferred)
- 16KB+ RAM
- Controllable heating element with temperature sensor
- User-accessible firmware update mechanism
- Known microcontroller pinmap
- USB-PD preferred over Quick Charge
- Open source or available schematics
- Vendor support for community
- Hardware PWM for tip control
Software Requirements
For ARM Devices (TS100, TS80, TS80P, MHP30, Sequre):arm-none-eabi-gcctoolchain- Python 3 with
bdflibpackage - Make
riscv-none-elf-gcctoolchain- Python 3 with
bdflibpackage - Make
- Docker (recommended for Pinecil V2)
Contributing
Code Style
IronOS uses clang-format for consistent code formatting:Testing
Before submitting changes, run the test suite:- Documentation checks
- Shell script linting
- Python code checks (flake8, black)
- C/C++ code style verification
Pull Request Process
- Fork the repository and create a feature branch
- Make your changes following the code style guidelines
- Test your changes on actual hardware if possible
- Run
make teststo verify all checks pass - Submit a pull request with a clear description of changes
- GitHub Actions will automatically build firmware for all models
Development Tools
STM32CubeIDE
For STM32-based devices, you can use STM32CubeIDE:- Create a new project for STM32F103RCTx
- Remove auto-generated source code
- Link the contents of the
sourcefolder - Update build settings for include paths
- Point to the appropriate
.ldlinker file
Command Line
Command line development is the recommended approach and supports all device models. See the Building from Source guide for detailed instructions.Docker
Docker provides a consistent development environment:Getting Help
- GitHub Issues - Report bugs and request features
- GitHub Discussions - Ask questions and share ideas
- Documentation - Check the docs for guides and references
Next Steps
Building from Source
Learn how to compile IronOS firmware
Translations
Add or update language translations
Porting Guide
Port IronOS to new hardware
Architecture
Deep dive into firmware architecture