From 1eca945e948f89cf8baf0bfc6f91c303985fefbf Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Mon, 25 Mar 2019 19:17:37 -0700 Subject: systems: support TI MSP430 microcontrollers --- lib/systems/examples.nix | 5 +++++ lib/systems/inspect.nix | 1 + lib/systems/parse.nix | 1 + 3 files changed, 7 insertions(+) (limited to 'lib') diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index ac1633a1a15f..27a32181df88 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -102,6 +102,11 @@ rec { riscv64 = riscv "64"; riscv32 = riscv "32"; + msp430 = { + config = "msp430-elf"; + libc = "newlib"; + }; + avr = { config = "avr"; }; diff --git a/lib/systems/inspect.nix b/lib/systems/inspect.nix index 932f8fd1e536..f8d5ca84d7aa 100644 --- a/lib/systems/inspect.nix +++ b/lib/systems/inspect.nix @@ -20,6 +20,7 @@ rec { isRiscV = { cpu = { family = "riscv"; }; }; isSparc = { cpu = { family = "sparc"; }; }; isWasm = { cpu = { family = "wasm"; }; }; + isMsp430 = { cpu = { family = "msp430"; }; }; isAvr = { cpu = { family = "avr"; }; }; isAlpha = { cpu = { family = "alpha"; }; }; diff --git a/lib/systems/parse.nix b/lib/systems/parse.nix index fab50bc0ebd7..8cc7d3ae271f 100644 --- a/lib/systems/parse.nix +++ b/lib/systems/parse.nix @@ -109,6 +109,7 @@ rec { alpha = { bits = 64; significantByte = littleEndian; family = "alpha"; }; + msp430 = { bits = 16; significantByte = littleEndian; family = "msp430"; }; avr = { bits = 8; family = "avr"; }; }; -- cgit v1.2.3 From 1c7bb464d99301e42cbb0fe438c927c1440800c6 Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Mon, 25 Mar 2019 20:33:39 -0700 Subject: msp430: include vendor headers with stdenv --- lib/systems/default.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/systems/default.nix b/lib/systems/default.nix index b3f7363fe612..9c6b51400dcb 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -34,6 +34,7 @@ rec { else if final.isUClibc then "uclibc" else if final.isAndroid then "bionic" else if final.isLinux /* default */ then "glibc" + else if final.isMsp430 then "newlib" else if final.isAvr then "avrlibc" # TODO(@Ericson2314) think more about other operating systems else "native/impure"; -- cgit v1.2.3 From 3cf40fc7945afa8d75b274347dcbf528bd6331e6 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 29 Mar 2019 14:06:47 +0100 Subject: lib: lists: Alias builtins.map Signed-off-by: Matthias Beyer Suggested-by: Profpatsch --- lib/lists.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/lists.nix b/lib/lists.nix index be541427c247..9f2ccc00cafe 100644 --- a/lib/lists.nix +++ b/lib/lists.nix @@ -7,7 +7,7 @@ let in rec { - inherit (builtins) head tail length isList elemAt concatLists filter elem genList; + inherit (builtins) head tail length isList elemAt concatLists filter elem genList map; /* Create a list consisting of a single element. `singleton x` is sometimes more convenient with respect to indentation than `[x]` -- cgit v1.2.3