필터 지우기
필터 지우기

DWARF Parser internal error: Parser::describeSymbol xcpDummyDoubleVariable is not a global variable.

조회 수: 90 (최근 30일)
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

댓글을 달려면 로그인하십시오.

채택된 답변

bert de Jong
bert de Jong 2022년 3월 7일
편집: bert de Jong 2022년 3월 7일
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.
  1. Set 'Build configuration' to 'Specify'
  2. 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).
  댓글 수: 9
chen junbing
chen junbing 2024년 5월 8일
Hi:
Do you solve the problem?
I also have the same problem. 'DWARF Parser internal error: Parser::describeSymbol xcpDummyDoubleVariable is not a global variable'
Robert Scott
Robert Scott 2024년 6월 5일
Yep me too. Cant fix it.
I thought this was suppose to be plug and play.

댓글을 달려면 로그인하십시오.

추가 답변 (4개)

bert de Jong
bert de Jong 2022년 6월 28일
Please note that this issue has been fixed in R2022a.
  댓글 수: 2
Alexander
Alexander 2023년 2월 14일
I am using R2022b and the issue is still there despite the changes in the xcp_ext_common.c file
Vivek
Vivek 2023년 3월 30일
I tried to implement it but its not working.... I have matlab R2021a and hardware interfaced is jetson nano. I tried to modify the code as specified in above solution but its not working...

댓글을 달려면 로그인하십시오.


Sanath
Sanath 2023년 9월 8일
Hi, I still have this issue in MATLAB 2023a, my serial communcation is not working.has anyone found a solution?
  댓글 수: 2
Mahesh Bharath Pudutha
Mahesh Bharath Pudutha 2023년 9월 20일
Hello,
Even I am facing the same issue, The controller which I am using is TMS320F28335 and the Matlab version is 2023a. Requesting for any leads and help.
Sanath
Sanath 2023년 9월 25일
While i have not been able to identify the source of the issue, this is what i think is a work around for me. My connect function doesnt work still but monitor and tune works fine.
  1. Try increasing the baud rate to max possible by trial and error and make sure you have dedicated timer swtiched off in external mode.
  2. Select the correct com port for STM and for newer versions, the Virtual COM port is to be connected.
  3. This is the work around which worked for me, I run the "STM external mode" example, once it works, I edit and build my whole model in the same example file.

댓글을 달려면 로그인하십시오.


Rakesh
Rakesh 2023년 9월 25일
Hi, I still have this issue in MATLAB 2023a, my serial communcation is not working.has anyone found a solution?
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
  댓글 수: 2
Sanath
Sanath 2023년 9월 25일
While i have not been able to identify the source of the issue, this is what i think is a work around for me. My connect function doesnt work still but monitor and tune works fine.
  1. Try increasing the baud rate to max possible by trial and error and make sure you have dedicated timer swtiched off in external mode.
  2. Select the correct com port for STM and for newer versions, the Virtual COM port is to be connected.
  3. This is the work around which worked for me, I run the "STM external mode" example, once it works, I edit and build my whole model in the same example file.
vallela
vallela 2023년 9월 26일
I am facing the same problem. In my case monitor and tune also not working. where can i find the stm external mode example. it would be really helpful if you can help me. where can I increase the baud rate.

댓글을 달려면 로그인하십시오.


Nithin
Nithin 2023년 12월 5일
This issue may occur if Monitor & Tune is run without logging any signal or if there are no outports connected in the Simulink model. Ensure a signal is selected for logging in the model. After doing so, the error message should disappear and external mode should run as expected.
If the problem still persists, contact MathWorks Technical Support: If the problem still persists https://in.mathworks.com/support/contact_us.html

Community Treasure Hunt

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

Start Hunting!

Translated by