ModusToolbox and Cypress Programmer tools use a few default ports to program/debug devices. These default ports might have to be changed in certain scenarios, such as these:
Ports are blocked by the antivirus or firewall
Ports are used by an internal corporate application
More than one device needs to programmed/debugged
Do the following to change the default ports used by these tools.
ModusToolbox uses the following ports by default:
Do the following to change the default ports used by these tools:
1.1 Change GDB Ports
Eclipse IDE for ModusToolbox debug plugin does not support multi-core devices. Therefore, OpenOCD will open one GDB port per CPU starting at 3332. The Launch Configurations instruct the GDB client to connect to port 3332 for the CM0+ CPU and 3333 for the CM4 CPU. Do the following to change the default ports:
In the Eclipse IDE for ModusToolbox, select Run > Run Configurations.
Select the appropriate launch under GDB OpenOCD Debugging. For example,<project_name> Debug (KitProg3).
In the Debugger pane under Config options,search for the command -c “gdb_port 3332” as shown, and change this to the port that is required such as port 3850. See Figure 1.
4. Once the command is changed, change the GDB port: option to the consecutive port. So, in this case, it will be 3850+1 which is 3851 as shown in Figure 2.
5. Click Apply and close the Run Configurations window. GDB ports 3850 and 3851 are now used when a debug session is started. Confirm this in the Console logs as shown in Figure 3.
1.2 Telnet Port
This can be changed in the Telnet port: option in the Debugger pane. You do not need to add or change any command under Config options.
1.3 Tcl Port
Similar to Telnet port, Tcl port can be changed in the Tcl port: option.
2. Cypress Programmer
Cypress Programmer uses the following ports by default:
2.1 GDB Ports
Cypress Programmer enables the GDB ports by default. However, these are not actually used by Cypress Programmer. Do the following to disable these ports:
Open the Tcl script cpu_psoc6_base.cfgin the directory - <cypress_programmer_installation_directory>\ scripts\PSoC6\
Add the command gdb_port disabled in the file. See Figure 4.
3. Save the file and restart Cypress Programmer.
2.2 Telnet Port
The Telnet port used by Cypress Programmer cannot be changed because it is hardcoded into the GUI.