[SOLVED] Automation of stack trace and RTOS info capture/dump?

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Automation of stack trace and RTOS info capture/dump?

    Is there any existing tool that could be applied to a hardware-in-the-loop QA system to capture information like the stack trace heading into the hardfault? And ideally, the equivalent of the the full output of the FreeRTOS view from Ozone. Beyond that, maybe even the stack unwinding for each of the tasks, too.

    The application here is that we have a QA agent doing very labor intensive testing, and in the case of hardfaults, it would be great to grab all that information at the time of failure, where presently we only have the serial terminal log.

    At a glance, it looks like SystemView might cover some of this need, by the ability to continuously log data.
    But will it also give emit and log the call stack trace (if possible) at the moment of the hardfault? And the state of all the other tasks?

    The ideal format for this tool would be a daemon that runs in the background, uses an existing JLink connection, and would capture and dump that information to a file based on certain conditions, maybe a specific number breakpoint or by checking a fault is active at the time of hitting a breakpoint.

    I am looking into what can be mechanized via gdb ... but I almost never use command line GDB, since Ozone works well for my normally debugging.

    It also occurs to me that it might be possible to do this via Ozone by writing a plugin that uses the Javascript engine, too?
  • Hi,
    Thank you for your inquiry.
    This could be achieved in multiple ways.
    1) You could use a J-Link for ETB tracing or a J-Trace for ETM tracing, if the target supports such a feature. This way you could set a breakpoint on the hardfault handler and when it hits, analyze the desired data in Ozone.
    2) You could use Ozone with SystemView in parallel. You could (as in 1)) set a break point on the hardfault handler, and analyze the data in Ozone and SystemView.

    Solution 2) is available for all Cortex-M devices.

    For general information about trace, please refer to the following page:
    wiki.segger.com/General_information_about_tracing

    For further information about fault analysis with Ozone, please refer to this page:
    segger.com/products/developmen…echnology/fault-analysis/

    Do you have any further questions?

    Best regards,
    Fabian
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.