Open retif opened 5 months ago
How does an SVD file looks like? Does it "somehow work" with GDB?
The manufacturer provides SVD(System View Description) file for every microcontroller, the insides are looks like this(snippet)
<peripheral>
<name>HRTIM_Master</name>
<description>High Resolution Timer: Master
Timers</description>
<groupName>HRTIM</groupName>
<baseAddress>0x40017400</baseAddress>
<addressBlock>
<offset>0x0</offset>
<size>0x80</size>
<usage>registers</usage>
</addressBlock>
<registers>
<register>
<name>MCR</name>
<displayName>MCR</displayName>
<description>Master Timer Control Register</description>
<addressOffset>0x0</addressOffset>
<size>0x20</size>
<access>read-write</access>
<resetValue>0x00000000</resetValue>
<fields>
<field>
<name>BRSTDMA</name>
<description>Burst DMA Update</description>
<bitOffset>30</bitOffset>
<bitWidth>2</bitWidth>
</field>
</fields>
</register>
</registers>
</peripheral>
There many more of them in .SVD file. And they provide description of every peripheral register address, name, description and every field name, description offset. This allows when we are in debug session to navigate over this list rendered as a tree of names and view/set the value of them, for debug purposes, this can save time of reading datasheet or .svd file to find out the needed address. Its could be not easy, because for every bit field you need to sum the offset with baseAddress of register to see/change its value
To answer the initial question. Yes it is possible. And to possibly also answer it: someone would need to implement a configuration for reading this file and loading the registers in the already available register view. Maybe that someone could be you or someone you know?
Side note: There's a good debug extension specialized on debugging microcontrollers and it already has SVD support: Cortex Debug (and no, we sadly cannot copy any of its part as it has an incompatible license [you cannot take MIT-code and put it in a Public Domain code if you don't want to switch to MIT]).
SVD file defines named register addresses for every peripheral available on microcontroller. Is it possible to use this debugger with SVD file attached to a launch configuration?