aboutsummaryrefslogtreecommitdiff
path: root/scripts/stubs/Makefile
diff options
context:
space:
mode:
authorGareth McMullin2011-02-04 20:25:12 +1300
committerGareth McMullin2011-02-04 20:25:12 +1300
commit69d790fcf6f2a1c62ad1898031b4c8c0571bad05 (patch)
treec5802a5fc0374dfa0a2144d68cf7d46d26b19a1c /scripts/stubs/Makefile
parent406617a2a470021d9412e9280feda0d28bdb653b (diff)
Added programming scripts.
Diffstat (limited to 'scripts/stubs/Makefile')
-rw-r--r--scripts/stubs/Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/stubs/Makefile b/scripts/stubs/Makefile
new file mode 100644
index 0000000..eb588d8
--- /dev/null
+++ b/scripts/stubs/Makefile
@@ -0,0 +1,12 @@
+CROSS_COMPILE = stm32-
+CC = $(CROSS_COMPILE)gcc
+OBJCOPY = $(CROSS_COMPILE)objcopy
+
+all: stm32_opterase.bin stm32_optprog.bin
+
+%.bin: %.S
+ $(CC) -nostdlib -Wl,-Ttext,0x20000000 $<
+ $(OBJCOPY) -O binary a.out $@
+
+clean:
+ -rm *.bin