Merge "Fetch nexus bitstream and OTT from public bucket"
diff --git a/platforms/nexus/iree.mk b/platforms/nexus/iree.mk
index f4777fd..782d93b 100644
--- a/platforms/nexus/iree.mk
+++ b/platforms/nexus/iree.mk
@@ -69,9 +69,8 @@
 # the `iree_runtime` target. The outputs of this target are placed in
 # out/host/iree_compiler.
 #
-# TODO(b/318408783): unpin the IREE release.
 iree_compiler: | $(IREE_COMPILER_DIR)
-	$(ROOTDIR)/scripts/download_iree_compiler.py --iree_compiler_dir "$(IREE_COMPILER_DIR)" --tag_name candidate-20231228.752
+	$(ROOTDIR)/scripts/download_iree_compiler.py --iree_compiler_dir "$(IREE_COMPILER_DIR)"
 iree_commit_check:
 	$(ROOTDIR)/scripts/check-iree-commit.sh "$(IREE_SRC)" "$(IREE_COMPILER_DIR)"
 
diff --git a/platforms/nexus/setup.sh b/platforms/nexus/setup.sh
index b099047..9b27f13 100644
--- a/platforms/nexus/setup.sh
+++ b/platforms/nexus/setup.sh
@@ -149,6 +149,7 @@
         return 1
     fi
 
+    echo "Resetting nexus-${NEXUS_ID}"
     opentitantool gpio write RESET true
     opentitantool gpio write RESET false
     opentitantool gpio write RESET true
@@ -190,7 +191,7 @@
     local erase_size="$(du -b ${flash_tar} \
         | awk '{ print $1 + (n - $1 % n) % n }' n=262144)"
 
-    echo "Program SPI using ${NEXUS_SPI_PASSTHRU} on board ${NEXUS_ID}"
+    echo "Program SPI using ${NEXUS_SPI_PASSTHRU} on nexus-${NEXUS_ID}"
     opentitantool bootstrap "${NEXUS_SPI_PASSTHRU}"
     opentitantool spi block-erase --start 0 --length "${erase_size}"
     opentitantool spi program --start 0 "${flash_tar}"
@@ -216,27 +217,21 @@
         return 1
     fi
 
-    echo "Clearing nexus SPI flash"
+    echo "Clearing nexus-${NEXUS_ID} SPI flash"
     nexus_reset
     opentitantool bootstrap "${NEXUS_SPI_PASSTHRU}"
     opentitantool spi block-erase --start 0 --length 262144
 }
 
 function nexus_mcu_write() {
-    # Slowly send characters to the Nexus MCU
+    # Send command to the Nexus MCU REPL
     if [[ -z "${NEXUS_ID}" ]]; then
         echo "Run set-nexus-id first"
         return 1
     fi
 
-    local string="$1"
-    local length="${#string}"
-    for ((i = 0; i < length; i++)); do
-        local char="${string:i:1}"
-        echo -n "$char" > "/dev/Nexus-FTDI-${NEXUS_ID}-MCU-UART"
-        sleep 0.5
-    done
-    echo -e "\r" > "/dev/Nexus-FTDI-${NEXUS_ID}-MCU-UART"
+    echo "Sending nexus-${NEXUS_ID} MCU the command: $@"
+    nexus_mcu.py --nexus_id=${NEXUS_ID} "$@"
 }
 
 function nexus_load_bitstream
@@ -264,6 +259,7 @@
         return 1
     fi
 
+    echo "Pushing ${bitstream_path} to nexus-${NEXUS_ID}"
     # Issue a no-op command to flush the character buffer in case it isn't empty
     nexus_mcu_write "help"
     scp "${bitstream_path}" "root@nexus${NEXUS_ID}:/mnt/mmcp1/"
@@ -278,6 +274,7 @@
 {
     # Boot the Nexus board.  If flashed, will boot from flash
     # This command is a synomym for `opentitantool boot`
+    echo "Booting Nexus-${NEXUS_ID}"
     opentitantool boot
 }
 
@@ -295,5 +292,6 @@
         ) | fmt
         return 1
     fi
+    echo "Bootstrapping ${binary} onto Nexus-${NEXUS_ID}"
     opentitantool bootstrap "${binary}"
 }
diff --git a/platforms/shodan/iree.mk b/platforms/shodan/iree.mk
index f71bf85..cec2ac2 100644
--- a/platforms/shodan/iree.mk
+++ b/platforms/shodan/iree.mk
@@ -69,9 +69,8 @@
 # the `iree_runtime` target. The outputs of this target are placed in
 # out/host/iree_compiler.
 #
-# TODO(b/318408783): unpin the IREE release.
 iree_compiler: | $(IREE_COMPILER_DIR)
-	$(ROOTDIR)/scripts/download_iree_compiler.py --iree_compiler_dir "$(IREE_COMPILER_DIR)" --tag_name candidate-20231228.752
+	$(ROOTDIR)/scripts/download_iree_compiler.py --iree_compiler_dir "$(IREE_COMPILER_DIR)"
 iree_commit_check:
 	$(ROOTDIR)/scripts/check-iree-commit.sh "$(IREE_SRC)" "$(IREE_COMPILER_DIR)"