Merge pull request #2372 from haukepetersen/add_f0discovery_openocd
board/stm32f0discovery: switched to OpenOCDdev/timer
commit
5595bbb94b
@ -1,4 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Debugging $1"
|
||||
arm-none-eabi-gdb -tui -command=$1 $2
|
||||
# check if GDB_PORT is already defined
|
||||
if [ -z ${GDB_PORT} ]; then
|
||||
# set to gdb standard port
|
||||
GDB_PORT=3333
|
||||
fi
|
||||
echo "Listening for GDB connection on port ${GDB_PORT}"
|
||||
|
||||
openocd -f "board/stm32f0discovery.cfg" \
|
||||
-c "tcl_port 6333" \
|
||||
-c "telnet_port 4444" \
|
||||
-c "gdb_port ${GDB_PORT}" \
|
||||
-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="${RIOTBOARD}/${BOARD}/dist/gdb.cfg" ${ELFFILE}
|
||||
|
||||
kill ${OCD_PID}
|
||||
|
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
openocd -f "board/stm32f0discovery.cfg" \
|
||||
-c 'tcl_port 0' \
|
||||
-c 'gdb_port 0' \
|
||||
-c 'telnet_port 0' \
|
||||
-c "init" \
|
||||
-c "targets" \
|
||||
-c "reset halt" \
|
||||
-c "flash write_image erase ${HEXFILE} 0" \
|
||||
-c "verify_image ${HEXFILE}" \
|
||||
-c "reset run"\
|
||||
-c "shutdown"
|
@ -0,0 +1 @@
|
||||
target extended-remote :3333
|
@ -1 +0,0 @@
|
||||
tar extended-remote :4242
|
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
openocd -f "board/stm32f0discovery.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