board/nucloe-f334: use unified openocd script

This commit is contained in:
haukepetersen 2015-02-08 15:06:33 +01:00 committed by Hauke Petersen
parent a5a1ffe6ba
commit d076bc13e3
7 changed files with 11 additions and 52 deletions

View File

@ -23,11 +23,12 @@ export AS = $(PREFIX)as
export LINK = $(PREFIX)gcc export LINK = $(PREFIX)gcc
export SIZE = $(PREFIX)size export SIZE = $(PREFIX)size
export OBJCOPY = $(PREFIX)objcopy export OBJCOPY = $(PREFIX)objcopy
export DBG = $(PREFIX)gdb
export TERMPROG = $(RIOTBASE)/dist/tools/pyterm/pyterm export TERMPROG = $(RIOTBASE)/dist/tools/pyterm/pyterm
export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh export FLASHER = $(RIOTBASE)/dist/tools/openocd/openocd.sh
export DEBUGGER = $(RIOTBOARD)/$(BOARD)/dist/debug.sh export DEBUGGER = $(RIOTBASE)/dist/tools/openocd/openocd.sh
export DEBUGSERVER = $(RIOTBOARD)/$(BOARD)/dist/debug-server.sh export DEBUGSERVER = $(RIOTBASE)/dist/tools/openocd/openocd.sh
export RESET = $(RIOTBOARD)/$(BOARD)/dist/reset.sh export RESET = $(RIOTBASE)/dist/tools/openocd/openocd.sh
# unwanted (CXXUWFLAGS) and extra (CXXEXFLAGS) flags for c++ # unwanted (CXXUWFLAGS) and extra (CXXEXFLAGS) flags for c++
export CXXUWFLAGS += 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 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 # $(LINKERSCRIPT) is specified in cpu/Makefile.include
export LINKFLAGS += -T$(LINKERSCRIPT) export LINKFLAGS += -T$(LINKERSCRIPT)
export OFLAGS = -O binary export OFLAGS = -O ihex
export FFLAGS = $(HEXFILE)
export DEBUGGER_FLAGS = $(RIOTBOARD)/$(BOARD)/dist/gdb.conf $(ELFFILE)
export TERMFLAGS += -p "$(PORT)" 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 # 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) #ifeq ($(shell $(LINK) -specs=nano.specs -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)

View File

@ -1,10 +0,0 @@
#!/bin/sh
echo "##"
echo "## Starting debug server"
echo "##"
openocd -f board/st_nucleo_f334r8.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,13 +0,0 @@
#!/bin/bash
echo "##"
echo "## Flashing $1"
echo "##"
openocd -f board/st_nucleo_f334r8.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-f334/dist/openocd.cfg vendored Normal file
View File

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

View File

@ -1,10 +0,0 @@
#!/bin/bash
echo "##"
echo "## Resetting $1"
echo "##"
openocd -f board/st_nucleo_f334r8.cfg \
-c "init" \
-c "reset run"\
-c "shutdown"