Trouble with instrumenting a module

  • Hi, I've been trying to instrument a module in my codebase as per the SystemView user manual (UM08027).
    It's on a baremetal application, which based from SEGGER materials, SystemView should support.

    Ok, so far, I have done the following:

    0. Configure SystemView in post mortem mode:


    Code
    #define SEGGER_SYSVIEW_POST_MORTEM_MODE 1
    #define SEGGER_SYSVIEW_RTT_BUFFER_SIZE 0x20000
    #define SEGGER_SYSVIEW_SYNC_PERIOD_SHIFT 8192 // 0x20000/16

    1. Call the following functions after MCU and BSP related init

    Code
    SEGGER_SYSVIEW_Conf();
    SEGGER_SYSVIEW_RegisterModule(&MyModule);
    SEGGER_SYSVIEW_Start();


    MyModule is defined as:

    Code
    SEGGER_SYSVIEW_MODULE MyModule =
    {
      "M=MyModule, 0 ISR Reg=%u",
      1, // NumEvents
      0, // EventOffset, Set by SEGGER_SYSVIEW_RegisterModule()
      NULL, // pfSendModuleDesc, NULL: No additional module description
      NULL, // pNext, Set by SEGGER_SYSVIEW_RegisterModule()
    };

    2. On a certain ISR handler, call:

    Code
    SEGGER_SYSVIEW_RecordEnterISR();
    ...
    // reg points to some register
    SEGGER_SYSVIEW_RecordU32(0 + MyModule.EventOffset, *reg);
    ...
    SEGGER_SYSVIEW_RecordExitISR();


    Now, in the SystemView host, I expected the register values to be printed on the timeline. Instead, I get this:

    The ISR is captured fine, but the module events just displays Function #512, without the data displayed as specitied in the module description. Are there other things to be done besides the steps I did above?

    Edited once, last by rechrtb (September 19, 2024 at 12:12 PM).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!