NUC200LE3AN_Card/run_debugserver.sh

37 lines
645 B
Bash
Executable File

#!/bin/bash
run_jlinkserver() {
JLinkGDBServerCLExe -if SWD -device NUC220LE3AN \
-ir -nogui \
-localhostonly -port 3333 \
-rtos GDBServer/RTOSPlugin_FreeRTOS.so
}
run_openocd_jlink() {
openocd -f "interface/jlink.cfg" -c "transport select swd" -f "target/numicro.cfg"
}
run_pyocd() {
echo "Note: pyOCD uses low level DAP APIs provided by J-LINK," \
"speed settings and other functions may not available."
pyocd gdbserver -t nuc220le3an -f 4m --persist
}
case $1 in
jlink)
run_jlinkserver
;;
pyocd)
run_pyocd
;;
openocd-jlink)
run_openocd_jlink
;;
*)
echo "Usage: run_debugserver.sh jlink|pyocd|openocd-jlink"
;;
esac