[ansible] rust-embedded
change
commit 356ffd0060f7748bb60dcd0d806a87ba81e83b08
author Alpha Chen <alpha@kejadlen.dev>
date
parent 06759862
diff --git a/ansible/playbooks/rust-embedded.yml b/ansible/playbooks/rust-embedded.yml
new file mode 100644
index 00000000..bbf527b1
--- /dev/null
+++ b/ansible/playbooks/rust-embedded.yml
@@ -0,0 +1,27 @@
+- hosts: all
+  tasks:
+
+  # https://rust-embedded.github.io/book/intro/install.html
+
+  - name: add rust target
+    command: rustup target add thumbv7em-none-eabihf
+
+  - name: install binutils
+    command: cargo install cargo-binutils
+    args:
+      creates: ~/.cargo/bin/cargo-size
+
+  - name: install llvm-tools-preview
+    command: rustup component add llvm-tools-preview
+
+  # https://rust-embedded.github.io/book/intro/install/macos.html
+
+  - name: install gcc-arm-embedded
+    homebrew:
+      name: armmbed/formulae/arm-none-eabi-gcc
+
+  - name: install openocd and qemu
+    homebrew:
+      name:
+        - openocd
+        - qemu
diff --git a/ansible/playbooks/rust.yml b/ansible/playbooks/rust.yml
index 6f9f99f6..bf306ad6 100644
--- a/ansible/playbooks/rust.yml
+++ b/ansible/playbooks/rust.yml
@@ -1,4 +1,3 @@
-# - hosts: os_MacOSX
 - hosts: all
   tasks:
   - name: install rustup