From 869a6dc80538749fdcad1cf840a0cb735cc86aa0 Mon Sep 17 00:00:00 2001 From: Fabian Nack Date: Sun, 1 Mar 2015 08:30:47 +0100 Subject: [PATCH] boards/msbiot: Switch from st-util to openocd --- boards/msbiot/Makefile.include | 16 ++++++++++------ boards/msbiot/dist/debug.sh | 4 ---- boards/msbiot/dist/gdb.conf | 1 - boards/msbiot/dist/openocd.cfg | 1 + 4 files changed, 11 insertions(+), 11 deletions(-) delete mode 100755 boards/msbiot/dist/debug.sh delete mode 100644 boards/msbiot/dist/gdb.conf create mode 100644 boards/msbiot/dist/openocd.cfg diff --git a/boards/msbiot/Makefile.include b/boards/msbiot/Makefile.include index 1e8e88e90b..681060b116 100644 --- a/boards/msbiot/Makefile.include +++ b/boards/msbiot/Makefile.include @@ -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 = st-flash -export DEBUGGER = $(RIOTBOARD)/$(BOARD)/dist/debug.sh -export DEBUGSERVER = st-util +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 @@ -36,10 +38,12 @@ export CFLAGS += -ffunction-sections -fdata-sections -fno-builtin export ASFLAGS += -ggdb -g3 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endian export LINKFLAGS += -g3 -ggdb -std=gnu99 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endian -static -lgcc -mthumb -mno-thumb-interwork -nostartfiles export LINKFLAGS += -T$(LINKERSCRIPT) -export OFLAGS = -O binary -export FFLAGS = write bin/$(BOARD)/$(APPLICATION).hex 0x8000000 -export DEBUGGER_FLAGS = $(RIOTBOARD)/$(BOARD)/dist/gdb.conf $(BINDIR)/$(APPLICATION).elf +export OFLAGS = -O ihex export TERMFLAGS += -p "$(PORT)" +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 += diff --git a/boards/msbiot/dist/debug.sh b/boards/msbiot/dist/debug.sh deleted file mode 100755 index 1a0c4b0cd4..0000000000 --- a/boards/msbiot/dist/debug.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -echo "Debugging $1" -arm-none-eabi-gdb -tui -command=$1 $2 diff --git a/boards/msbiot/dist/gdb.conf b/boards/msbiot/dist/gdb.conf deleted file mode 100644 index 7257c72805..0000000000 --- a/boards/msbiot/dist/gdb.conf +++ /dev/null @@ -1 +0,0 @@ -tar extended-remote :4242 diff --git a/boards/msbiot/dist/openocd.cfg b/boards/msbiot/dist/openocd.cfg new file mode 100644 index 0000000000..0350e7eba3 --- /dev/null +++ b/boards/msbiot/dist/openocd.cfg @@ -0,0 +1 @@ +source [find board/stm32f4discovery.cfg]