diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index ac1633a1a15..27a32181df8 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 932f8fd1e53..f8d5ca84d7a 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 fab50bc0ebd..8cc7d3ae271 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"; }; }; diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index 142f5255caa..72327d2bb67 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -186,6 +186,7 @@ stdenv.mkDerivation { }.${targetPlatform.parsed.cpu.name} else if targetPlatform.isPower then if targetPlatform.isBigEndian then "ppc" else "lppc" else if targetPlatform.isSparc then "sparc" + else if targetPlatform.isMsp430 then "msp430" else if targetPlatform.isAvr then "avr" else if targetPlatform.isAlpha then "alpha" else throw "unknown emulation for platform: " + targetPlatform.config; diff --git a/pkgs/top-level/release-cross.nix b/pkgs/top-level/release-cross.nix index b06bb5393be..f4210fcfc72 100644 --- a/pkgs/top-level/release-cross.nix +++ b/pkgs/top-level/release-cross.nix @@ -140,6 +140,7 @@ in android64 = mapTestOnCross lib.systems.examples.aarch64-android-prebuilt (linuxCommon // { }); + msp430 = mapTestOnCross lib.systems.examples.msp430 embedded; avr = mapTestOnCross lib.systems.examples.avr embedded; arm-embedded = mapTestOnCross lib.systems.examples.arm-embedded embedded; powerpc-embedded = mapTestOnCross lib.systems.examples.ppc-embedded embedded;