FreeRTOS Kernel Awareness for Eclipse from NXP

NXP has released their Kernel Awareness for FreeRTOS in Eclipse (Kinetis Design Studio):

FreeRTOS Kernel Awareness in Kinetis Design Studio

FreeRTOS Kernel Awareness in 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.

Installation

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:

http://freescale.com/lgfiles/updates/Eclipse/KDS
Installing FreeRTOS Plugin

Installing FreeRTOS Plugin

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:

KDS Product Download

KDS Product Download

Views

The plugin adds a ‘FreeRTOS’ menu under the debug perspective:

FreeRTOS Menu

FreeRTOS Menu

Otherwise the FreeRTOS views are available under Window > Show View:

FreeRTOS View

FreeRTOS View

The Heap Usage view shows the heap scheme selected with all the memory blocks:

FreeRTOS Heap Usage

FreeRTOS Heap Usage

The Timer List view shows all the software timers in the system:

FreeRTOS Timer List

FreeRTOS Timer List

The Task List is probably the one which I’m using the most: it shows all the tasks with the stack usage:

FreeRTOS Task List

FreeRTOS Task List

In Queue List I have all the queues, semaphore and mutex listed with their data:

FreeRTOS Queue List

FreeRTOS Queue List

Summary

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 🙂

Advertisements

43 thoughts on “FreeRTOS Kernel Awareness for Eclipse from NXP

  1. Hi Erich,
    Easier, you can find the different view directly under the “FreeRTOS” menu, in the main menu, between “Processor Expert” and “Window”.
    Yvan

    Like

  2. Hi Erich,
    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?
    Visakhan

    Like

  3. Hello Erich,

    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)”
    com.nxp.freertos.gdb.tad.controller.TadFactory.readLongVariable(TadFactory.java:251)
    com.nxp.freertos.gdb.tad.controller.heapusage.HeapFactory.getData(HeapFactory.java:179)
    com.nxp.freertos.gdb.tad.model.TadModel$3.execute(TadModel.java:256)
    com.nxp.freertos.gdb.tad.model.TadModel$4.run(TadModel.java:356)

    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….

    Thx,
    Thiago

    Like

    • Hi Thiago,
      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.
      Erich

      Like

      • 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….

        Thanks

        Like

  4. 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

    Like

  5. Is this plug-in open source?

    I’d like to extend it to support CMSIS++ objects and include it in GNU ARM Eclipse.

    Like

  6. Hi,
    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?

    Ludek

    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.
    com.nxp.freertos.gdb.tad.model.readers.MemoryReader.readMemoryUntilZero(MemoryReader.java:150)
    com.nxp.freertos.gdb.tad.controller.TadFactory.readMemoryUntilZero(TadFactory.java:351)
    com.nxp.freertos.gdb.tad.controller.TadFactory.readTextAtAddress(TadFactory.java:189)
    com.nxp.freertos.gdb.tad.controller.TadFactory.readTaskName(TadFactory.java:303)
    com.nxp.freertos.gdb.tad.controller.queuelist.QueueFactory.getQueue(QueueFactory.java:193)
    com.nxp.freertos.gdb.tad.controller.queuelist.QueueFactory.getData(QueueFactory.java:109)
    com.nxp.freertos.gdb.tad.model.TadModel$3.execute(TadModel.java:237)
    com.nxp.freertos.gdb.tad.model.TadModel$4.run(TadModel.java:356)
    13:24:32.70 INFO: [TadModel] DSF session ID 9 has ended.

    Like

    • Hi Ludek,
      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/).

      Like

      • Hi Erich,
        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.

        Ludek

        Like

      • Hi Ludek,
        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?
        Erich

        Like

  7. Hi Erich,
    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?

    Ludek

    Like

  8. 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.”

    Liked by 1 person

  9. Pingback: McuOnEclipse Components: 30-Oct-2016 Release | MCU on Eclipse

    • 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?

      Like

      • My project is using FreeRTOS v9.0
        In FreeRTOSconfig.h (attached to bug report at NXP):
        #define configUSE_TRACE_FACILITY 1
        Other ideas?
        Thanks!
        Best Regards, Dave

        Like

      • Hi 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.

        Like

  10. 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 ;-(

    Like

  11. Hello Erich
    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?

    Like

  12. Pingback: Better FreeRTOS Debugging in Eclipse | MCU on Eclipse

  13. 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

    Like

  14. Pingback: MCUXPresso IDE: Unified Eclipse IDE for NXPs ARM Cortex-M Microcontrollers | MCU on Eclipse

  15. Pingback: Breathing with Oxygen: DIY ARM Cortex-M C/C++ IDE and Toolchain with Eclipse Oxygen | MCU on Eclipse

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s