Bare-metal Rust on the Xilinx Zynq ZC706 devkit
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

shell.nix 600B

12345678910111213141516171819202122232425
  1. let
  2. mozillaOverlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz);
  3. pkgs = import <nixpkgs> { overlays = [ mozillaOverlay ]; };
  4. in
  5. with pkgs;
  6. let
  7. project = callPackage ./default.nix {};
  8. in
  9. with project;
  10. stdenv.mkDerivation {
  11. name = "zynq-env";
  12. buildInputs = (with rustPlatform.rust; [
  13. rustc cargo
  14. cargo-xbuild rustcSrc
  15. gcc
  16. ]) ++ (with pkgs; [ openocd gdb ]);
  17. # Set Environment Variables
  18. RUST_BACKTRACE = 1;
  19. XARGO_RUST_SRC = "${rustcSrc}/src";
  20. shellHook = ''
  21. echo "Run 'cargo xbuild --release' to build."
  22. '';
  23. }