This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SCVD XML parsing error, print in '<out> <item>'

I am following appnote 316 to configure stack usage monitoring. Keil is giving an error "E405: Invalid statement" on the print element. As far as I can tell this is valid and correct. 

How do I resolve this issue?

Thanks

  • A SCVD (Software Component View Description) is a special file that lets you build your own custom "watch window" we call a "component viewer"

        www.keil.com/.../uv4_db_dbg_scvd_viewer.htm

    Many of the middleware components have a premade SCVD files for their component viewers.

    read more about this XML-based file at:

    www.keil.com/.../SCVD_Format.html

    If you make a SCVD file, you can add it to the Keil debugger:

    www.keil.com/.../uv4_ca_manage_scvd.htm

    ====

    Without knowing details of your setup, I would guess this project has an error-containing SCVD file associated with it

    Those messages look like XML parsing errors. the debugger thinks it is reading a SCVD file, and it is using the word  "print" at the wrong place.

  • As I mentioned, I am following app note 316 which is about creating a SCVD file to monitor stack usage. Here is the script. After adding the SCVD via the "component viewer" I get the XML parsing error mentioned. If the 2 "print lines are removed it works. This should be valid code.

    <?xml version="1.0" encoding="utf-8"?>
    <component_viewer schemaVersion="0.1" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="Component_Viewer.xsd">
      <component name="MyExample" version="1.0.0"/>
       <objects>
        <object name="SystemStack">
          <var  name="StackStart" type="int32_t" value="0"  />
          <var  name="StackSize"  type="int32_t" value="0"  />
          <var  name="StackMax"   type="int32_t" value="0"  />
          <var  name="StackUsed"  type="int32_t" value="0"  />
          <calc>
            StackStart = __FindSymbol ("STACK$$Base");
            StackSize  = __FindSymbol ("STACK$$Limit") - StackStart;
            StackMax   = __CalcMemUsed(StackStart, StackSize, 0xCDCDCDCD, 0xABABABAB);
            StackUsed  = __FindSymbol ("STACK$$Limit") - __GetRegVal("MSP");
          </calc>
          <out name="SystemStack">
            <item property="Start" value="%x[StackStart]"/>
            <item property="Size"  value="%x[StackSize]" />
            <item>
              <print cond="__Running == 0" property="Used" value="%d[StackUsed*100/StackSize]%% [%d[StackUsed]]" />
              <print cond="__Running == 1" property="Used" value="unknown" />
            </item>
            <item alert="(StackMax >> 31)" property="Max" value="%d[(StackMax>>20) & 0xFF]%% [%d[StackMax & 0xFFFFF]]" />
          </out>
        </object>
      </objects>
    </component_viewer>

  • Thanks for the fast reply.

    Are you running a recent version of the Keil tools?

    If you look at the "Revision history" on this page:

    https://www.keil.com/pack/doc/compiler/EventRecorder/html/index.html

    You can see they added features to the standard as time went by. Perhaps your version of the tools pre-dated the print command?

    I tested this in MDK v 5.28a available at keil.com/demo

  • We are using 5.22. I don't see in that table what version the PRINT feature was introduced.

  • Hi AJ, 

    on the revision history, I think print was part of the "Changed protocol version to 1.1.  "  update that happened in the V1.4.0. If you can use arm Compiler pack v 1.40 or later (came out in March 2018) you should have access to 'print'