[SOLVED] SystemView hanging (blocked call) when recording events outside of RTOS tasks.

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

  • [SOLVED] SystemView hanging (blocked call) when recording events outside of RTOS tasks.

    Hi,

    Looking for some help here, I'm probably missing something very obvious ?( .

    I'm working with an STM F7 with RTOS 10.2.1

    I've patched the RTOS files and added the required Segger source files to the project and so far the RTOS hooks are working fine,
    I can see all the tasks running in real-time. I can add instrumentation calls in any of the tasks and the information is logged
    as expected.

    The problem starts as soon as I instrument anything which isn't within an RTOS task context, for example, an ISR.

    Adding the calls to record the entry and exit of the ISR compile cleanly and the application runs correctly with them in place.

    If, however, I start SystemView running it shows an initial four events and then halts after logging the first systick (#15).

    Debugging shows that execution is blocked in a function _SendPacket() within the SystemView ecosystem. It looks to be waiting
    on something which never seems to either respond or timeout.

    In case it is relevant:

    1) The timebase for HAL is using TIM7 not systick.
    2) The ISR is for another timer and will only be called after the RTOS scheduler has started. It doesn't use RTOS in the
    ISR but it is started by a HAL call in the main application task.
    3) I'm using J-Link onboard (STM Nucleo), I do have a J-Link probe I can try however this is unlikely hardware related.
    4) I am running on Debian Linux.

    I would normally spend more time debugging this but I'm up against the usual deadlines and expect I've just missed something here in setup/configuration of the tools. Any help would be really appreciated. At the moment I've fallen back on some spare GPIO pins and monitoring them with a scope to time entry/exits.

    Jason.

    The post was edited 2 times, last by Jason Wilden ().

  • Hello Jason,

    Thank you for your inquiry.
    From the problem description it sounds like the instrumentation in FreeRTOS is not correct/complete.
    Please note that the patch file provided with SystemView is only compatible to FreeRTOS V10.0.0.
    All versions after that require additional changes as Amazon/FreeRTOS chose not to stay backwards compatible to the V10 major release. Even V10.0.1 already needed additional instrumentation.

    You can find some of the "fixed" FreeRTOS files in this community forum for some of the V10 versions if you use the forum search.

    Long term we will try to provide as many patch files for most major FreeRTOS releases as well, but as this is quite the effort especially for QA and test setups we do not have a fixed schedule for this yet.

    As an alternative, more reliable RTOS we recommend embOS which also comes with the SystemView intstrumentation out of the box and comes with plenty of STM based examples for different boards to get started quickly:
    segger.com/products/rtos/embos/

    Best regards,
    Nino
    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.