Error:External Mode Open Protocol Connect command failed

Hi, I'm currently working with a NUCLEO-H7A3ZI and Matlab Simulink. I have installed the "Embedded Coder Support Package for STMicroelectronics STM32 Processors" and alredy created a small test model. When I click "Build Deploy & Start", everything works fine, but i can't use the "Monitor & Tune" Mode :
Error:External Mode Open Protocol Connect command failed
Caused by:
Could not connect to target application: XCP internal error: timeout expired, in response to XCP CONNECT command
I also tried to "Build, Deploy & Start" and then clicking the connect button in the step by step commands section of "Monitor & Tune". This time i got :
Error:External Mode Open Protocol Connect command failed
Caused by:
DWARF Parser internal error: Parser::describeSymbol xcpDummyDoubleVariable is not a global variable
I verified the com port in Connectivity Under Hardware Settings. The one i used correspond to STMicroelectronics STLink Virtual Com Port in my device manager (I also check the baudrate to be equal beetwin com port and cubemx .ioc's file).
For information, I'm using MATLAB R2024b, STM32CubeMX 6.4.0

1 Comment

Hi,
It is my understanding that you are able to successfully build and deploy your model, but encounter an error when connecting in 'Monitor & Tune' mode, including messages related to XCP communication and symbol parsing.
This type of error may occur if no signals are configured for logging in the model during External Mode operation. 'Monitor & Tune' relies on signal logging for data exchange between the host and target.
You may try enabling logging for at least one signal in your model (for example, by marking a signal for logging or enabling signal streaming) and then attempt to connect again.
If the issue persists, it may help to verify the External Mode configuration.

Sign in to comment.

Answers (1)

Madhu Varshini
Madhu Varshini on 30 Jun 2026 at 6:59
Edited: Madhu Varshini on 30 Jun 2026 at 7:00
Hi,
Regarding the issues you're experiencing with External Mode on the NUCLEO-H7A3ZI:\
1. XCP CONNECT Timeout (Monitor & Tune):
This was a known issue that affected a few targets in older versions — if your model did not have any signals being
logged, External Mode would fail to connect. This issue has now been fixed. However, please ensure that at least one signal is being logged in your model before using "Monitor & Tune."
2. DWARF Parser Error (Connect after Build, Deploy & Start):
When you use "Build, Deploy & Start," it is not recommended to subsequently click the "Connect" button in the
step-by-step commands section. The error you're seeing in this case is expected behavior — these are two separate
workflows and should not be combined.
Next Steps:
- Add signal logging to your model (if not already present) and retry "Monitor & Tune" directly.
- If the issue persists after adding signal logging, please contact Technical Support for further assistance:
https://in.mathworks.com/support/contact_us.html
When contacting support, please ensure that both your Simulink model and IOC file are attached so the
team can reproduce and investigate the issue.
Thank you,
Madhu Varshini

Products

Release

R2024b

Asked:

on 17 Jun 2026 at 13:41

Edited:

on 30 Jun 2026 at 7:00

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!