From 73c30ecbeee78a78d46567edb8875283977637ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 25 Oct 2022 10:24:24 +0200 Subject: devShells: add espc --- devShells/nuttx.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'devShells/nuttx.nix') diff --git a/devShells/nuttx.nix b/devShells/nuttx.nix index 0246ad2..03f51f9 100644 --- a/devShells/nuttx.nix +++ b/devShells/nuttx.nix @@ -2,12 +2,15 @@ , default, c , arch, fpu ? null }: +with builtins; with nixpkgs.lib; let pkgs = import nixpkgs.outPath { localSystem = system; crossSystem = { - config = "arm-none-eabi" + (optionalString (fpu != null) "hf"); + config = if (match "armv.*" arch != null) then + "arm-none-eabi" + (optionalString (fpu != null) "hf") + else "riscv32-none-elf"; libc = "newlib"; gcc = { arch = arch; @@ -20,7 +23,9 @@ in pkgs.buildPackages.mkShell { kconfig-frontends genromfs xxd openocd gcc gdb - ]; + ] ++ (optionals (match "rv32.*" arch != null) [ + esptool + ]); inputsFrom = [ default c ]; meta.platforms = nixpkgs.lib.platforms.linux; } -- cgit v1.2.3