summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2022-12-12 20:38:24 -0700
committerJosh Rahm <joshuarahm@gmail.com>2022-12-12 20:38:54 -0700
commitef3a1919ce5c87179e8f1d7a3b1b835151fdf50f (patch)
tree600a70a334df03ebbaa2c7928ff0863e3ca614a0 /Makefile
downloadstm32l4-rust-ef3a1919ce5c87179e8f1d7a3b1b835151fdf50f.tar.gz
stm32l4-rust-ef3a1919ce5c87179e8f1d7a3b1b835151fdf50f.tar.bz2
stm32l4-rust-ef3a1919ce5c87179e8f1d7a3b1b835151fdf50f.zip
Start writing bare-metal stm32 kernel in rust
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..73b176d
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,18 @@
+
+all:
+ cargo build
+
+main.bin: target/thumbv7em-none-eabihf/debug/stm32l4-rust
+ arm-unknown-eabi-objcopy -O binary target/thumbv7em-none-eabihf/debug/stm32l4-rust main.bin
+
+flash: main.bin
+ openocd -f openocd.cfg -c "program main.bin reset exit 0x08000000"
+
+target/thumbv7em-none-eabihf/debug/stm32l4-rust:
+ cargo build
+
+clean:
+ cargo clean
+
+debug:
+ arm-unknown-eabi-gdb -tui -ex 'tar ext :3333' -ex 'file target/thumbv7em-none-eabihf/debug/stm32l4-rust'