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

Peripherial view does not show 8bit addressBlocks #2586

Open
evilmav opened this issue Jun 10, 2021 · 5 comments
Open

Peripherial view does not show 8bit addressBlocks #2586

evilmav opened this issue Jun 10, 2021 · 5 comments
Labels
bug debug PIO Unified Debugger

Comments

@evilmav
Copy link

evilmav commented Jun 10, 2021

When trying to add AVR peripherial view support to PIO debugger by providing SVD files converted from Atmel's atdf. PIO seems to not show anything in the peripherial view if the adressBlock is less then 4 bytes.

Consider this SVD
<?xml version="1.0" encoding="UTF-8"?>
<device>
  <vendor>Atmel</vendor>
  <name>ATmega1284P</name>
  <addressUnitBits>8</addressUnitBits>
  <size>8</size>
  <access>read-write</access>
  <resetValue>0</resetValue>
  <resetMask>0xff</resetMask>
  <peripherals>
    <peripheral>
      <name>AC</name>
      <description>Analog Comparator</description>
      <baseAddress>0x50</baseAddress>
      <addressBlock>
        <offset>0x0</offset>
        <size>0x1</size>
        <usage>registers</usage>
      </addressBlock>
      <registers>
        <register>
          <name>ACSR</name>
          <description>Analog Comparator Control And Status Register</description>
          <addressOffset>0x0</addressOffset>
          <access>read-write</access>
          <fields>
            <field>
              <name>ACIS</name>
              <description>Analog Comparator Interrupt Mode Select bits</description>
              <bitRange>[1:0]</bitRange>
              <access>read-write</access>
              <writeConstraint>
                <useEnumeratedValues>true</useEnumeratedValues>
              </writeConstraint>
              <enumeratedValues>
                <enumeratedValue>
                  <name>VAL_0x00</name>
                  <description>Interrupt on Toggle</description>
                  <value>0</value>
                </enumeratedValue>
                <enumeratedValue>
                  <name>VAL_0x01</name>
                  <description>Reserved</description>
                  <value>1</value>
                </enumeratedValue>
                <enumeratedValue>
                  <name>VAL_0x02</name>
                  <description>Interrupt on Falling Edge</description>
                  <value>2</value>
                </enumeratedValue>
                <enumeratedValue>
                  <name>VAL_0x03</name>
                  <description>Interrupt on Rising Edge</description>
                  <value>3</value>
                </enumeratedValue>
              </enumeratedValues>
            </field>
            <field>
              <name>ACIC</name>
              <description>Analog Comparator Input Capture Enable</description>
              <bitRange>[2:2]</bitRange>
              <access>read-write</access>
            </field>
            <field>
              <name>ACIE</name>
              <description>Analog Comparator Interrupt Enable</description>
              <bitRange>[3:3]</bitRange>
              <access>read-write</access>
            </field>
            <field>
              <name>ACI</name>
              <description>Analog Comparator Interrupt Flag</description>
              <bitRange>[4:4]</bitRange>
              <access>read-write</access>
            </field>
            <field>
              <name>ACO</name>
              <description>Analog Compare Output</description>
              <bitRange>[5:5]</bitRange>
              <access>read-write</access>
            </field>
            <field>
              <name>ACBG</name>
              <description>Analog Comparator Bandgap Select</description>
              <bitRange>[6:6]</bitRange>
              <access>read-write</access>
            </field>
            <field>
              <name>ACD</name>
              <description>Analog Comparator Disable</description>
              <bitRange>[7:7]</bitRange>
              <access>read-write</access>
            </field>
          </fields>
        </register>
      </registers>
    </peripheral>
  </peripherals>
</device>

Nothing gets shown in the view, but the register appears if addressBlock.size is set to 4 or more.

I'd be happy to debug, but although according to Community PIO Plus is supposed to be open source, I can not find the source of platformio-vscode-debug. Where is it published?

PS In case of a missing addressBlock, PIO fails with an extremely unhelpful "Cannot read property '0' of undefined"

@maxgerhardt
Copy link

At Rahix/atdf2svd#25 (comment) I've posted a reference with 8-bit regsiters which works nicely per platformio/platform-ststm8#38, see screenshots.

I'd be happy to debug, but although according to Community PIO Plus is supposed to be open source, I can not find the source of platformio-vscode-debug. Where is it published?

+1 on this. I thought I opened an issue about that long ago but I can't find it anymore. I'll open a separate issue for that.

@stale
Copy link

stale bot commented Aug 9, 2021

This issue has been automatically marked as stale because it has not had recent activity. Please provide more details or it will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 9, 2021
@maxgerhardt
Copy link

~ still valid ~

@stale stale bot removed the stale label Aug 9, 2021
@stale
Copy link

stale bot commented Oct 9, 2021

This issue has been automatically marked as stale because it has not had recent activity. Please provide more details or it will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 9, 2021
@maxgerhardt
Copy link

~still valid ~

@stale stale bot removed the stale label Oct 9, 2021
@ivankravets ivankravets added bug debug PIO Unified Debugger labels Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug debug PIO Unified Debugger
Projects
None yet
Development

No branches or pull requests

3 participants