NXP has released their Kernel Awareness for FreeRTOS in Eclipse (Kinetis Design Studio):
The plugin was showcased at FTF 2016 in Austin (see “NXP FTF Hands-On with FreeRTOS Task Aware Debugger“), now it is available on NXP web site.
The preferred way to install the plugin is with an Eclipse upate. Use the menu Help > Install New Software and point to the following update site:
Then go through the installation process. Restart Eclipse at the end of the installation.
The plugin can be downloaded from www.nxp.com/kds and then installed into Eclipse too:
The plugin adds a ‘FreeRTOS’ menu under the debug perspective:
Otherwise the FreeRTOS views are available under Window > Show View:
The Heap Usage view shows the heap scheme selected with all the memory blocks:
The Timer List view shows all the software timers in the system:
The Task List is probably the one which I’m using the most: it shows all the tasks with the stack usage:
In Queue List I have all the queues, semaphore and mutex listed with their data:
After FTF, the plugin is now available for download. I have it working in KDS V3.2.0 and it works with my latest FreeRTOS V9.0.0. It already helped me to find a problem in my application which I need to fix now :-).
Happy Kerneling 🙂
Easier, you can find the different view directly under the “FreeRTOS” menu, in the main menu, between “Processor Expert” and “Window”.
I missed to describe that one. I have added it now, thanks!
I am using FreeRTOS 8.x version. In the Task list view, some tasks are shown as suspended, even though these tasks are in blocked state (waiting for Notification). I was expecting all the tasks except running task to be marked as blocked (as in your screenshot). Is it because of FreeRTOS version?
I have moved to FreeRTOS 9.0.0, and have not tried it with 8.x. But indeed it could be because of the RTOS version difference. I noticed that other viewers like the Wittenstein one (https://mcuoneclipse.com/2013/08/04/diy-free-toolchain-for-kinetis-part-5-freertos-eclipse-kernel-awareness-with-gdb/) does not work well any more with v9.0.0.
Have you tested the plugin into an Eclipse MARS1 IDE?
I have installed it and it works fine, however when I try to open the Heap screen gives me an error:
13:43:52.606 EXCEPTION: [HeapFactory] ReadingException in class “com.nxp.freertos.gdb.tad.controller.heapusage.HeapFactory” at 179. line when calling method “readLongVariable(xNextFreeByte)”
Don’t know if it may be related to the problem, but Iam using a Jlink v5.12g
I’ve been using also a lot of queues on my implementation however nothing appears on the Queue screen. And I can only see a single thread on the debug view….
I think I have missed some sort of configuration….
I have only used it so far with Luna. There is definitely not a configuration problem as there is nothing to configure.
Could you check the log files inside the FreeRTOS_TAD_logs (inside the workspace) folder?
What version of FreeRTOS are you using?
In any case, it might be worthwile to post your stack dump and the log files in the NXP Kinetis Design Studio forum so they can have a look.
I am using FreeRTOS version 8.2.3.
Looking at the log, the message is the same. There is a INFO before informing that I’m using Heap Type 1….
11:14:30.371 INFO: [HeapFactory] Application is using Heap type “1” (defined by configFRTOS_MEMORY_SCHEME in FreeRTOSConfig.h).
I will start a thread on the NXP forum….
Did you managed to get it working? I’m having the same issue!
Yes, I have it working. But with your old FreerRTOS version 8.2.3 it might be missing something in the kernel. I suggest you upgrade to the lastest and greatest version (10.0.1).
This looks great, a big improvement on the OpenOCD task aware features. After installing, I’m having an issue where the plug-in views say something like “Plug-in com.nxp.freertos.gdb.tad was unable to load class com.nxp.freertos.gdb.tad.view.views.queuelist.QueueListView.” NXP discussion here: https://community.nxp.com/message/809333
do the other views work (so it is only a problem for the queues)?
From the screenshots it looks your are using Mac? I have it working on Windows (I don’t have a Mac 😦 )
Same issue on all the views. Yeah, I’m on Mac, that’s probably it
Is this plug-in open source?
I’d like to extend it to support CMSIS++ objects and include it in GNU ARM Eclipse.
I have been told that this is the intent, but I have not seen a git repository for it yet.
please let me know when you have more details.
Oh man, I owe you another beer! Next time your in Austin please collect!
I add that to my list of things for next time in Austin 🙂
I have installed the TAD plugin, installation was ‘uneventful’. I believe I have the freshiest version of all modules (KDS 3.2.0, FreeRTOS port 1.502 dated 25/6/2016). Because of my MCU (MK10FN1M0VLQ12) I can not use KSDK as no version supports my chip.
I can open the Task/View/Timer/Heap windows from the menu, but as soon as the program tries to fetch data it crashes.
Could it be because of the missing KSDK support? Is KSDK somehow required for this operation?
The GDB log says:
“FreeRTOS Task Aware Debugger for GDB” version 1.0.0 (201606200848)
(c) 2016 NXP Semiconductors, Inc.
13:20:49.292 INFO: [TadModel] DSF session ID 9 has started.
13:21:00.181 INFO: [TadState] TAD state changed: DEBUG_STARTED -> DEBUG_INIT_0 (SUSPENDED, USER_REQUEST)
13:21:03.490 INFO: [TadState] TAD state changed: DEBUG_INIT_0 -> DEBUG_INIT_1 (RESUMED, USER_REQUEST)
13:21:03.554 INFO: [TadState] TAD state changed: DEBUG_INIT_1 -> DEBUG_SUSPENDED (SUSPENDED, BREAKPOINT)
13:21:52.801 INFO: [TadState] TAD state changed: DEBUG_SUSPENDED -> DEBUG_RESUMED (RESUMED, STEP)
13:21:52.987 INFO: [TadState] TAD state changed: DEBUG_RESUMED -> READY (SUSPENDED, STEP)
13:24:30.358 INFO: [Benchmark] Loading data for “Task List” has started.
13:24:31.222 EXCEPTION: [TadModel] NullPointerException while “Task List” data load.
13:24:32.70 INFO: [TadModel] DSF session ID 9 has ended.
no, there is no dependency on the SDK. I’m using the plugin with KSDK, Processor Expert and ‘bare’ projects and have not seen this. Could you report/post this in the NXP community so the NXP engineers could have a look there? It would be good if you could post as much information there as possible (project, including the GDB trace log, see https://mcuoneclipse.com/2016/07/01/board-bring-up-tips-gdb-logs-and-traces-in-eclipse/).
I think I found out what was my problem with TAD. In your PEx component FreeRTOS I have checked in the Component Inspector the checkbox ‘Percepio Trace’ in the Percepio Trace tab. Which turned out to be wrong. After unchecking the box I have reinstalled the TAD plug-in according to this post and it is running.
that is strange, and I don’t understand it. I do have Percepio turned on for many projects, and I have not seen such an issue?
again, I see no Reply button to react to your post. So I am opening a new one.
When I tried to use NXP TAD with the Percepio Tracelyzer for FreeRTOS option selected at the same time the TAD showed the aboved mentioned null pointer error. I thought this might be wrong (having both options at the same time) so I unchecked the Percepio Tracelyzer support and reinstalled the NXP TAD and now it works.
I am not saying that Percepio Tracelyzer does not work, I just described a method that worked in my case when the additionally installed NXP TAD seemed to be not working for me.
Are you saying that both systems (NXP TAD and Percepio Tracelyzer for FreeRTOS can be turned on at the same time?
yes, the Precepio Trace works for me in combination with the NXP TAD without any issues.
Is this supposed to be supported on Linux?
After installing on Linux and doing Window > show view > other…> FreeRTOS > Heap Usage” a new Heap Usage view is opened but it is broken with a message:
“Plug-in com.nxp.freertos.gdb.tad was unable to load class com.nxp.freertos.gdb.tad.view.views.heapusage.HeapUsageView.”
LikeLiked by 1 person
I have not tried it under Linux, but I don’t see any reason why it should not work. Are you using my port of FreeRTOS (version 9.0.0)? Beceause as outlined in https://mcuoneclipse.com/2016/06/13/adding-freertos-thread-awareness-to-gdb-and-eclipse/ there are certain symbols needed. Additionally I have updated the FreeRTOS port on the McuOnEclipse GitHub site to provide better heap detection (see https://github.com/ErichStyger/McuOnEclipse_PEx/commit/69d4334006b9560ec2c2cdde81d6137aea4d59a5 which is part of the latest relesase (https://mcuoneclipse.com/2016/07/31/mcuoneclipse-components-31-july-2016-release/)).
it seems it is the same issue as reported here: https://community.nxp.com/thread/429765
LikeLiked by 1 person
Hi Erich, thanks for the link. Any idea when NXP might provide a fix? cheers john
I have no idea. But does it work for you on Windows? I believe it is not a Linux issue.
And as for the issue I have seen: I have fixed it with a change in FreeRTOS V9.0.0. So it will take a while until that fix (or better solution will end up in a new FreeRTOS release). I think the main problem is that you are using the RTOS of the KSDK?
Yes it works fine on windows.
On Linux I installed the NXP ‘FreeRTOS Task Aware Debugger for GDB’ plugin, using their archive installer “Eclipse add-on to add FreeRTOS Plug ins.zip” in a fresh install of eclipse and clean workspace attempted to open the view; no projects or other features installed.
This suggests to me that the plugin is not loading on Linux.
Pingback: McuOnEclipse Components: 30-Oct-2016 Release | MCU on Eclipse
Hi Eric – Thanks as always for your great stuff. The task viewer is crashing under latest updates from NXP. Details here: https://community.nxp.com/message/853129
Thanks, Best Regards, Dave
I have not seen that one, but it could be because I have seen the FreeRTOS in SDK not using the latest version. At least I have not seen it in my port of FreeRTOS. The other thing from the log: would it make a difference if you turn on configUSE_TRACE_FACILITY?
My project is using FreeRTOS v9.0
In FreeRTOSconfig.h (attached to bug report at NXP):
#define configUSE_TRACE_FACILITY 1
Best Regards, Dave
ok, I see now that you have it defined in your FreeRTOSConfig.h. I asked that question because your log indicates that the plugin does not recognize it:
“11:30:20.365 INFO: [FreeRTOS] FreeRTOS macro “configUSE_TRACE_FACILITY” is disabled.”
I still think it could be because of the NXP specific port of FreeRTOS, as the plugin might be very sensitive about changes e.g. affecting the list of active tasks.
The other thought I have: I see that you are using OpenOCD? Have you tried it with a different debug protocol (P&E or Segger) already? I have seen all kind of bad things happening with using OpenOCD :-(.
Other than that: I forwarded the community thread to the engineer I was in touch when I have received that FreeRTOS plugin. I hope he can respond in the community thread to you very soon.
Thanks Erich – I will try again with Segger (a Segger JLink is in the mail to me already, will be a few days). I hope NXP will help; so far NXP support has been very slow and generally poor ;-(
I’m experiencing some issues with the TAD plugin. On the “HEAP Usage” window it seems that it is detecting correctly the heap implementation type as 4, which is the one I’m using, nevertheless, the 4 has a little “information icon” on its side and when I hover over it, it says;
“TAD will try to determine heap type (memory scheme) from available variables. Please add “static const uint8_t freeRTOSMemoryScheme = ;” (or use macro configFRTOS_MEMORY_SCHEME, if defined) variable into your project for TAD to know which heap type is used.”
If I define the “freeRTOSMemoryScheme” variable then the window does not show anything, the “HEAP Usage” window just stops working. And if I add the “configFRTOS_MEMORY_SCHEME 4” then nothing happens, the information icon does not go away.
Also, in the “Task List” window, I see little yellow warning icons on every element on the columns “Stack Usage” and “Runtime”. The Stack Usage column shows the usage for every task on green and it seems to be working correctly, so, if it’s working correctly, why the warning icons?
On the other hand, the runtime column does not show anything at all.
So my question is, how do I fix this warnings?
lots of questions and good points. Are you using the McuOnEclipse FreeRTOS port? Most of the things are setup there automatically?
I think I should write a short article about your points as the comments section here might not be enough?
No, I’m using the official FreeRTOS code from the FreeRTOS site, but now that you mention it I will take a look at your version to see the differences. Reading somewhere I found out that I should enable the “configGENERATE_RUN_TIME_STATS” and by doing so I had to implement the “portCONFIGURE_TIMER_FOR_RUN_TIME_STATS()” and “portGET_RUN_TIME_COUNTER_VALUE()” macros. I did that already and the timer is indeed running @ 100us and both functions are being called, nevertheless, I don’t see any change.
Thanks for the suggestion about your FreeRTOS version, I’ll take a look at it!
And by the way, I’d be great if you wrote an article about how to make the TAD work on FreeRTOS from scratch.
to close the loop: I wrote an article at https://mcuoneclipse.com/2017/03/18/better-freertos-debugging-in-eclipse/ which hopefully is useful for you.
the v1.0.1 plugin has an issue with using freeRTOSMemoryscheme (see https://mcuoneclipse.com/2017/03/18/better-freertos-debugging-in-eclipse/).
I had to define freeRTOSMemoryScheme =4 and int uxTopUsedPriority = configMAX_PRIORITIES – 1 for FreeRTOS 10 in STM32CubeIDE v1.3.0. It works Great! Had to set it to 4 since the #define is gone – they use USE_FreeRTOS_HEAP_4 now.,
Also, needed to follow this closely:
Yes, that setting for FreeRTOS memory scheme is not conistently used by the Si vendors, and afaik the official FreeRTOS still does not have one (even if it would be very useful).
As for OpenOCD and FreeRTOS: https://mcuoneclipse.com/2016/04/09/freertos-thread-debugging-with-eclipse-and-openocd/
Pingback: Better FreeRTOS Debugging in Eclipse | MCU on Eclipse
Thanks Erich for the plugin tip
I added it to my eclipse ( Mars.2 Release (4.5.2) ) which is a custom version from ST (named System workbench for STM32 – sw4stm32) and so far is running nicely, the only downside is that I am still running in FreeRTOS 8.2.3 (the version supllied with ST’s code generation tool) and therefore thread stack meter doesn’t work
Pingback: MCUXPresso IDE: Unified Eclipse IDE for NXPs ARM Cortex-M Microcontrollers | MCU on Eclipse
Pingback: Breathing with Oxygen: DIY ARM Cortex-M C/C++ IDE and Toolchain with Eclipse Oxygen | MCU on Eclipse
Pingback: New FreeRTOS V10.0.0: Amazon, Segger SystemView and Percepio Tracealyzer | MCU on Eclipse
Pingback: Understanding FreeRTOS Task Stack Usage and Kernel Awarness Information | MCU on Eclipse
Pingback: New NXP MCUXpresseo IDE V10.3.0 Release | MCU on Eclipse
Pingback: Running FreeRTOS on the VEGA RISC-V Board | MCU on Eclipse