Build and Test Firmware

Flux builds and tests firmware for your project, then returns the output and a command you run with your board connected to your computer.

Build the firmware

Tell Flux which project source to build and what output you need.

Build this firmware project. Return the image files and report flash use, RAM use, and the largest symbols.
Compile the firmware for this STM32 target and fix build errors. Include the assumptions and flashing command.

Open the Chat panel and ask Flux to build the source in the project. Flux compiles on a project computer for ARM, RISC-V, ESP32-class, nRF, RP2040, AVR, and STM32 targets. It returns firmware image files such as .elf, .bin, .hex, and .map as project files.

Flux reports flash and RAM footprint and lists the largest symbols. If a build error occurs, Flux fixes the source or configuration and builds again. The build notes can include clock, pin, polarity, timing, and bootloader-offset assumptions.

Select Files in the project view switcher to read the output files and build notes. Keep the image files with the source so you can refer to them when you prepare the board.

Run tests and analysis

Tell Flux which behavior to test and what results you want in the project.

Run the host unit tests. Check memory and undefined behavior, report coverage, and analyze the source.
Add a unit test for the sensor conversion and report the test result and coverage.

Open Chat to request host unit tests for firmware logic. Flux can run tests without a connected board and report their results. Ask for checks for memory and undefined behavior, coverage measurements, and static analysis of the source.

Describe the behavior you want covered. For example, ask to test a sensor conversion, a communication parser, a startup state, or an actuator command. Flux can update the tests and source, then report the test results with the firmware files.

Flash a connected board

Tell Flux which board you have and ask for the command to run on your computer.

Give me the flashing command for this board and firmware image. Include how to connect the board and read serial output.
Prepare a flash and startup check for this MCU. Include the bootloader offset and reset steps.

Select Files in the project view switcher to find the built image and the flashing command. Connect the board to your own computer, then run the command Flux gives you. The command includes the target, image path, and relevant connection settings. You can also ask Flux for serial-monitor steps to read startup output.

The build notes record assumptions that shape the command, such as clock speed, pin assignments, active polarity, timing, and bootloader offset. Ask Flux to update the notes when those values change. Continue with board bring-up to plan power, programming, and functional checks.

Read serial output and debug

Tell Flux what you expected the board to do, then paste or attach its serial log or crash dump. Flux can add logging, find the cause of the failure, and update the firmware.

Add UART logging for startup, sensor reads, and error states. Use clear labels and include the sensor value.
Find the cause of this crash from the attached dump. Update the firmware and explain the code change.
Read this serial log. Find why the sensor stops responding after the third sample, then change the firmware to handle it.

Open Chat and paste the serial output or attach the crash dump. Ask Flux to add or update logs and firmware, then select Files in the project view switcher to read the saved source and debugging notes.

Run firmware checks on every change

Tell Flux which repository contains the firmware and which build and unit tests to run. Flux can write a workflow that runs those checks on each change.

Create a firmware CI workflow for this repository. Build the STM32 target and run the host unit tests on every change.
Add a CI workflow that builds the firmware for all configured board targets and saves the test report.
Write a repository workflow that compiles this firmware, runs its unit tests, and reports the memory footprint.

Open Chat, select AI Integrations, then open the Integrations tab to connect the firmware repository. Ask Flux to write the build and unit-test workflow for that repository. See Integrations and secrets.

Keep build and test results together

Tell Flux how to organize the source, outputs, and test results for your next build.

Save the build summary with the firmware files. Include the target, image names, memory use, and assumptions.
Add host tests for the communication parser and keep the coverage report with the project files.

Open Chat and ask Flux to keep a concise build summary with the project. Select Files in the project view switcher to find the firmware source, image files, test code, and results. Ask Flux to name the target and list the build settings in the summary.

The build record connects a source revision to its outputs. Include flash and RAM use, the largest symbols, and the assumptions that affect startup. Keep test results with the source so you can compare how a change affects the firmware behavior.

You can also ask Flux to organize test cases by behavior. For example, keep sensor conversion tests near the relevant source and record the expected input and output. Include coverage results and static analysis findings in the same project document. Use board bring-up when you are ready to run tests with the hardware connected.