]> mj.ucw.cz Git - home-hw.git/commitdiff
Auxiliary scripts
authorMartin Mares <mj@ucw.cz>
Sat, 30 Jun 2018 21:26:25 +0000 (23:26 +0200)
committerMartin Mares <mj@ucw.cz>
Sat, 30 Jun 2018 21:26:25 +0000 (23:26 +0200)
bin/semihosting [changed mode: 0644->0755]
bin/st-flash [new file with mode: 0755]
usb/Makefile

old mode 100644 (file)
new mode 100755 (executable)
index 2d60759..85a1f68
@@ -1,3 +1,3 @@
 #!/bin/bash
 cd ~/stm/openocd
-./openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg -c init -c 'arm semihosting enable' -c 'reset halt' -c 'reset run'
+src/openocd -s tcl -f interface/stlink-v2.cfg -f target/stm32f1x.cfg -c init -c 'arm semihosting enable' -c 'reset halt' -c 'reset run'
diff --git a/bin/st-flash b/bin/st-flash
new file mode 100755 (executable)
index 0000000..da6239a
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+set -e
+LD_LIBRARY_PATH=~/stm/stlink
+export LD_LIBRARY_PATH
+exec ~/stm/stlink/st-flash "$@"
index 1074eb971dd7f57eaaa6a5665f58843264800a05..eda683657c2573c8bc220cd4d2731ead58d699d2 100644 (file)
@@ -174,7 +174,7 @@ LDFLAGS = $(MCU) -specs=nano.specs -T$(LDSCRIPT) $(LIBDIR) $(LIBS) -Wl,-Map=$(BU
 all: $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin
 
 flash: all
-       LD_LIBRARY_PATH=../stlink ../stlink/st-flash write $(BUILD_DIR)/$(TARGET).bin 0x8000000
+       ../bin/st-flash write $(BUILD_DIR)/$(TARGET).bin 0x8000000
 
 #######################################
 # build the application