August 9, 2019 at 08:40 #25627
NXP already provides a .xml with the hardware register definitions with their BSP. The format is not the same as required by VisualGDB (http://visualgdb.com/documentation/hwregs).
Is there any chance that I could get some help converting the file? Maybe you already have some in-house tools that could ease the process?
I’m guessing it’s the same for all NXP products? It would really be awesome if we could use those hardware register definitions, just like you already added support for their BSP’s.
Snippet of the NXP .xml file:C++1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465<vendor>nxp.com</vendor><name>MIMXRT1052</name><version>1.0</version><description>MIMXRT1052DVL6B</description><licenseText>Copyright 2016-2019 NXPAll rights reserved.SPDX-License-Identifier: BSD-3-Clause</licenseText><cpu><name>CM7</name><revision>r0p1</revision><endian>little</endian><mpuPresent>true</mpuPresent><fpuPresent>true</fpuPresent><vtorPresent>true</vtorPresent><nvicPrioBits>4</nvicPrioBits><vendorSystickConfig>false</vendorSystickConfig></cpu><addressUnitBits>8</addressUnitBits><width>32</width><peripherals><peripheral><name>AIPSTZ1</name><description>AIPSTZ Control Registers</description><groupName>AIPSTZ</groupName><prependToName>AIPSTZ1_</prependToName><headerStructName>AIPSTZ</headerStructName><baseAddress>0x4007C000</baseAddress><addressBlock><offset>0</offset><size>0x54</size><usage>registers</usage></addressBlock><registers><register><name>MPR</name><description>Master Priviledge Registers</description><addressOffset>0</addressOffset><size>32</size><access>read-write</access><resetValue>0x77000000</resetValue><resetMask>0xFFFFFFFF</resetMask><fields><field><name>MPROT5</name><description>Master 5 Priviledge, Buffer, Read, Write Control.</description><bitOffset>8</bitOffset><bitWidth>4</bitWidth><access>read-write</access><enumeratedValues><enumeratedValue><name>MPL0</name><description>Accesses from this master are forced to user-mode (ips_supervisor_access is forced to zero) regardless of the hprot access attribute.</description><value>#xxx0</value></enumeratedValue><enumeratedValue><name>MPL1</name><description>Accesses from this master are not forced to user-mode. The hprot access attribute is used directly to determine ips_supervisor_access.</description><value>#xxx1</value></enumeratedValue></enumeratedValues></field><field>
August 10, 2019 at 06:54 #25629
- This topic was modified 1 month, 1 week ago by support. Reason: formatting
This looks like a regular SVD file that should be already supported by VisualGDB. Simply select it when clicking on the “Locate SVD file” link in the Hardware Registers window and VisualGDB will automatically convert it to its format.
Alternatively, you can use the converter from our BSPTools repository that is equivalent to the converter used by VisualGDB.August 12, 2019 at 10:31 #25642
Unfortunately visualGDB fails when I try to import the .xml with the hardware definitions from NXP.August 12, 2019 at 18:37 #25646
Thanks for letting us know, however unfortunately it’s hard to suggest anything specific without knowing more details. If you could describe exactly how you were importing them and what you observed (and ideally, share the entire file you tried importing), we should be able to suggest a workaround or release a hotfix for it.August 13, 2019 at 10:00 #25647
I’ve attached the hardware definition file generated by the newest version of the NXP SDK for the IMXRT1052 (zipped because it’s 8MB).
I get the following error when I open the Hardware Registers windows and try to “Import register from an SVD file or a VisualGDB resiger definition file”
VisualGDB version: 22.214.171.12442
—————— System.InvalidOperationException ——————
System.InvalidOperationException: There is an error in XML document (2, 2). —> System.InvalidOperationException: <device xmlns=”> was not expected.
— End of inner exception stack trace —
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(Stream stream)
at BSPEngine.XmlTools.LoadObject[_Ty](String xmlFile, Type extraTypes)
at q3.b4(Boolean a)
—————— Inner exception ——————
—————— System.InvalidOperationException ——————
System.InvalidOperationException: <device xmlns=”> was not expected.
When I try to add the file in the VisualGDB project properties -> Embedded Project -> Peripheral register definitions, then the Hardware registers windows says they are still missing when trying to open it while debugging.
I assume that the registers definitions .xml generated by NXP is just too different from the VisualGDB standard for it to work. Hopefully you guys can make a fix, as I guess it would make it work for all NXP devices, not just the IMXRT1052.
Attachments:You must be logged in to view attached files.August 13, 2019 at 20:50 #25650
Thanks for the update. Looks like VisualGDB tries to load it as a VisualGDB-specific XML file instead of using the SVD loading logic.
Please try changing the file extension to .svd and importing it again.August 14, 2019 at 07:35 #25651
Works perfectly, thanks a lot!
You must be logged in to reply to this topic.