From 3716a8b01e45fa1ee5a5bc0ba468ad3830026408 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 30 Jun 2018 23:26:25 +0200 Subject: [PATCH] Auxiliary scripts --- bin/semihosting | 2 +- bin/st-flash | 5 +++++ usb/Makefile | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) mode change 100644 => 100755 bin/semihosting create mode 100755 bin/st-flash 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 -- 2.39.2