move to flakes

This commit is contained in:
2022-08-29 22:14:58 +08:00
parent bd6fccf0ea
commit 3855b61dfb
7 changed files with 365 additions and 139 deletions

View File

@@ -6,29 +6,17 @@ Minimalist bare metal Rust firmware for Red Pitaya.
Development instructions
------------------------
Configure Nix channels:
```shell
nix-channel --add https://nixbld.m-labs.hk/channel/custom/artiq/fast-beta/artiq-fast
nix-channel --update
```
Notes:
- Rust Pitaya does not depend on ARTIQ but uses some packages available in the ARTIQ channel.
- If you are using Nix channels the first time, you need to be aware of this bug: https://github.com/NixOS/nix/issues/3831.
Pure build with Nix and execution on a remote JTAG server:
```shell
nix-build -A rust-pitaya-jtag
nix build .#rust-pitaya-jtag
./remote_run.sh
```
Impure incremental build and execution on a remote JTAG server:
```shell
nix-shell
nix develop
cd src
gateware/rust-pitaya.py -g ../build/gateware # build gateware
make # build firmware
@@ -38,14 +26,13 @@ cd ..
Notes:
- This is developed with Nixpkgs 20.09, and the ``nixbld.m-labs.hk`` binary substituter can also be used here (see the ARTIQ manual for the public key and instructions).
- The impure build process is also compatible with non-Nix systems.
- If the board is connected to the local machine, use the ``local_run.sh`` script.
License
-------
Copyright (C) 2019-2020 M-Labs Limited.
Copyright (C) 2019-2022 M-Labs Limited.
Rust Pitaya is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by