systems: support TI MSP430 microcontrollers

This commit is contained in:
Aaron Lindsay 2019-03-25 19:17:37 -07:00
parent a620334527
commit 1eca945e94
5 changed files with 9 additions and 0 deletions

View file

@ -102,6 +102,11 @@ rec {
riscv64 = riscv "64";
riscv32 = riscv "32";
msp430 = {
config = "msp430-elf";
libc = "newlib";
};
avr = {
config = "avr";
};

View file

@ -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"; }; };

View file

@ -109,6 +109,7 @@ rec {
alpha = { bits = 64; significantByte = littleEndian; family = "alpha"; };
msp430 = { bits = 16; significantByte = littleEndian; family = "msp430"; };
avr = { bits = 8; family = "avr"; };
};

View file

@ -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;

View file

@ -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;