Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser missing IRQs (CMSDK_CM3.svd) #87

Open
tinylabs opened this issue Oct 5, 2019 · 1 comment
Open

Parser missing IRQs (CMSDK_CM3.svd) #87

tinylabs opened this issue Oct 5, 2019 · 1 comment

Comments

@tinylabs
Copy link

tinylabs commented Oct 5, 2019

While parsing ARM CMSDK_CM3.svd extracted from Keil.V2M-MPS2_CMx_BSP.1.7.0.pack it appears the second IRQs for all peripherals are missing. Everything looks fine when I examine the SVD file manually. This device is of special importance as its available in QEMU. Any assistance would be appreciated as my python skills are poor.

@posborne
Copy link
Collaborator

posborne commented Oct 6, 2019

I pulled down this file. I believe the SVD provided by ARM does follow the spec but does it in a way that is more than a little obnoxious and different than how all the vendors appear to be doing things (at least as far as I have encountered)

CMSDK_CM3.svd:

        <interrupt>
            <name>UART0_RX</name>
            <description>UART 0 Receive Interrupt</description>
            <value>0</value>
            <name>UART0_TX</name>
            <description>UART 0 Transmit Interrupt</description>
            <value>1</value>
        </interrupt>

How everyone else does it:

        <interrupt>
            <name>UART0_RX</name>
            <description>UART 0 Receive Interrupt</description>
            <value>0</value>
        </interrupt>
        <interrrupt>
            <name>UART0_TX</name>
            <description>UART 0 Transmit Interrupt</description>
            <value>1</value>
        </interrupt>

However, the schema does have the type for "interrupt" defined as follows:

  <!-- interruptType specifies how to describe an interrupt associated with a peripheral -->
  <xs:complexType name="interruptType">
    <xs:sequence>
      <xs:element name="name" type="stringType"/>
      <xs:element name="description" type="xs:string" minOccurs="0"/>
      <xs:element name="value" type="xs:integer"/>
    </xs:sequence>
  </xs:complexType>

Which, if I understand xs:sequence correctly requires a specific order and allow for elements within a given interrupt section to occur more than once. I'll have to look at how to change code to accommodate and figure out where else the spec decided to allow this asinine form of expression.

posborne added a commit that referenced this issue Oct 23, 2019
This commit introduces a core idea for how to model the parsing
of the fairly obnoxious required xs:sequence type parsing that
shows up in some of ARM's examples (and is part of the spec).

Initially just the register parsing is converted over per
#87.

Signed-off-by: Paul Osborne <osbpau@gmail.com>
deadprogram pushed a commit to tinygo-org/cmsis-svd that referenced this issue Jun 6, 2020
This commit introduces a core idea for how to model the parsing
of the fairly obnoxious required xs:sequence type parsing that
shows up in some of ARM's examples (and is part of the spec).

Initially just the register parsing is converted over per
cmsis-svd#87.

Signed-off-by: Paul Osborne <osbpau@gmail.com>
gschwaer pushed a commit to gschwaer/cmsis-svd-data that referenced this issue Feb 9, 2024
This commit introduces a core idea for how to model the parsing
of the fairly obnoxious required xs:sequence type parsing that
shows up in some of ARM's examples (and is part of the spec).

Initially just the register parsing is converted over per
cmsis-svd/cmsis-svd#87.

Signed-off-by: Paul Osborne <osbpau@gmail.com>
gschwaer pushed a commit to gschwaer/cmsis-svd-data that referenced this issue Feb 9, 2024
This commit introduces a core idea for how to model the parsing
of the fairly obnoxious required xs:sequence type parsing that
shows up in some of ARM's examples (and is part of the spec).

Initially just the register parsing is converted over per
cmsis-svd/cmsis-svd#87.

Signed-off-by: Paul Osborne <osbpau@gmail.com>
gschwaer pushed a commit to gschwaer/cmsis-svd-data that referenced this issue Feb 9, 2024
This commit introduces a core idea for how to model the parsing
of the fairly obnoxious required xs:sequence type parsing that
shows up in some of ARM's examples (and is part of the spec).

Initially just the register parsing is converted over per
cmsis-svd/cmsis-svd#87.

Signed-off-by: Paul Osborne <osbpau@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants