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

Resolve reading Write-Only registers in peripheral register view #530

Open
promodkumar-ashling opened this issue Jun 27, 2022 · 5 comments

Comments

@promodkumar-ashling
Copy link

Description

The write-only registers(The access type information available in the peripheral register file) attempt to read values from UI when the peripheral register views are opened.

Steps to Reproduce

  1. Run an Arm GDB Launch.
  2. Enable the peripheral register view.
  3. Keep a register with "access" as "write-only" in the SVD Register file.
    Eg:
    image
  4. Try to open the register with access write-only.

Expected behavior: [What you expected to happen]
It shouldn't read the "write-only" register values.

Actual behavior: [What actually happened]
The write-only registers attempt to read values from UI causing the target to go for an exception.

Versions

  • EmbedCDT - 6.2.1
  • Eclipse - 2022-03
  • Java - 16
  • Windows
@jonahgraham
Copy link
Contributor

AFAICT @promodkumar-ashling the write-only has only been implemented to display a different background colour so far. SvdDMNode.getAccess()'s call hierarchy shows that when access is read only then IValueModification.supportsValueModification() will return false. But the write-only is not wired up to anything.

I hope that gives you enough guidance to start working on a patch. Let us know if you need more info.

@ilg-ul
Copy link
Contributor

ilg-ul commented Jun 27, 2022

Can you provide more details on the SVD file you used, and what peripheral was that?

@promodkumar-ashling
Copy link
Author

                    <register>
   				<name>SMMU_SGFSR</name>
   				<displayName>Secure Global Fault Status register</displayName>
   				<description>Gives the fault status for each of the following possible faults.</description>
   				<addressOffset>0x48</addressOffset>
   				<size>32</size>
   				<access>write-only</access>
   				<resetValue>0x00000000</resetValue>
   				<resetMask>0xffffffff</resetMask>	
   				<fields>
   					<field>
   						<name>MULTI</name>
   						<lsb>31</lsb>
   						<msb>31</msb>
   						<access>write-only</access>
   						<modifiedWriteValues>modify</modifiedWriteValues>
   					</field>
   					<field>
   						<name>UUT</name>
   						<lsb>8</lsb>
   						<msb>8</msb>
   						<access>write-only</access>
   						<modifiedWriteValues>modify</modifiedWriteValues>
   					</field>
   					<field>
   						<name>PF</name>
   						<lsb>7</lsb>
   						<msb>7</msb>
   						<access>write-only</access>
   						<modifiedWriteValues>modify</modifiedWriteValues>
   					</field>
   					<field>
   						<name>EF</name>
   						<lsb>6</lsb>
   						<msb>6</msb>
   						<access>write-only</access>
   						<modifiedWriteValues>modify</modifiedWriteValues>
   					</field>
   					<field>
   						<name>CAF</name>
   						<lsb>5</lsb>
   						<msb>5</msb>
   						<access>write-only</access>
   						<modifiedWriteValues>modify</modifiedWriteValues>
   					</field>
   					<field>
   						<name>UCIF</name>
   						<lsb>4</lsb>
   						<msb>4</msb>
   						<access>write-only</access>
   						<modifiedWriteValues>modify</modifiedWriteValues>
   					</field>
   					<field>
   						<name>UCBF</name>
   						<lsb>3</lsb>
   						<msb>3</msb>
   						<access>write-only</access>
   						<modifiedWriteValues>modify</modifiedWriteValues>
   					</field>
   					<field>
   						<name>SMCF</name>
   						<lsb>2</lsb>
   						<msb>2</msb>
   						<access>write-only</access>
   						<modifiedWriteValues>modify</modifiedWriteValues>
   					</field>
   					<field>
   						<name>USF</name>
   						<lsb>1</lsb>
   						<msb>1</msb>
   						<access>write-only</access>
   						<modifiedWriteValues>modify</modifiedWriteValues>
   					</field>
   					<field>
   						<name>ICF</name>
   						<lsb>0</lsb>
   						<msb>0</msb>
   						<access>write-only</access>
   						<modifiedWriteValues>modify</modifiedWriteValues>
   					</field>
   				</fields>
   			</register>

@promodkumar-ashling
Copy link
Author

@ilg-ul Any updates on this issue?

@ilg-ul
Copy link
Contributor

ilg-ul commented Oct 15, 2024

No, but, as Jonah mentioned, we'll be happy to accept patches.

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

3 participants