mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-25 14:33:52 +01:00
board/fox: use unified openocd file
This commit is contained in:
parent
95bf4e2f94
commit
a44ff8f8df
@ -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
|
||||
export CPU_USAGE = -mcpu=cortex-m3
|
||||
@ -43,9 +45,11 @@ export LINKFLAGS += -ggdb -g3 -std=gnu99 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endi
|
||||
# $(LINKERSCRIPT) is specified in cpu/Makefile.include
|
||||
export LINKFLAGS += -T$(LINKERSCRIPT)
|
||||
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
|
||||
ifeq ($(shell $(LINK) -specs=nano.specs -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)
|
||||
|
||||
20
boards/fox/dist/debug.sh
vendored
20
boards/fox/dist/debug.sh
vendored
@ -1,20 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
openocd -f "${RIOTBOARD}/${BOARD}/dist/${BOARD}_jtag.cfg" \
|
||||
-f "target/stm32f1x.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 5
|
||||
|
||||
arm-none-eabi-gdb -tui --command=${1} ${2}
|
||||
|
||||
kill ${OCD_PID}
|
||||
12
boards/fox/dist/flash.sh
vendored
12
boards/fox/dist/flash.sh
vendored
@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
openocd -f "${RIOTBOARD}/${BOARD}/dist/${BOARD}_jtag.cfg" \
|
||||
-f "target/stm32f1x.cfg" \
|
||||
-c "init" \
|
||||
-c "targets" \
|
||||
-c "reset halt" \
|
||||
-c "reset init" \
|
||||
-c "flash write_image erase $1" \
|
||||
-c "verify_image $1" \
|
||||
-c "reset run"\
|
||||
-c "shutdown"
|
||||
3
boards/fox/dist/gdb.conf
vendored
3
boards/fox/dist/gdb.conf
vendored
@ -1,3 +0,0 @@
|
||||
target remote localhost:3333
|
||||
monitor reset halt
|
||||
load
|
||||
7
boards/fox/dist/reset.sh
vendored
7
boards/fox/dist/reset.sh
vendored
@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
openocd -f "${RIOTBOARD}/${BOARD}/dist/${BOARD}_jtag.cfg" \
|
||||
-f "target/stm32f1x.cfg" \
|
||||
-c "init" \
|
||||
-c "reset run" \
|
||||
-c "shutdown"
|
||||
Loading…
x
Reference in New Issue
Block a user