From 953b8db36d684829baa9cf669be1b799c8a01d46 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Sun, 29 Nov 2020 12:28:10 -0700 Subject: Switch flash program to openocd. It is more consistent than st-flash. --- Makefile.preamble | 3 ++- openocd.cfg | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 openocd.cfg 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] -- cgit