Name lookup with custom events not working correctly

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

  • Name lookup with custom events not working correctly

    I'm running SystemView 2.42 and capturing events from an STM32F469 system, running FreeRTOS 9. I've merged the SystemView patch (and adjusted appropriately so it works)

    I'm trying to add my own events via ModuleRegister. That works, but I'm having problems with the address lookup feature.

    I'm registering events like this

    C Source Code

    1. #define SV_MAX_EVENTS 2
    2. #define SV_WATCH_RECEIVE_EVENT 1
    3. SEGGER_SYSVIEW_MODULE_STRUCT systemViewEventModule =
    4. {
    5. "M=EventMgr, " \
    6. "0 WP_EVENT_Post Queue=%I Event=%u arg0=%u arg1=%u, " \
    7. "1 WP_EVENT_Receive Queue=%I Event=%u arg0=%u arg1=%u res=%u", // sModule
    9. 0, // Offset - set by SEGGER_SYSVIEW_Register_Module()
    10. systemViewEventModuleDesc,
    11. NULL // pNext - set by SEGGER_SYSVIEW_Register_Module()
    12. };
    13. void systemViewEventModuleDesc(void)
    14. {
    15. SEGGER_SYSVIEW_NameResource((uint32_t)&EventMgr::GetInstance().guiEvents, "GUI EVENT QUEUE");
    16. }
    17. ...
    18. InitCode()
    19. {
    20. ...
    21. SEGGER_SYSVIEW_Conf(); // Configure and initialize SystemView
    22. ...
    23. SEGGER_SYSVIEW_RegisterModule(&systemViewEventModule);
    24. }
    25. RunningCode()
    26. {
    27. ...
    28. SEGGER_SYSVIEW_RecordU32x5(SV_WATCH_RECEIVE_EVENT + systemViewEventModule.EventOffset, (U32) this, msg.cmd, msg.args1, msg.args2, res);
    29. }
    Display All

    I see my event in SystemView

    WP_EVENT_Receive Queue=0x04002134 Event=0 arg0=0 arg1=0 res=0

    However, the address of this (i.e. guiEvents) is 0x200084D0

    There are a couple of oddities I've seen

    * I had originally defined SEGGER_SYSVIEW_ID_BASE to be 0x20000000, but I found that the SystemView log always reported TimeBase as 0x10000000, regardless of how the firmware was configured, so I changed the firmware so SEGGER_SYSVIEW_ID_BASE is 0x10000000
    * The reported address above (0x04002134) is 0x200084D0 in its ShrinkId form (i.e. - 0x10000000, and then >> 2)
    * The address doesn't appear to be getting converted back to its regular form by the GUI (which means its useless for debugging, even without the address name lookup working)
    * If I set SEGGER_SYSVIEW_ID to 0, it still doesn't work (and the GUI log continues to report TimeBase as 0x10000000)
    * In the GUI log, I see it reporting a module as being registered, but I don't see any names be registered (I do see task & ISR names being registered)

    Any guidance much appreciated