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

board/stm32f4discovery: use unified openocd script

This commit is contained in:
haukepetersen 2015-02-08 14:46:53 +01:00 committed by Hauke Petersen
parent c737bacace
commit d973729e13
6 changed files with 10 additions and 49 deletions

View File

@ -23,10 +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 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
# define build specific options
CPU_USAGE = -mcpu=cortex-m4
@ -39,8 +41,10 @@ export LINKFLAGS += -g3 -ggdb -std=gnu99 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endi
export LINKFLAGS += -T$(LINKERSCRIPT)
export OFLAGS = -O ihex
export TERMFLAGS += -p "$(PORT)"
export FFLAGS = $(HEXFILE)
export DEBUGGER_FLAGS = $(RIOTBOARD)/$(BOARD)/dist/gdb.cfg $(ELFFILE)
export FFLAGS = flash
export DEBUGGER_FLAGS = debug
export DEBUGSERVER_FLAGS = debug-server
export RESET_FLAGS = reset
# unwanted (CXXUWFLAGS) and extra (CXXEXFLAGS) flags for c++
export CXXUWFLAGS +=

View File

@ -1,19 +0,0 @@
#!/bin/sh
openocd -f "board/stm32f4discovery.cfg" \
-c "tcl_port 6333" \
-c "telnet_port 4444" \
-c "init" \
-c "targets" \
-c "reset halt" \
-l /dev/null &
# save pid to terminate afterwards
OCD_PID=$?
# needed for openocd to set up
sleep 2
arm-none-eabi-gdb -tui -command=$1 $2
kill ${OCD_PID}

View File

@ -1,15 +0,0 @@
#!/bin/sh
openocd -f "board/stm32f4discovery.cfg" \
-c 'tcl_port 0' \
-c 'gdb_port 0' \
-c 'telnet_port 0' \
-c "init" \
-c "targets" \
-c "reset" \
-c "halt" \
-c "flash protect 0 0 11 off" \
-c "flash write_image erase $1 0 ihex" \
-c "verify_image $1" \
-c "reset run"\
-c "shutdown"

View File

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

View File

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

View File

@ -1,9 +0,0 @@
#!/bin/sh
openocd -f "board/stm32f4discovery.cfg" \
-c 'tcl_port 0' \
-c 'gdb_port 0' \
-c 'telnet_port 0' \
-c "init" \
-c "reset run" \
-c "shutdown"