I've created a project based on FreeRTOS, and try to enable the "Collect Runtime Statistics", but 2 errors message occurs:
Description | Resource | Path | Location | Type |
ERROR: This component is not supported in Kinetis SDK project mode | CB_Test | RTOSCNTRLDD1 | Processor Expert Problem | |
Error in the inherited component settings (Runtime Counter LDD) | CB_Test | FreeRTOS1/Runtime Counter LDD | Processor 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
解決済! 解決策の投稿を見る。
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
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:
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
Thanks Erich, I'll try it soon. And by the way, will this be supported in next revision of FreeRTOS component?
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
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
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
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.
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
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...
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
Hello,
yes, unfortunately all LDD components are not supported any more in the Kinetis SDK mode.
Erich