Solution to record start of the system

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

  • Solution to record start of the system

    Hi,

    Like other guys I had a problem to record start of the system. I know that SEGGER_SYSVIEW_Start() can be used to force recording even without active connection but It wasn't solution for me due to huge buffer needed to not get overflow issue.

    Therefore I prepared solution that is sufficient for and maybe will be useful also for other.
    I implemented blocking function:

    C Source Code

    1. SEGGER_SYSVIEW_WaitForConnection()


    This function is called at start of the system just after SEGGER_SYSVIEW_Conf(). It is waiting endless till the System View application will be connected. Thanks that I don't lose any data at start and I don't need to worry about time when SysView will be connected.

    Function body:

    C Source Code

    1. /*********************************************************************
    2. *
    3. * SEGGER_SYSVIEW_WaitForConnection()
    4. *
    5. * Function description
    6. * Wait endless when SystemView APP will be connected
    7. *
    8. * Additional information
    9. */
    10. void SEGGER_SYSVIEW_WaitForConnection (void)
    11. {
    12. do
    13. {
    14. _HandleIncomingPacket ();
    15. }
    16. while (0 == _SYSVIEW_Globals.EnableState);
    17. }
    Display All



    I added it to SEGGER_SYSVIEW.c. If you think it is useful then feel free to add it to you system.

    Best regards
    Lukasz Antczak
  • Hi Lukasz,

    Thanks for sharing your function.
    It is a good solution to make sure you record the start of a system without adding a system specific delay or loop.

    Note: This function cannot be used in release code, as the system will endlessly wait for the SystemView connection.

    We might add it to the official version as well.

    Best regards
    Johannes