Skip to content

Creating a project

Flux has no project file or generator. A design is one or more source files, conventionally with the .flux extension.

A small layout that works well:

blinker/
├── blink.flux # the __fpga function
├── blink_board.flux # host main() that binds it to a board
└── blink_test.flux # simulation testbench

Keeping the hardware function in its own file lets the board program and the testbench include the same design.

Compiling hardware stages does not need an include. Add #include "src/flux/flux.hpp" when a file also contains host code, together with the header for what you use, such as src/flux/sim.hpp or src/flux/boards.hpp. These paths resolve from the Flux repository root, so run board and simulation builds from there.

Your first hardware design