SQUASHME: Fixed issues and omitted parameters

This commit is contained in:
Thomas Eichinger 2015-01-29 14:48:20 +01:00
parent 7b4472718f
commit dd45333a09
5 changed files with 15 additions and 19 deletions

View File

@ -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 += -g3 -ggdb -std=gnu99 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endian -static -lgcc -mthumb -mthumb-interwork -nostartfiles
export LINKFLAGS += -T$(LINKERSCRIPT) export LINKFLAGS += -T$(LINKERSCRIPT)
export OFLAGS = -O binary export OFLAGS = -O binary
export FFLAGS = $(HEXFILE)
export DEBUGGER_FLAGS = $(RIOTBOARD)/$(BOARD)/dist/gdb.conf $(ELFFILE)
export TERMFLAGS += -p "$(PORT)" export TERMFLAGS += -p "$(PORT)"
# unwanted (CXXUWFLAGS) and extra (CXXEXFLAGS) flags for c++ # unwanted (CXXUWFLAGS) and extra (CXXEXFLAGS) flags for c++

View File

@ -1,23 +1,21 @@
#!/bin/sh #!/bin/sh
if [ ! -f "$2" ]; then echo "##"
echo "ELF-file $2 does not exist" echo "## Debugging ${ELFFILE}"
exit 1 echo "##"
fi
# if GDB_PORT does not exist or holds empty string # if GDB_PORT does not exist or holds empty string
if [ -z ${GDB_PORT} ]; then 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 fi
echo "##"
echo "## Debugging $2"
echo "##"
openocd -f "board/stm32f3discovery.cfg" \ openocd -f "board/stm32f3discovery.cfg" \
-c "tcl_port 6333" \ -c "tcl_port 6333" \
-c "telnet_port 4444" \ -c "telnet_port 4444" \
-c "gdb_port ${GDB_PORT}" -c "gdb_port ${GDB_PORT}" \
-c "init" \ -c "init" \
-c "targets" \ -c "targets" \
-c "reset halt" \ -c "reset halt" \
@ -29,6 +27,6 @@ OCD_PID=$?
# needed for openocd to set up # needed for openocd to set up
sleep 2 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} kill ${OCD_PID}

View File

@ -1,16 +1,16 @@
#!/bin/bash #!/bin/bash
echo "##" echo "##"
echo "## Flashing $1" echo "## Flashing ${HEXFILE}"
echo "##" echo "##"
openocd -f "board/stm32f3discovery.cfg" \ openocd -f "board/stm32f3discovery.cfg" \
-c "init" \
-c "tcl_port 0" \ -c "tcl_port 0" \
-c "telnet_port 0" \ -c "telnet_port 0" \
-c "gdb_port 0" \ -c "gdb_port 0" \
-c "init" \
-c "targets" \ -c "targets" \
-c "reset halt" \ -c "reset halt" \
-c "program $1 0x08000000 verify" \ -c "program ${HEXFILE} 0x08000000 verify" \
-c "reset run"\ -c "reset run"\
-c "shutdown" -c "shutdown"

View File

@ -1 +1 @@
tar extended-remote :4242 tar extended-remote :3333

View File

@ -1,13 +1,13 @@
#!/bin/bash #!/bin/bash
echo "##" echo "##"
echo "## Resetting $1" echo "## Resetting ${BOARD}"
echo "##" echo "##"
openocd -f "board/stm32f3discovery.cfg" \ openocd -f "board/stm32f3discovery.cfg" \
-c "init" \
-c "tcl_port 0" \ -c "tcl_port 0" \
-c "telnet_port 0" \ -c "telnet_port 0" \
-c "gdb_port 0" \ -c "gdb_port 0" \
-c "init" \
-c "reset run"\ -c "reset run"\
-c "shutdown" -c "shutdown"