Filter löschen
Filter löschen

How to capture code coverage for c2000 project in PiL mode?

2 Ansichten (letzte 30 Tage)
Somdut Dey
Somdut Dey am 28 Dez. 2020
Kommentiert: Somdut Dey am 5 Jan. 2021
Hi,
I am tring to capture code coverage using c2000 uC in PiL mode. I am able to run model in PiL mode using C2000 package. The model has controller and plant model. Controller is model referenced and configured to run in PiL mode. When I run the model with code coverage setiing turned on, in PiL mode model simulation model gets stuck after "Evaluating PostCodeGenCommand specified in the model". Thereafter no progress happens. When I turn off the code coverage seetings then model gets simulated as expected.
### Code for the model reference code generation target for model XXXX is up to date because no functional changes were found in the referenced model.
### Evaluating PostCodeGenCommand specified in the model
please suggest what to do to get coverage data in PiL mode for c2000 project.
P.S: In normal mode (MiL) I get code coverage.
Thanks,
Somdut
Additinal info:
Warning: Removed 'C:\Users\XXX\Code\slprj\ert\XXX\instrumented' from the MATLAB path for this MATLAB session. See 'doc path' for more information.
Warning: Could not detect front-end options for file "C:\ProgramData\MATLAB\SupportPackages\R2019a\toolbox\target\supportpackages\tic2000_base\crl\mw_C28x_addsubasm_s32.asm". Proceeding with the default SIL settings...
Warning: File "C:\ProgramData\MATLAB\SupportPackages\R2019a\toolbox\target\supportpackages\tic2000_base\crl\mw_C28x_addsubasm_s32.asm" not instrumented for coverage because of previous error
Warning: Could not detect front-end options for file "C:/Users/XXX/Code\slprj\ert\_sharedutils\rtGetInf.c". Proceeding with the default SIL settings...

Antworten (1)

Sukrut Tamhankar
Sukrut Tamhankar am 31 Dez. 2020
Bearbeitet: Sukrut Tamhankar am 31 Dez. 2020
This issue in Evaluating PostCodeGenCommand specified in the model is probably due to corrupted files in the 'thirdpartytools' folder or improper installation of the support packages.
The issue can be resolved by recreating the corrupted files, which can be done by following the below steps:
  • Go to the folder C:\ProgramData\MATLAB\SupportPackages\R2019a\toolbox\target\supportpackages\tic2000\registry\thirdpartytools.
  • Delete or rename the file 'thirdpartytools_win64.xml' (say,xyz.xml ) in the above folder.
  • Now open MATLAB and run the command 'targetupdater'. A targetupdate window will appear.
  • Update the required support package using the targetupdater window.
Please refer to the below documentation link for more information on code coverage for models in SIL/PIL mode:
  2 Kommentare
Somdut Dey
Somdut Dey am 5 Jan. 2021
  1. I followed your steps . I am still facing the same issue.
  2. When I run targetupdater matlab is unable to find the command. So updated support package manually from get Add -On
  3. After recreating .xml when I compare with old file it is same as before.
  4. I dont see link for 280049C( I am using this for PiL testing) in the xml file
  5. I followed SiL/PiL setting mentioned in the help doc.
Please see if there is any issue. I have attached xm file.
Thank you for your reply
Somdut Dey
Somdut Dey am 5 Jan. 2021
edited question: The problem happens when code coverage is turned on

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Collect Coverage for Code finden Sie in Help Center und File Exchange

Produkte


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by