none
Enable debug zones on serial port RRS feed

  • Question

  • Hi,

    I'm working with WinEC 7. For debugging I use a JTAG debugger for my CPU and the serial port.

    With KITL and the platform builder I can enable and disable debug zones. Is it also possible to enable and disable debug zones if I use only the serial port for debugging? If so, how can I do this?

    At the moment I am searching a bug in the USB OTG driver, so I like to enable the debug messages "ZONE_OTG_FUNCTION".

    Best regards,

    Andreas

    Thursday, August 9, 2012 6:40 AM

Answers

  • Yes you can do it.  Search for the struct DBGPARAM in your OTG driver code.

    #ifdef DEBUG
    DBGPARAM dpCurSettings =
    {
      // Name of the debug module
      TEXT("OAL"),
      {
        // Names of the individual zones
        TEXT("Error"),      TEXT("Warning"),    TEXT("Function"),   TEXT("Info"),
        TEXT("Stub/Keyv/Args"), TEXT("Cache"),  TEXT("RTC"),        TEXT("Power"),
        TEXT("PCI"),        TEXT("Memory"),     TEXT("IO"),         TEXT("Timer"),
        TEXT("IoCtl"),      TEXT("Flash"),      TEXT("Interrupts"), TEXT("Verbose")
      },
      // Bitfield controlling the zones.  1 means the zone is enabled, 0 disabled
      // We'll enable the Error, Warning, and Info zones by default here
      1 | 1 << 1 | 1 << 3
    };
    #endif
     See the last field in the above structure where you can enable/disable the zones. The above zones should work with debug image only. If you build retail image then you need to convert DEBUG messages to RETAILMSG as you need.

    Regards,

    Rakesh.

    • Marked as answer by Andreas_1981 Thursday, August 9, 2012 7:12 AM
    Thursday, August 9, 2012 6:51 AM
  • Actually it is better to just set the debug zones in the device's registy (so you don't have to clone/change/rebuild any code):

    [HKEY_LOCAL_MACHINE\DebugZones]
      "USBOTG"=dword:FFFF ; Enable all zones for module that registered with debug with name "USB OTG"


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.


    Thursday, August 9, 2012 9:47 AM
    Moderator

All replies

  • Yes you can do it.  Search for the struct DBGPARAM in your OTG driver code.

    #ifdef DEBUG
    DBGPARAM dpCurSettings =
    {
      // Name of the debug module
      TEXT("OAL"),
      {
        // Names of the individual zones
        TEXT("Error"),      TEXT("Warning"),    TEXT("Function"),   TEXT("Info"),
        TEXT("Stub/Keyv/Args"), TEXT("Cache"),  TEXT("RTC"),        TEXT("Power"),
        TEXT("PCI"),        TEXT("Memory"),     TEXT("IO"),         TEXT("Timer"),
        TEXT("IoCtl"),      TEXT("Flash"),      TEXT("Interrupts"), TEXT("Verbose")
      },
      // Bitfield controlling the zones.  1 means the zone is enabled, 0 disabled
      // We'll enable the Error, Warning, and Info zones by default here
      1 | 1 << 1 | 1 << 3
    };
    #endif
     See the last field in the above structure where you can enable/disable the zones. The above zones should work with debug image only. If you build retail image then you need to convert DEBUG messages to RETAILMSG as you need.

    Regards,

    Rakesh.

    • Marked as answer by Andreas_1981 Thursday, August 9, 2012 7:12 AM
    Thursday, August 9, 2012 6:51 AM
  • Hi,

    thanks for your answer.

    Best regards,

    Andreas

    Thursday, August 9, 2012 7:12 AM
  • Actually it is better to just set the debug zones in the device's registy (so you don't have to clone/change/rebuild any code):

    [HKEY_LOCAL_MACHINE\DebugZones]
      "USBOTG"=dword:FFFF ; Enable all zones for module that registered with debug with name "USB OTG"


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.


    Thursday, August 9, 2012 9:47 AM
    Moderator