Instrumentation of middleware module - erratic detection of descriptions

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

    • Instrumentation of middleware module - erratic detection of descriptions

      For several hours now I've been trying to instrument one of our middleware modules.
      Following the (meager) instructions in the user guide to the letter, I don't manage to have the module properly detected in Systemview
      Some observations :

      - if no description file is present in the 'descriptions' folder, the module is flat out not detected (although it is mentioned in the manual that this description file is optional)
      - we're calling SEGGER_SYSVIEW_RegisterModule(xx) with the proper arguments in the _cbSendSystemDesc method which gets called after connecting SystemView. The SEGGER_SYSVIEW_MODULE struct contains all parameter and event info, identical to the description file. We tried all variants with or without spaces in the string between the various events to no avail. We tried with no event descriptions in the SEGGER_SYSVIEW_MODULE struct and with all info. Same result
      - the module is shown in SystemViewer, but with a wrong number of events (or sometimles only one event while there are 4 of them defined)
      - although separated by spaces (or tabs-we tried that oo), the event name was interpreted as a concatenation of the real event name and the first parameter

      Can someone post/reply with a proper description of the descriptor string in target FW or of the description file as it seems to be extremely sensitive to correct formatting. just adding or removing spaces or tabs already changes the behaviour.

      This is the description file and struct we are using

      FILE "SYSVIEW_vdcMemAlloc.txt"

      #
      # SystemView description for vdcMemAlloc
      #

      #
      # Types
      #

      NamedType MemAllocErr
      NamedType MemAllocErr 0=BLOCKMEMALLOC_ERR_NONE
      NamedType MemAllocErr 1=BLOCKMEMALLOC_ERR_NOSPACE
      NamedType MemAllocErr 2=BLOCKMEMALLOC_ERR_WRONGLIGNMENT
      NamedType MemAllocErr 3=BLOCKMEMALLOC_ERR_NOMOREENTRIES


      #
      # API calls
      #

      0 AllocBlock Pool=%p Addr=%p Slot=%u Size=%u
      1 FreeBlock Pool=%p Addr=%p Slot=%u Size=%u
      2 CreateBlock Pool=%p Slot=%u Size=%u
      3 Error Pool=%p Reason=%MemAllocErr Size=%u

      in target firmware: (here the description string is on one line, but we tried all possible multipline variants as well)

      C Source Code

      1. SEGGER_SYSVIEW_MODULE vdcBlockAlloc = {
      2. "M=vdcMemAlloc, 0 AllocBlock Pool=%p Addr=%p Slot=%u Size=%u, 1 FreeBlock Pool=%p Addr=%p Slot=%u Size=%u, 2 CreateBlock Pool=%p Slot=%u Size=%u, 3 Error Pool=%p Reason=%u Size=%u",
      3. 4, // NumEvents
      4. 0, // EventOffset, Set by RegisterModule()
      5. NULL, // pfSendModuleDesc
      6. NULL, // pNext, Set by RegisterModule()
      7. };
      Display All
      We're using SystemView 3.20 and FreeRtos 10.4.3
    • Hi,

      We cannot reproduce this. All description files are correctly parsed.
      As an example, have a look at the OS_IP_WebServer example recording.
      Could you provide your description file, a SystemView recording, and screenshots which show the behavior?

      - 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.
    • Seems like the description file failed to parse. When rewriting the statements on NamedType to one line (see below) vs how it was done in OP (copy from User Guide), it did parse and now works



      NamedType MemAllocErr 0=BLOCKMEMALLOC_ERR_NONE 1=BLOCKMEMALLOC_ERR_NOSPACE 2=BLOCKMEMALLOC_ERR_WRONGLIGNMENT 3=BLOCKMEMALLOC_ERR_NOMOREENTRIES

      0 AllocBlock Pool=%p Addr=%p Slot=%u Size=%u
      1 FreeBlock Pool=%p Addr=%p Slot=%u Size=%u
      2 CreateBlock Pool=%p Slot=%u Size=%u
      3 Error Pool=%p Reason=%MemAllocErr Size=%u