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

Parents
  • 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>

Reply
  • 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>

Children