STM32CubeMonitor:How to configure shared mode

Stable: 15.03.2024 - 13:27 / Revision: 01.02.2024 - 15:59

I am here to prevent the first-page-empty bug!


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:


IMPORTANT NOTICE – READ CAREFULLY
STMicroelectronics NV and its subsidiaries ("ST") reserve the right to make changes, corrections, enhancements, modifications, and improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgment.

Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of purchasers’ products.

No license, express or implied, to any intellectual property right is granted by ST herein.

Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.

ST and the ST logo are trademarks of ST. For additional information about ST trademarks, refer to www.st.com/trademarks. All other product or service names are the property of their respective owners.

Information in this document supersedes and replaces information previously supplied in any prior versions of this document.