Post Go back to editing

About using CCES profiling function when FreeRTOS is running on 21569

I first casually used an ADI routine without FreeRTOS. The following options are checked: Project -> Properties -> C/C++ Build -> Settings -> CrossCore SHARC C/C++ Compiler -> Processor -> Enable complier instrumented profiling (-p). Processor Speed (MHz) (-D PROCESSOR_SPEED__) :1000

In system.svc, I gave enough heap space, a total of 24kBytes.

 

Therefore, the program can be executed normally, and the percentage occupied by each function can be evaluated.

But in the actual project, the program is based on FreeRTOS, can I use profiling while running FreeRTOS?

So I downloaded adi ported version of FreeRTOS and the demo program according to the guidance of " adi_freertos_user_guide.pdf ".

The program executes normally.  Now I do the same thing and start to modify the project properties. Enable complier instrumented profiling (-p). Processor Speed (MHz) (-D PROCESSOR_SPEED__) :1000. 

So the linker will link in "libcmt.dlb" when generating the executable file. At this time an error occurred, "adi_osal_ThreadEnableCycleCounting." "adi_osal_ThreadGetCycleCount." These two symbols are not resolved. 

So I searched "\SHARC\lib\src" in the CCES installation directory to find which file in the library source file defines these two symbols.

Finally I found these two function definitions under "\SHARC\lib\src\osal_noos\Source\adi_osal_noos_prof.c ". So I added this file to the project. 

Obviously it does not work properly. From the perspective of file naming, this is written by the ADI operating system abstraction layer for environments without operating systems.

Does ADI have a file similar to adi_osal_freertos_prof.c?

  • Hi hxz,

    We don't currently support the instrumented profiling in FreeRTOS, though we will make this clearer than a link error in a future release.

    However, the statistical and linear profiling is supported. You can access both from Window > Show View > Profiling, and the type of profiling it uses will depend on whether you are connected to a simulator (linear) or emulator (statistical).


    Regards,

    Murray

  • Hi Murray,

    Thanks for the reply, this "processor option" has nothing to do with "Window> Show View> Profiling"? I always thought that the profiling window can be used because I opened "Project -> Properties -> C/C++ Build -> Settings -> CrossCore SHARC C/C++ Compiler -> Processor -> Enable complier instrumented profiling (-p)." It makes me feel a little confused.

    Regards,

    hxz