diff --git a/gdb-server-launcher.py b/gdb-server-launcher.py index 029db58..6abcb65 100644 --- a/gdb-server-launcher.py +++ b/gdb-server-launcher.py @@ -92,7 +92,8 @@ def signal_handler(sig, frame): settings.GDB_SERVER_PORT, settings.GDB_SWO_PORT, settings.GDB_SERVER_PATH, - settings.STLINK_PROG_DIR], + settings.STLINK_PROG_DIR, + settings.APID], shell=False) # Start the dummy port. Will exit when the GDB server exits. diff --git a/img/debug_conf_1.png b/img/debug_conf_1.png index 5f76ec8..bfe7687 100644 Binary files a/img/debug_conf_1.png and b/img/debug_conf_1.png differ diff --git a/run_stlink_gdb_server.bat b/run_stlink_gdb_server.bat index 3fe88cf..823535e 100644 --- a/run_stlink_gdb_server.bat +++ b/run_stlink_gdb_server.bat @@ -13,6 +13,9 @@ echo GDB_SERVER_PATH: %GDB_SERVER_PATH% set STLINK_PROG_DIR=%4% echo STLINK_PROG_DIR: %STLINK_PROG_DIR% +set APID=%5% +echo APID: %APID% + %GDB_SERVER_PATH% ^ --port-number %GDB_PORT% ^ --swd ^ @@ -21,4 +24,4 @@ echo STLINK_PROG_DIR: %STLINK_PROG_DIR% --attach ^ --verbose ^ -cp %STLINK_PROG_DIR% ^ --m 0 \ No newline at end of file +-m %APID% \ No newline at end of file diff --git a/run_stlink_gdb_server.sh b/run_stlink_gdb_server.sh index 75b01d8..7b50491 100755 --- a/run_stlink_gdb_server.sh +++ b/run_stlink_gdb_server.sh @@ -14,6 +14,9 @@ echo " GDB_SERVER_PATH: ${GDB_SERVER_PATH}" export STLINK_PROG_DIR=$4 echo " STLINK_PROG_DIR: ${STLINK_PROG_DIR}" +export APID=$5 +echo " APID: ${APID}" + ${GDB_SERVER_PATH} \ --port-number ${GDB_PORT} \ --swd \ @@ -22,4 +25,4 @@ ${GDB_SERVER_PATH} \ --attach \ --verbose \ -cp ${STLINK_PROG_DIR} \ --m 0 +-m ${APID} diff --git a/settings.py b/settings.py index 8d8f62d..82edfed 100644 --- a/settings.py +++ b/settings.py @@ -23,3 +23,7 @@ # script. If you change this, also update the SWO port number in your Debug Configuration # under "Serial Wire Viewer" settings. IDE_SWO_PORT = '61035' + +# Most target MCUs have only one access port (AP). +# If you need to connect to a different port, you can specify it here. +APID = '0' \ No newline at end of file