Openocd GDB server configuration

I am using Openocd to debug my code remotely for STM32 via Raspberry pi as detailed in this tutorial: https://learn.adafruit.com/programming-microcontrollers-using-openocd-on-raspberry-pi

enter image description here

Whenever I run openocd it starts gdb server on port 3333 which is default of course as shown in the picture above. My question is that, is there a way to provide a different port number for openocd to start the gdb-debugger on... For example, if I want to run openocd where i want gdb server to start on 3334 instead of 3333 how can i do that.

I intend to do that so that i can run multiple openocd instances for different targets simultaneously connected to a single raspberry pi. Any help will be greatly appreciated. Thanks in advance.

Upvotes: 0

Views: 1200

Answers (1)

OpenOcd manual explains how to select a specific port number inside the configuration file as shown in image below:

enter image description here

Upvotes: 1

Related Questions