Help me!
DWARF Parser internal error: Parser::describeSymbol xcpDummyDoubleVariable is not a global variable.
116 views (last 30 days)
Show older comments
liangmaokun liangmaokun
on 28 Dec 2020
Commented: Alexander
on 14 Feb 2023
The project is loaded from "Embedded Coder Support Package for STMicroelectronics Discovery Boards".
If pressing "run" or "Build,Deploy & Start",there is no error returned.pressing the "Monitor & turn" button will return errors.
The errors returned are shown below:
External Mode Open Protocol Connect command failed
Caused by:
DWARF Parser internal error: Parser::describeSymbol xcpDummyDoubleVariable is not a global variable
Component:Simulink | Category:Block diagram error
Unable to connect to the 'STM32F746G-Discovery' target for 'stm32f746gdiscovery_audio_equalizer'.
Component:Simulink | Category:Model error
If other modules are commented out and only input and output are left, as shown in the figure, this error message will still be reported. This problem will not appear on the stm32f4 disco development board. Note that stm32f4 uses an additional ttl-233.

5 Comments
Accepted Answer
bert de Jong
on 7 Mar 2022
Edited: bert de Jong
on 7 Mar 2022
I think the issue is that the xcpDummyDoubleVariable symbol is optimized by the linker, as it is not used anywhere except for checking the size of a double variable. You can prevent this optimization from happening by instructing the linker to keep this variable. This setting is however compiler dependent. In my case, I am using a compiler from IAR, however in the manual of your compiler you can probably find the right setting for you.
This setting can be added in your modelsettings -> Code Generation menu.
- Set 'Build configuration' to 'Specify'
- In the 'Linker' or 'C++ Linker' field add the setting to keep the xcpDummyDoubleVariable symbol. In my case this is: $(ldebug) $(conflags) $(LIBS_TOOLCHAIN) --keep xcpDummyDoubleVariable
A second option would be to modify the xcp_ext_common.c file. this file is located in: [MatlabFolder]\toolbox\coder\xcp\src\target\ext_mode\src\xcp_ext_common.c
After line 623 add the following and save: xcpDummyDoubleVariable = (extmodeDouble_T) 0;
This way, the xcpDummyDoubleVariable is actually 'used', and is therefore not optimized away.
Hope this helps (though it is a bit of a workaround).
6 Comments
More Answers (1)
bert de Jong
on 28 Jun 2022
Please note that this issue has been fixed in R2022a.
1 Comment
Alexander
on 14 Feb 2023
I am using R2022b and the issue is still there despite the changes in the xcp_ext_common.c file
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!