Skip to content
Snippets Groups Projects
user avatar
Jens Nolte authored
b9d4d26c
History

qthing

Prerequisites

You need a machine with nix installed. It should not matter, if it is using NixOS or not.

You can build qthing with either the new nix tooling (with flake support) or the legacy nix tooling, though the former would be prefered.

Examples

Some examples reside inside the examples directory. They showcase the different styles of how to work with qthing.

Building qthing projects

Building using the nix builder

This is not supported with the legacy nix tooling.

The qthing flake exports a function called mkProject that you can use inside your project to create a qthing project, that can be build using nix. Benefits of this style of projects are the simplicity and that you need no qthing reposity checked out, as nix will gather al required files on its own, also this is the most reproducible way of building qthing. Have a look at the nix_builder example to see this project style in action.

Building incremental using nix

Incremental builds need a qthing repository checked out recursively (with all submodules checked out). They are great for developing, as they expose the idf.py tool with all its glory.

Building incremental is not initiated from your project but from inside your qthing repository root. Prior to building you must tell qthing wich device and wich environment should be used. To do that the ./bin/set-device and ./bin/set-environment scripts must be used. These accept the path to the device or environment as an argument.

Building is done inside a nix shell using nix develop -c idf.py build or nix-shell --run 'idf.py build'.

Please have a look at the build_incremental and build_incremental_nix_legacy examples.

esp-idf notes

For the incremental builds to work this repository needs to be checked out recursively. You do not need the esp-idf set up on your machine, as qthing ships its own esp-idf and will use that.

Disclaimer

The API is not stable yet