Write Firmware
Flux creates firmware for the microcontroller and peripherals in your device. It places the firmware starter document in your project so you can work with the source, pin map, and build instructions together.

Create firmware from the schematic
Tell Flux what the firmware must do and which peripherals to initialize. Include timing, communication, and startup requirements in your request.
Open the Chat panel and describe the behavior. Flux creates a firmware starter document as a project file. It records the microcontroller, framework, build system, and libraries. It maps pin defines to schematic net names, then adds initialization for each peripheral.
The source can include sensor reads, actuator control, and Wi-Fi or BLE behavior. Flux orders startup so clocks come first, followed by GPIO, peripherals, and interrupts before the main loop. It can add error handling and a watchdog, then include build and flash instructions for the selected board.
The starter document keeps source and setup details together. Ask Flux to change a behavior or explain a peripheral, and it can update the source and its project documentation.
Start from your own code
Tell Flux where your source lives and what you want to change. Flux can use code from a public Git repository, an uploaded ZIP file, or files that you paste into chat.
Open Chat and share the public repository link, upload the ZIP, or paste the relevant files. Ask Flux to read the code structure before you request a change. It can connect the existing source to the project schematic and make the firmware starter document describe the code, build system, libraries, and board configuration.
You can ask Flux to preserve the project's existing organization while it adds a feature. For example, request a sensor driver, a serial command, a startup sequence, or a test. Flux can also explain how the source uses each net and peripheral.
Use mechanical values in firmware
Tell Flux which value from the model belongs in the firmware and how the device uses it.
Open Chat with the mechanical model and firmware source in the same project. Ask Flux to connect a model value to a named firmware constant and explain its units. Flux can read dimensions and positions from the CAD model, then use them in firmware source. The model and firmware document stay together in the project.
This workflow links mechanical design and embedded behavior. For example, firmware can use a spacer volume, sensor position, enclosure dimension, or mounting offset. If you change the hardware, ask Flux to update the constant and the related project documentation.
Open Files to read the firmware starter document and source. Continue with pin and peripheral setup, build and test, or firmware with your hardware.
The starter document gives you a working place to continue. Ask Flux to explain peripheral behavior, split a feature into source files, or add a test for a calculation. You can ask for a project file that records the commands and expected results for a repeatable task. The source, configuration, and documentation stay connected in the same project.
Use the Chat panel to describe the next firmware change. Select Files in the project view switcher to read the current document, source, and tests. Ask Flux to keep the setup and build notes consistent with the code after each update.