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:
parent
c737bacace
commit
d973729e13
@ -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 +=
|
||||
|
19
boards/stm32f4discovery/dist/debug.sh
vendored
19
boards/stm32f4discovery/dist/debug.sh
vendored
@ -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}
|
15
boards/stm32f4discovery/dist/flash.sh
vendored
15
boards/stm32f4discovery/dist/flash.sh
vendored
@ -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"
|
1
boards/stm32f4discovery/dist/gdb.cfg
vendored
1
boards/stm32f4discovery/dist/gdb.cfg
vendored
@ -1 +0,0 @@
|
||||
target extended-remote :3333
|
1
boards/stm32f4discovery/dist/openocd.cfg
vendored
Normal file
1
boards/stm32f4discovery/dist/openocd.cfg
vendored
Normal file
@ -0,0 +1 @@
|
||||
source [find board/stm32f4discovery.cfg]
|
9
boards/stm32f4discovery/dist/reset.sh
vendored
9
boards/stm32f4discovery/dist/reset.sh
vendored
@ -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"
|
Loading…
Reference in New Issue
Block a user