Fork is a CLI tool designed to streamline firmware building for various MCUs without the hassle of traditional build tools. By leveraging Docker, it detects toolchains automatically and manages builds with little configuration needed. Adding new MCUs is straightforward, making it a flexible solution for embedded developers.
Fork is an innovative command-line interface (CLI) tool designed for building firmware across various microcontroller units (MCUs) without the complexities of build tool abstractions or extensive configurations. Currently in beta, Fork simplifies the firmware building process by using Docker-style builds that adapt to the inherent workflows of embedded systems.
Key Features
-
Multi-MCU Support: Build firmware for multiple MCUs effortlessly. For instance, building for the STM32F405 can be done simply by running:
fork build -m stm32f405 -
Flexible Build Commands: Customize your build process with additional parameters, enabling custom build parameters in your command:
fork build -m stm32f405 -- --release [your-build-system-options] -
Automatic Toolchain Detection: Fork identifies the toolchain used in your project directly from your configuration files, generating a Dockerfile and executing your build within that container. This feature reduces the need for extra configuration files beyond those already present in your project.
Streamlined Builds Across MCUs
Fork minimizes maintenance overhead by allowing distinct builds for different MCUs in a single repository. For example, the process to build firmware for an RP2040 and ESP32 can be streamlined as:
fork build -m rp2040 ./firmware/rp2040 && fork build -m esp32 ./firmware/esp32
Adding Support for New Boards
Extending Fork's capabilities to support additional boards is straightforward. Users can easily open a pull request with a TOML file located in the boards/ directory, detailing the necessary configuration for their board:
name = "example-board"
[language]
detect = [{ file = "project.config", key = "language_enabled" }]
[language.runtimeA]
detect = [{ file = "project.config", key = "runtimeA" }]
layer = ["RUN install target-platform", "RUN install flashing-tool"]
cmd = "build project"
Frequently Asked Questions
- Customizing the Build: Fork allows complete control over the build command via the
build_commandspecified in the board TOML file. - Unsupported Boards: Users can easily add support for new boards by creating a TOML file and submitting a pull request.
Contribution Guidelines
Contributions are encouraged. When adding support for new boards or build tools, please include the relevant TOML configuration and test your modifications on actual hardware if possible.
For more details and documentation, please refer to the documentation. Fork is an essential tool for developers working with embedded systems, aiming to optimize and streamline their firmware building processes.
No comments yet.
Sign in to be the first to comment.