From: Martin Mares Date: Sat, 30 Jun 2018 21:26:25 +0000 (+0200) Subject: Auxiliary scripts X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=3716a8b01e45fa1ee5a5bc0ba468ad3830026408;p=home-hw.git Auxiliary scripts --- diff --git a/bin/semihosting b/bin/semihosting old mode 100644 new mode 100755 index 2d60759..85a1f68 --- a/bin/semihosting +++ b/bin/semihosting @@ -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 index 0000000..da6239a --- /dev/null +++ b/bin/st-flash @@ -0,0 +1,5 @@ +#!/bin/sh +set -e +LD_LIBRARY_PATH=~/stm/stlink +export LD_LIBRARY_PATH +exec ~/stm/stlink/st-flash "$@" diff --git a/usb/Makefile b/usb/Makefile index 1074eb9..eda6836 100644 --- a/usb/Makefile +++ b/usb/Makefile @@ -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