How to configure shared mode

Revision as of 13:50, 2 March 2020 by Registered User


For debugging purposes, it can be of some interest to run simultaneously one IDE and STM32CubeMonitor. This feature is named "Shared mode".

The Shared mode enables the use of STM32CubeMonitor in parallel with another application supporting Shared mode such as STM32CubeIDE, STM32CubeProgrammer or IAR Embedded Workbench.

Two communication protocols are available:

  • "p2p": to directly connect to the probe, which guarantees high-rate data acquisition (default protocol)
  • "tcp": to pass through to tcp-server, assuming the stLinkServer is installed on the host. The Shared mode is based on the "tcp" protocol.

Below a example of a probe connected in Shared mode. The connection status is indicated in the flow by "tcp connected".

flow in tcp mode

To set the type of connection mode, configure the connectionType parameter in the settings.js file (see STM32CubeMonitor:How to change general settings).

1 How to set Shared mode with STM32CubeIDE

Open the Debug Configurations pane.

Go to the Debugger tab.

Select the “Enable shared ST-LINK” option.

2 How to set Shared mode with IAR Embedded workbench IDE

To enable TCP mode in IAR Embedded Wokbench IDE:

Go to Project > Options > Debugger > Extra Options.

Add in --stlink_use_serve in the command line options: