How to measure task execution time on F28379D target?

Hi All,
I need some help to measure function execution times. I already tried the example "Real-Time Code Execution Profiling". On my model the configuration and the parameters are the same. Howeover, when I click Deploy To hardware the diagnostic viewer shows this warning:
" Code profiling instrumentation is not supported for standalone builds (Ctrl+B). You can run the executable, but no profiling data will be collected."
As follow :
I do not obtain any profiler report using the relative command on Matlab.
Please, did anyone have this problem and can help me?
Many thanks, Yanis.

 Risposta accettata

Antonin
Antonin il 19 Giu 2018
Bonjour Yanis,
R2016b was the first release to support the F28379D device. We added quite a few features later on. I would strongly suggest that you migrate to the latest release (R2018a) for the best experience with this device. Please contact your local MathWorks representative who will be happy to help you migrate. It's a no cost operation if you are under maintenance, which a lot of people are sometimes without knowing, check with your IT folks.
I hope it helps,
Thanks,
Antonin.

3 Commenti

Antonin, I am using R2018A and the F28379D, and yet my device still won't give me any data. Building/loading/running the model works fine, but the code codertarget.profile.getData('f28377S_RTProfiler') returns the following:
Attempting to get profile data from hardware
* Starting into jsProfilData.js *
* User inputs: Target Configuration: C:\ProgramData\MATLAB\SupportPackages\R2018a\toolbox\target\supportpackages\tic2000/CCS_Config/f28379D.ccxml Program Name: f28377S_RTProfiler.out Board Name: * CPU Name: C28xx_CPU1
* Get debug session...
* Start debug session... * Debug Session Name: Texas Instruments XDS100v2 USB Debug Probe_0/C28xx_CPU1 * Board Name: Texas Instruments XDS100v2 USB Debug Probe_0 * CPU Name: C28xx_CPU1
* Connecting to target... C28xx_CPU1: GEL Output: Memory Map Initialization Complete
C28xx_CPU1: If erase/program (E/P) operation is being done on one core, the other core should not execute from shared-RAM (SR) as they are used for the E/P code. Also, CPU1 will be halted to determine SR ownership for the CPU which will run the Flash Plugin code, after which CPU1 will be set to run its application. User code execution from SR could commence after both flash banks are programmed.
* Loading symbols...
* Starting the profile data collection...
MATLAB_START org.mozilla.javascript.WrappedException: Wrapped java.lang.ArrayIndexOutOfBoundsException: 0 (C:\ProgramData\MATLAB\SupportPackages\R2018a\toolbox\target\supportpackages\tic2000\CCS_Config\jsProfileData.js#111) at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1693) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:160) at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:204) at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:86) at org.mozilla.javascript.gen.c1._c0(C:\ProgramData\MATLAB\SupportPackages\R2018a\toolbox\target\supportpackages\tic2000\CCS_Config\jsProfileData.js:111) at org.mozilla.javascript.gen.c1.call(C:\ProgramData\MATLAB\SupportPackages\R2018a\toolbox\target\supportpackages\tic2000\CCS_Config\jsProfileData.js) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:340) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2758) at org.mozilla.javascript.gen.c1.call(C:\ProgramData\MATLAB\SupportPackages\R2018a\toolbox\target\supportpackages\tic2000\CCS_Config\jsProfileData.js) at org.mozilla.javascript.gen.c1.exec(C:\ProgramData\MATLAB\SupportPackages\R2018a\toolbox\target\supportpackages\tic2000\CCS_Config\jsProfileData.js) at org.mozilla.javascript.tools.shell.Main.evaluateScript(Main.java:503) at org.mozilla.javascript.tools.shell.Main.processFileSecure(Main.java:425) at org.mozilla.javascript.tools.shell.Main.processFile(Main.java:391) at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:382) at org.mozilla.javascript.tools.shell.Main.processFiles(Main.java:179) at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:100) at org.mozilla.javascript.Context.call(Context.java:528) at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:450) at org.mozilla.javascript.tools.shell.Main.exec(Main.java:162) at com.ti.ccstudio.apps.internal.scripting.RunScript$1.run(RunScript.java:89) Caused by: java.lang.ArrayIndexOutOfBoundsException: 0 at com.ti.debug.engine.scripting.APIContainer.loggableArray(APIContainer.java:204) at com.ti.debug.engine.scripting.Memory.readData(Memory.java:1828) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:145) ... 18 more
Error using codertarget.tic2000.internal.getProfileData (line 74) Attempt Failed. No profile data received! Please try re-doing the process
Error in codertarget.profile.getData
Please use f28377D.ccxml rather than f28379D.ccxml to get the profiling information.
Hi Venkatesh,
I was having same problem as Cody Dillinger. Your answer solved my problem.
However the example given in f28377S_RTProfiler.slx uses system outputs block from simulink coder. Inside the system output block, a for loop is implemented and the RTProfiler can calculate the time taken by the for loop. What about any generic code implemented by simulink blocks only? I tried to check the execution time for this kind of example, but it didn't work for C2000.
I use dSPACE and they also use system outputs block to calculate the execution time of a subsystem. By using the following code in system Outputs
Subsystem Outputs Function Declaration Code
/* Start time measurement.*/
RTLIB_TIC_START();
Subsystem Outputs Function Exit Code
/* Read the elapsed time period. */
subsystem_exec_time = RTLIB_TIC_READ();
I am wondering is there any functionalities like tic toc used by dSPACE available for C2000 code generation or not?
Thanks.

Accedi per commentare.

Più risposte (2)

Please mention the MATLAB version and attach the Model file if possible.

1 Commento

It's the Matlab 2016b.
I only want to measure ADC conversion time on Ti c2000 delfino F28379D.

Accedi per commentare.

This feature is not supported in MATLAB 2016b. Please consider upgrade to 2017a or later where this feature is introduced.

Community Treasure Hunt

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

Start Hunting!

Translated by