diff --git a/boards/stm32f3discovery/Makefile.include b/boards/stm32f3discovery/Makefile.include
index 432baa3311bc5180d5bb21990ddae1caecc1785f..9ace996a7d30f765774d3e2959909fffb41425db 100644
--- a/boards/stm32f3discovery/Makefile.include
+++ b/boards/stm32f3discovery/Makefile.include
@@ -37,8 +37,6 @@ 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 -mthumb-interwork -nostartfiles
 export LINKFLAGS += -T$(LINKERSCRIPT)
 export OFLAGS = -O binary
-export FFLAGS = $(HEXFILE)
-export DEBUGGER_FLAGS = $(RIOTBOARD)/$(BOARD)/dist/gdb.conf $(ELFFILE)
 export TERMFLAGS += -p "$(PORT)"
 
 # unwanted (CXXUWFLAGS) and extra (CXXEXFLAGS) flags for c++
diff --git a/boards/stm32f3discovery/dist/debug.sh b/boards/stm32f3discovery/dist/debug.sh
index 726f0562c064e3f41ea74396987987c8f4c459f4..3676c42e137ffe6782884f65fff0dba66237c761 100755
--- a/boards/stm32f3discovery/dist/debug.sh
+++ b/boards/stm32f3discovery/dist/debug.sh
@@ -1,23 +1,21 @@
 #!/bin/sh
 
-if [ ! -f "$2" ]; then
-    echo "ELF-file $2 does not exist"
-    exit 1
-fi
+echo "##"
+echo "## Debugging ${ELFFILE}"
+echo "##"
 
 # if GDB_PORT does not exist or holds empty string
 if [ -z ${GDB_PORT} ]; then
-    GDB_PORT=0
+    # set to gdb standard port
+    GDB_PORT=3333
+else
+    echo "Listening for GDB connection on port ${GDB_PORT}"
 fi
 
-echo "##"
-echo "## Debugging $2"
-echo "##"
-
 openocd -f "board/stm32f3discovery.cfg" \
     -c "tcl_port 6333" \
     -c "telnet_port 4444" \
-    -c "gdb_port ${GDB_PORT}"
+    -c "gdb_port ${GDB_PORT}" \
     -c "init" \
     -c "targets" \
     -c "reset halt" \
@@ -29,6 +27,6 @@ OCD_PID=$?
 # needed for openocd to set up
 sleep 2
 
-arm-none-eabi-gdb -tui -command=$1 $2
+arm-none-eabi-gdb -tui -command=${RIOTBOARD}/${BOARD}/dist/gdb.conf ${ELFFILE}
 
 kill ${OCD_PID}
diff --git a/boards/stm32f3discovery/dist/flash.sh b/boards/stm32f3discovery/dist/flash.sh
index 4078fcbdd8a01b68f1d2183c71da6c53044f05bf..15666484609e2232e46eccbf1a98ac057a04fd23 100755
--- a/boards/stm32f3discovery/dist/flash.sh
+++ b/boards/stm32f3discovery/dist/flash.sh
@@ -1,16 +1,16 @@
 #!/bin/bash
 
 echo "##"
-echo "## Flashing $1"
+echo "## Flashing ${HEXFILE}"
 echo "##"
 
 openocd -f "board/stm32f3discovery.cfg" \
-    -c "init" \
     -c "tcl_port 0" \
     -c "telnet_port 0" \
     -c "gdb_port 0" \
+    -c "init" \
     -c "targets" \
     -c "reset halt" \
-    -c "program $1 0x08000000 verify" \
+    -c "program ${HEXFILE} 0x08000000 verify" \
     -c "reset run"\
     -c "shutdown"
diff --git a/boards/stm32f3discovery/dist/gdb.conf b/boards/stm32f3discovery/dist/gdb.conf
index 7257c72805c4b42630e10ee7c92a7052d92bc37c..ba7908fdf32824aa66ad85efcab0f96f781a6331 100644
--- a/boards/stm32f3discovery/dist/gdb.conf
+++ b/boards/stm32f3discovery/dist/gdb.conf
@@ -1 +1 @@
-tar extended-remote :4242
+tar extended-remote :3333
diff --git a/boards/stm32f3discovery/dist/reset.sh b/boards/stm32f3discovery/dist/reset.sh
index 18b4c68b075db417389631eed195186995bf7d91..b47fa81fa6f7c4eae4dd24dbbcda7095bcfd462b 100755
--- a/boards/stm32f3discovery/dist/reset.sh
+++ b/boards/stm32f3discovery/dist/reset.sh
@@ -1,13 +1,13 @@
 #!/bin/bash
 
 echo "##"
-echo "## Resetting $1"
+echo "## Resetting ${BOARD}"
 echo "##"
 
 openocd -f "board/stm32f3discovery.cfg" \
-    -c "init" \
     -c "tcl_port 0" \
     -c "telnet_port 0" \
     -c "gdb_port 0" \
+    -c "init" \
     -c "reset run"\
     -c "shutdown"