In KDS, FreeRTOS "Collect Runtime Statistics" not functional when using KSDK and PE.

cancel
Showing results for 
Search instead for 
Did you mean: 

In KDS, FreeRTOS "Collect Runtime Statistics" not functional when using KSDK and PE.

Jump to solution
720 Views
walter_wang
Contributor III

I've created a project based on FreeRTOS, and try to enable the "Collect Runtime Statistics", but 2 errors message occurs:

DescriptionResourcePathLocationType
ERROR: This component is not supported in Kinetis SDK project modeCB_TestRTOSCNTRLDD1Processor Expert Problem
Error in the inherited component settings (Runtime Counter LDD)CB_TestFreeRTOS1/Runtime Counter LDDProcessor Expert Problem

 

Looks the Runtime Counter LDD cannot be supported by KDSK and PE?

Does this mean I cannot enable the FreeRTOS collect runtime statistics functionality when I'm using both KSDK and PE? Any workaround?

(I attached my demo project)

 

Thanks.

Original Attachment has been moved to: CB_Test.zip

Labels (1)
Tags (2)
0 Kudos
1 Solution
136 Views
BlackNight
NXP Employee
NXP Employee

Yes, it is still possible with the component to use an inherited timer (so user can choose this). It is just that with the Kinetis SDK all the existing LDD/basic components are not working any more.

But if you select to use  a non-SDK project, you have the most flexibility: LDD timer, non-LDD timer or RTOS Tick counter.

If your RTOS tick counter is fast enough (say 1 kHz), then I think the accuracy is good enough.

If you have a 100 ms period, well, then things are probably not that good any more

Erich

View solution in original post

0 Kudos
10 Replies
136 Views
BlackNight
NXP Employee
NXP Employee

Hi Walter,

attached you find an *experimental* FreeRTOS component which uses the tick timer instead of a dedicated timer for the runtime counter.

If you have the option 'Use Tick Counter' enabled, it uses the tick counter as time base:

pastedImage_0.png

Of course this is less accurate than using a 10x higher frequency timer than the tick counter, but allows you to use it with the SDK.

I hope this helps,

Erich

136 Views
walter_wang
Contributor III

Thanks Erich, I'll try it soon. And by the way, will this be supported in next revision of FreeRTOS component?

0 Kudos
136 Views
BlackNight
NXP Employee
NXP Employee

Hi Walter,

yes, of course this will be supported in the next revision :-)

I appreciate if you could try it out and provide feedback. It worked fine on my side so far, but I have it tested only with one target so far.

Erich

0 Kudos
136 Views
walter_wang
Contributor III

Hi Erich,

I've tried the "Collect Runtime Statistics" with the new FreeRTOS component and it works properly.

I will try more times later and let you know if any new finding.

Thanks.

Walter

0 Kudos
136 Views
BlackNight
NXP Employee
NXP Employee

Hi Walter,

thanks for trying it out and for the feedback. I saw that there are two warnings with the latest v1.2 SDK (duplicate defines, as the SDK now defines them too). I will look into it and see if I can find a fix for it. But it should not affect functionality.

Erich

0 Kudos
136 Views
walter_wang
Contributor III

Yeah, I also noticed that, and ignored them. So far the Runtime Statistics work well for some hours in a simple config: two tasks blinking led and 1 task run statistics and printf to UART.

0 Kudos
136 Views
BlackNight
NXP Employee
NXP Employee

I have an experimental version which uses a finer time base (using directly the SysTick counter value). But as the register is only 24bit, and decrementing fast, the user would have to provide a scaling factor. So not as easy to use than just the tick counter, but would give better resolution. Do you think it is worth the effort?

Erich

0 Kudos
136 Views
walter_wang
Contributor III

Is it possible to use inherited counter/timers or let user choose one? In theory, if using system ticks as time base counter for runtime statistics, this really a little bit less accuracy, because FreeRTOS is using the incremental counter to record each tasks' occupation...

But I think this is not an urgent problem, can be dealed with later...

0 Kudos
137 Views
BlackNight
NXP Employee
NXP Employee

Yes, it is still possible with the component to use an inherited timer (so user can choose this). It is just that with the Kinetis SDK all the existing LDD/basic components are not working any more.

But if you select to use  a non-SDK project, you have the most flexibility: LDD timer, non-LDD timer or RTOS Tick counter.

If your RTOS tick counter is fast enough (say 1 kHz), then I think the accuracy is good enough.

If you have a 100 ms period, well, then things are probably not that good any more

Erich

View solution in original post

0 Kudos
136 Views
BlackNight
NXP Employee
NXP Employee

Hello,

yes, unfortunately all LDD components are not supported any more in the Kinetis SDK mode.

Erich

0 Kudos