[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 837 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?
  • 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 613 times
  • 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