1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

board/nucleo-l1: use unified openocd script

This commit is contained in:
haukepetersen 2015-02-08 15:08:42 +01:00 committed by Hauke Petersen
parent d076bc13e3
commit 596b7ce734
7 changed files with 11 additions and 58 deletions

View File

@ -23,11 +23,12 @@ export AS = $(PREFIX)as
export LINK = $(PREFIX)gcc
export SIZE = $(PREFIX)size
export OBJCOPY = $(PREFIX)objcopy
export DBG = $(PREFIX)gdb
export TERMPROG = $(RIOTBASE)/dist/tools/pyterm/pyterm
export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh
export DEBUGGER = $(RIOTBOARD)/$(BOARD)/dist/debug.sh
export DEBUGSERVER = $(RIOTBOARD)/$(BOARD)/dist/debug-server.sh
export RESET = $(RIOTBOARD)/$(BOARD)/dist/reset.sh
export FLASHER = $(RIOTBASE)/dist/tools/openocd/openocd.sh
export DEBUGGER = $(RIOTBASE)/dist/tools/openocd/openocd.sh
export DEBUGSERVER = $(RIOTBASE)/dist/tools/openocd/openocd.sh
export RESET = $(RIOTBASE)/dist/tools/openocd/openocd.sh
# unwanted (CXXUWFLAGS) and extra (CXXEXFLAGS) flags for c++
export CXXUWFLAGS +=
@ -42,10 +43,12 @@ export ASFLAGS += -ggdb -g3 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endian
export LINKFLAGS += -ggdb -g3 -std=gnu99 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endian -static -lgcc -mthumb -mno-thumb-interwork -nostartfiles
# $(LINKERSCRIPT) is specified in cpu/Makefile.include
export LINKFLAGS += -T$(LINKERSCRIPT)
export OFLAGS = -O binary
export FFLAGS = $(HEXFILE)
export DEBUGGER_FLAGS = $(RIOTBOARD)/$(BOARD)/dist/gdb.conf $(ELFFILE)
export OFLAGS = -O ihex
export TERMFLAGS += -p "$(PORT)"
export FFLAGS = flash
export DEBUGGER_FLAGS = debug
export DEBUGSERVER_FLAGS = debug-server
export RESET_FLAGS = reset
# use the nano-specs of the NewLib when available
ifeq ($(shell $(LINK) -specs=nano.specs -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)

View File

@ -1,12 +0,0 @@
#!/bin/sh
echo "##"
echo "## Starting debug server"
echo "##"
# Needs OpenOCD version 0.9.0 built after Jan. 26th 2015
openocd -f "board/st_nucleo_l1.cfg" \
-c "init" \
-c "targets" \
-c "reset halt"

View File

@ -1,11 +0,0 @@
#!/bin/sh
if [ ! -f "$2" ]; then
echo "ELF-file $2 does not exist"
exit 1
fi
echo "##"
echo "## Debugging $2"
echo "##"
arm-none-eabi-gdb -tui -command="$1" $2

View File

@ -1,15 +0,0 @@
#!/bin/bash
echo "##"
echo "## Flashing $1"
echo "##"
# Needs OpenOCD version 0.9.0 built after Jan. 26th 2015
openocd -f "board/st_nucleo_l1.cfg" \
-c "init" \
-c "targets" \
-c "reset halt" \
-c "program $1 0x8000000 verify" \
-c "reset run"\
-c "shutdown"

View File

@ -1 +0,0 @@
tar extended-remote :3333

1
boards/nucleo-l1/dist/openocd.cfg vendored Normal file
View File

@ -0,0 +1 @@
source [find board/st_nucleo_l1.cfg]

View File

@ -1,12 +0,0 @@
#!/bin/bash
echo "##"
echo "## Resetting $1"
echo "##"
# Needs OpenOCD version 0.9.0 built after Jan. 26th 2015
openocd -f "board/st_nucleo_l1.cfg" \
-c "init" \
-c "reset run"\
-c "shutdown"