aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.preamble3
-rw-r--r--openocd.cfg2
2 files changed, 4 insertions, 1 deletions
diff --git a/Makefile.preamble b/Makefile.preamble
index f6e1370..62b221a 100644
--- a/Makefile.preamble
+++ b/Makefile.preamble
@@ -14,7 +14,8 @@ _$(PREFIX)_obs/main.bin: _$(PREFIX)_obs/main.elf
$(PREFIX)objcopy -O binary _$(PREFIX)_obs/main.elf _$(PREFIX)_obs/main.bin
flash: _$(PREFIX)_obs/main.bin
- st-flash write _$(PREFIX)_obs/main.bin 0x8000000
+ openocd -f openocd.cfg -c "program _arm-unknown-eabi-_obs/main.bin reset exit 0x08000000"
+ # st-flash write _$(PREFIX)_obs/main.bin 0x8000000
clean:
rm -rf _*_obs
diff --git a/openocd.cfg b/openocd.cfg
new file mode 100644
index 0000000..1fb1807
--- /dev/null
+++ b/openocd.cfg
@@ -0,0 +1,2 @@
+source [find interface/stlink-v2-1.cfg]
+source [find target/stm32l4x.cfg]