[SOLVED] Systemview freeRTOS start recording

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

  • [SOLVED] Systemview freeRTOS start recording

    Hello,
    I have configured my application with freertos (without patch) to use Systemview. I start recording, target is reset after while I stop recording. But there is nothing recorded. I don't get any information about tasks. In my main I call "SEGGER_SYSVIEW_Conf()" Can you help? Attached is what I get.
    rum
    Images
    • sysview.JPG

      151.62 kB, 1,542×911, viewed 1,948 times
  • Brainfuck Source Code

    1. /*File : SEGGER_SYSVIEW_FreeRTOS.h Purpose : Interface between FreeRTOS and SystemView.
    2. Include this file at the end of FreeRTOSConfig.h
    3. --------- END-OF-HEADER ---------------------------------------------*/



    maybe it helps to include SEGGER_SYSVIEW_FreeRTOS.h at the end of FreeRTOSConfig.h
  • Of course file is included. When Systemview attaches, application will crash. I have increased stack for all tasks, now there is plenty of space >200byte as suggested. I have stack overflow monitor in place and I think it is not the stack. I cannot detect reason why application resets. There is no useful info from callstack. I find application sitting at reset vector. I have also applied patch to freeRTOS. What else can I check?
  • Hi,

    Please update to the latest V2.30 sources,
    which fix a bug in the FreeRTOS SystemView interface and could cause an assertion.

    Best regards
    Johannes
    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.
  • Hello,
    Thank you, new version 2.3 is much better and is running now on my XMC device. Great!
    I have another problem. Recording halts after about 5sec with message "Invalid packet received, Recording stopped". Attached is screenshot with last actions recorded. Do you have any suggestions? I am running SWO interface at maximum speed 50MHz and I am using ULTRA+ probe.
    rum
    Images
    • sysview.JPG

      342.83 kB, 1,889×921, viewed 1,139 times
  • Hi,

    Could you provide a SystemView recording which shows the invalid packet?

    Best regards
    Johannes
    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.
  • Problem has been solved via mail. For completeness:
    The invalid packets where caused by a locking problem.
    In the SEGGER_SYSVIEW_LOCK() / SEGGER_RTT_LOCK() all interrupts which could create SystemView events should be disabled (masked).

    For FreeRTOS and Cortex-M3/4 use either following macro or redirect lock and unlock to the FreeRTOS functions.

    C Source Code

    1. #define SEGGER_RTT_LOCK() { \
    2. unsigned int LockState; \
    3. __asm volatile ("mrs %0, basepri \n\t" \
    4. "mov r1, %1 \n\t" \
    5. "msr basepri, r1 \n\t" \
    6. : "=r" (LockState) \
    7. : "i" ( configMAX_SYSCALL_INTERRUPT_PRIORITY) \
    8. : "r1" \
    9. );


    - Johannes
    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.
  • for the lock function,
    what is the complete macro for SEGGER_RTT_LOCK() and SEGGER_RTT_UNLOCK()?
    I got the errors in the attachment.
    Images
    • error.PNG

      44.96 kB, 693×752, viewed 1,143 times

    The post was edited 1 time, last by shenj ().

  • You missed the backspace in the first line:

    C Source Code

    1. #define SEGGER_RTT_LOCK() { \


    Regards
    Johannes
    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.