Hi,
I am currently working with the KV31F120M. I was able to generate, compile and execute small examples, watch them with FreeMaster and verify in SIL-Mode. However I can't get the PIL-Mode working. The Model ist successfully updated but when I try to run the simulation I get this error: "Unable to find message key 'BuildArgMissing' in catalog 'Connectivity:target'".
I tried to run the Simulation in "Processor-in-the-loop (PIL)" mode instead of "Normal" as well and get this error: "Detected recursive call to slbuild, which might indicate invalid simultaneous model builds. If only one model build was in progress, and if you previously used dbquit while in the MATLAB debugger or pressed Ctrl-C during the build process, please restart the model build."
The PIL-config looks like this:
Where COM7 is the OpenSDA-Port.
Any suggestions are highly appreciated.
Best regards
Paul
解決済! 解決策の投稿を見る。
Hi pbgemann001@ikasle.ehu.eus,
That's correct. The COM port is the one corresponding to the OpenSDA in the Windows Device Manager, under Ports (COM & LPT) category. On my PC it is COM11.
The COM port is used for communication between Matlab and board during the PIL simulation. The OpenSDA Drive Name is used for the application download to the board.
You have to set the COM port and OpenSDA Drive Name in both models, PIL_Model.slx and PIL_verification.slx
Hi pbgemann001@ikasle.ehu.eus ,
Which MATLAB version are you using?
Hi paulvlase,
I am using the R2019a Version of MATLAB.
Hi pbgemann001@ikasle.ehu.eus,
Can you install HotFix_2 from Kinetis Hotfixes page and try again?
Hi paulvlase,
Thank you, I installed the HotFix and the error is indeed gone. But instead I now get this one:
"undefined reference to 'main'" in function 'Reset Handler'.
Hi pbgemann001@ikasle.ehu.eus,
Can you attach the generated folder slprj?
Hi pbgemann001@ikasle.ehu.eus,
I somehow forgot to include a file into the patch. Can you download MBDT_Kinetis_cumulative_patch_1.exe , apply it, and try again?
Hi paulvlase,
tried again, got a different error again: "multiple target patterns":
I have attached the slprj-Folder again.
Hi pbgemann001@ikasle.ehu.eus,
I fixed an error with multiple definitions of some rtiostream functions, and updated the cumulative patch 1.
I am able to run your model and the pil example model from toolbox using the IAR compiler. I had to change the compiler from GCC to IAR and the simulation mode from PIL simulation to Normal simulation. When you are running a Model block PIL simulation (using a PIL simulation referenced model) you need to use the Normal simulation mode. You can read more here [1], [2], [3].
I fixed the GCC build error too, but the application crashes on the board. I am looking into that.
Can you run the attach models using the new version of MBDT_Kinetis_cumulative_patch_1.exe and IAR compiler , and attach a text file with the complete output from the Diagnostics View if it fails?
Hi paulvlase,
thanks for the update. I tried to run the attached files as you suggested but it fails. Please find attached the output of the Diagnostics Viewer.
Hi pbgemann001@ikasle.ehu.eus,
Can you attach the slprj folder?
Hi pbgemann001@ikasle.ehu.eus,
I can reproduce your problem on my side.
On my PC Matlab is installed in C:\MATLAB\R2019a and it works fine. But when I move it to C:\Program Files\MATLAB\R2019a I get the same error.
The error is caused by how Matlab generates the makefile to build the application. I am still investigating why it generates some strange rules to build Matlab's C source files.
For now, as a workaround you can move Matlab to C:\MATLAB\R2019a.
Hi paulvlase,
thank you, the errors are gone. I still cannot connect to the target though, but I think it is due to my settings.
Just to clarify: The COM-Port I choose should be the Port that is the OpenSDA on my PC right?
I have attached the Models, the slprj and the Output of the Diagnostics Viewer.
Hi pbgemann001@ikasle.ehu.eus,
That's correct. The COM port is the one corresponding to the OpenSDA in the Windows Device Manager, under Ports (COM & LPT) category. On my PC it is COM11.
The COM port is used for communication between Matlab and board during the PIL simulation. The OpenSDA Drive Name is used for the application download to the board.
You have to set the COM port and OpenSDA Drive Name in both models, PIL_Model.slx and PIL_verification.slx
paulvlase it is finally working now I forgot to update the "Child"-Model.
Thank you very much for your great support!