Merge #231

231: Remove `Allowed::replace` and `Allowed::take`. r=jrvanwhy a=jrvanwhy

When I originally implemented `Allowed`, I made it work with non-`Copy` types. `Allowed::get` cannot with with non-`Copy` types, so I added `Allowed::replace` to allow client code to read a non-`Copy` type out of an `Allowed` buffer. However, during the PR review we changed `Allowed` to only contain `Copy` types. Because of this change, I don't anticipate `Allowed::replace` (and `Allowed::take` which is built on top of `Allowed::replace`) seeing much use. This PR removes `Allowed::replace` and `Allowed::take` to reduce the amount of `unsafe` in `libtock_platform`.

Co-authored-by: Johnathan Van Why <jrvanwhy@google.com>
diff --git a/Makefile b/Makefile
index d47b155..1aa9d25 100644
--- a/Makefile
+++ b/Makefile
@@ -164,6 +164,13 @@
 flash-imxrt1050:
 	PLATFORM=imxrt1050 cargo run $(release) --target=thumbv7em-none-eabi --example $(EXAMPLE) $(features)
 
+.PHONY: msp432
+msp432:
+	PLATFORM=msp432 cargo build $(release) --target=thumbv7em-none-eabi --examples $(features)
+
+.PHONY: flash-msp432
+flash-msp432:
+	PLATFORM=msp432 cargo run $(release) --target=thumbv7em-none-eabi --example $(EXAMPLE) $(features)
 
 .PHONY: clean
 clean:
diff --git a/boards/layout_msp432.ld b/boards/layout_msp432.ld
new file mode 100644
index 0000000..2262a15
--- /dev/null
+++ b/boards/layout_msp432.ld
@@ -0,0 +1,15 @@
+MEMORY {
+  /* The application region is 64 bytes (0x40) */
+  FLASH (rx) : ORIGIN = 0x00020040, LENGTH = 0x0001FFC0
+  SRAM (rwx) : ORIGIN = 0x20004000, LENGTH = 0x2000
+}
+
+/*
+ * Any change to STACK_SIZE should be accompanied by a corresponding change to
+ * `elf2tab`'s `--stack` option
+ */
+STACK_SIZE = 2048;
+
+MPU_MIN_ALIGN = 8K;
+
+INCLUDE layout_generic.ld
diff --git a/tock b/tock
index 6e38588..6260afa 160000
--- a/tock
+++ b/tock
@@ -1 +1 @@
-Subproject commit 6e38588c73dbd78d274c00ae7fb7789b78cf6856
+Subproject commit 6260afac204ae9f469abe9e2573cb51d3b124624
diff --git a/tools/flash.sh b/tools/flash.sh
index 56ffb88..2ac2867 100755
--- a/tools/flash.sh
+++ b/tools/flash.sh
@@ -45,6 +45,11 @@
         binary_name=cortex-m7.elf
         tockload=n
         ;;
+    "msp432")
+        tockloader_flags=""
+        binary_name=cortex-m4.elf
+        tockload=n
+        ;;
     "opentitan")
         tockloader_flags=""
         binary_name=rv32imc.elf