aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-06-13 17:11:58 +0200
committerKarel Kočí <cynerd@email.cz>2022-06-13 17:11:58 +0200
commit15bd5a0e017bb1635ca82e013bf6c3d070b37572 (patch)
tree0de8bfa93a46945cf47bbb3cc154238c849d200b
parentc509d9ad37194f1a92d90b06e73e34b3f866237d (diff)
downloadnixos-personal-15bd5a0e017bb1635ca82e013bf6c3d070b37572.tar.gz
nixos-personal-15bd5a0e017bb1635ca82e013bf6c3d070b37572.tar.bz2
nixos-personal-15bd5a0e017bb1635ca82e013bf6c3d070b37572.zip
devShells: fix amrv6 and allow fpu to be used
-rw-r--r--devShells/default.nix4
-rw-r--r--devShells/nuttx.nix11
-rw-r--r--flake.lock6
-rw-r--r--nixos/modules/develop.nix18
4 files changed, 12 insertions, 27 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
]);
diff --git a/flake.lock b/flake.lock
index d16db89..5de335b 100644
--- a/flake.lock
+++ b/flake.lock
@@ -44,11 +44,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1655034456,
- "narHash": "sha256-HXXyvGqZLa+2u8IPIRm/uNQiw+gBtTNu58YaXMJtKRc=",
+ "lastModified": 1655122334,
+ "narHash": "sha256-Rwwvo9TDCH0a4m/Jvoq5wZ3FLSLiVLBD1FFfN/3XawA=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "72b1ec0a79b1fc50f6cc0694c2f0b1eb384a932e",
+ "rev": "e1a1cfb56504d1b82a3953bfb0632b37a1ca8d30",
"type": "github"
},
"original": {
diff --git a/nixos/modules/develop.nix b/nixos/modules/develop.nix
index c9a0c22..2ddd928 100644
--- a/nixos/modules/develop.nix
+++ b/nixos/modules/develop.nix
@@ -4,21 +4,6 @@ with lib;
let
- armv6l = (import nixpkgs.outPath {
- localSystem = config.system.build.toplevel.system;
- crossSystem = {
- config = "armv6l-none-eabi";
- libc = "newlib";
- };
- });
- armv7l = (import nixpkgs.outPath {
- localSystem = config.system.build.toplevel.system;
- crossSystem = {
- config = "armv7l-none-eabi";
- libc = "newlib";
- };
- });
-
in {
options = {
@@ -94,9 +79,6 @@ in {
# Bare metal
openocd
- #armv6l.buildPackages.gcc armv6l.buildPackages.gdb
- #armv7l.buildPackages.gcc armv7l.buildPackages.gdb
- pkgsCross.arm-embedded.buildPackages.gcc
# Documentation
man-pages man-pages-posix