Help with SystemView

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

  • Help with SystemView

    I'm trying to get SystemView working. Hopefully it's something simple.

    My setup:
    - Atmel SAM-ICE
    - Atmel ATSAME70Q21
    - Atmel Studio 7.0
    - FreeRTOS 8.2.3
    - SystemView v2.42

    We're currently able to build and flash from inside Atmel studio. We're also able to debug, both with Atmel Studio and with Ozone. So the hardware all seems to be working.

    I copied over the proper source files into the Atmel project, although I did put them all into a common SEGGER/ folder as I was having linker issues with finding the proper references. It builds fine now. I did have to add a reference to sysclk.h because our FreeRTOSConfig.h file requires it. I've also added the following to our main() cpp file:

    Source Code

    1. int main(void)
    2. {
    3. // start SEGGER sysview handler
    4. SEGGER_SYSVIEW_Conf();
    5. SEGGER_SYSVIEW_Start();
    6. // creating various tasks
    7. vTaskStartScheduler(); // freeRTOS task scheduler
    8. }


    Here's the file list:

    Source Code

    1. Userr@PC MINGW64 ~/project/src/SEGGER
    2. $ ls
    3. Global.h SEGGER_SYSVIEW.h
    4. os_trace_events.h SEGGER_SYSVIEW_Conf.h
    5. SEGGER.h SEGGER_SYSVIEW_ConfDefaults.h
    6. SEGGER_RTT.c SEGGER_SYSVIEW_Config_FreeRTOS.c
    7. SEGGER_RTT.h SEGGER_SYSVIEW_FreeRTOS.c
    8. SEGGER_RTT_Conf.h SEGGER_SYSVIEW_FreeRTOS.h
    9. SEGGER_SYSVIEW.c SEGGER_SYSVIEW_Int.h


    Here are my symptoms:
    - If I straight up try to run SystemView, I get an error. I'm choosing my Target Device (correctly identified), USB, SWD / 4000kHz (matching the Atmel Studio settings), and RTT Auto Detection. I get the same error with 'Start Recording' and with 'Read Recorded Data'. Interestingly, if I try a build that does NOT have the Segger files, I get "RTT Control Block not found", which is good because it's different than the error with Segger files. If I try it with my build that includes Segger files, one of two things happens. Either I get an error "Cannot send command to target. Possible reasons: -Connection to target lost. - Host debug session stopped. - Target application halted." I also get this same error every time I select "Stop Recording". Or I get the first 5 or 6 events like Start, SystemInfo, System Description (which looks correct, including the name in the config), Target time, Registered Modules 0. But then nothing else.
    - If I turn on Post Mortem mode, I can usually consistently get those first 5 or 6 errors, but that's it.

    Choosing "Read Recorded Data" gives me the following:
    - Normal mode, informational prompt with "0 bytes recording data read from target system" (no error)
    - Post Mortem mode, we can sometimes get a download of those first few events (106 bytes), but sometimes not.

    I've tried increasing the RTT_BUFFER_SIZE but it makes no difference. The Sam-ICE has the latest firmware according to the Segger tools. It would make a world of difference if we could get this to work, as we have a long-running crash that seems to maybe be related to interrupt or task priorities. This would be immensely helpful if we could get the SystemView to work.

    Thank you!

    I've submitted a screenshot of the events we get as an example.
    Images
    • Capture.PNG

      103.3 kB, 1,909×1,051, viewed 1,370 times
    • Capture2.PNG

      10.22 kB, 366×175, viewed 768 times

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

  • Quick update: The documentation implies that the FreeRTOS patch may not
    be needed, but I went ahead and applied it (manually) to our port
    (ARM_CM7). Builds fine. No change in behavior with this in place, other
    than sometimes "Start Recording" will not error out, and instead give me
    the same 5 events as before.
  • Hi,

    Sorry for the late reply.

    Can you check that your target application is still running after you connected SystemView or called SEGGER_SYSVIEW_Start().

    This issue is most commonly caused by a crash of the target application, for example because your stack sizes are too small.

    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.