aboutsummaryrefslogtreecommitdiff
path: root/devShells
diff options
context:
space:
mode:
Diffstat (limited to 'devShells')
-rw-r--r--devShells/default.nix4
-rw-r--r--devShells/nuttx.nix11
2 files changed, 9 insertions, 6 deletions
diff --git a/devShells/default.nix b/devShells/default.nix
index 108d6a3..6c91b20 100644
--- a/devShells/default.nix
+++ b/devShells/default.nix
@@ -9,8 +9,8 @@ let
in {
- armv6 = callDevelop ./nuttx.nix "armv6-m";
- armv7e = callDevelop ./nuttx.nix "armv7e-m";
+ armv6 = callDevelop ./nuttx.nix { arch = "armv6s-m"; };
+ armv7e = callDevelop ./nuttx.nix { arch = "armv7e-m"; fpu = "vfpv3-d16"; };
c = callDevelop ./c.nix;
riscv = callDevelop ./riscv.nix;
diff --git a/devShells/nuttx.nix b/devShells/nuttx.nix
index 04a057d..ed0b971 100644
--- a/devShells/nuttx.nix
+++ b/devShells/nuttx.nix
@@ -1,20 +1,23 @@
-{ nixpkgs, shellrc, system }: arch:
+{ nixpkgs, shellrc, system }:
+{ arch, fpu ? null }:
+with nixpkgs.lib;
let
pkgs = nixpkgs.legacyPackages.${system};
pkgs-riscv = import nixpkgs.outPath {
localSystem = system;
crossSystem = {
- config = "arm-none-eabi";
+ config = "arm-none-eabi" + (optionalString (fpu != null) "hf");
libc = "newlib";
gcc = {
arch = arch;
- };
+ } // (optionalAttrs (fpu != null) { fpu = fpu; });
};
};
in pkgs.mkShell {
packages = (with pkgs; [
- kconfig-frontends make cmake
+ kconfig-frontends gnumake cmake
+ openocd
]) ++ (with pkgs-riscv.buildPackages; [
gcc gdb
]);