Closed EGOKM closed 1 year ago
I forgot to tell the Version of the Plugin - its the latest 1.6.2, also tried 1.4.4 - same thing :-(
vscode is: Version: 1.70.2 Commit: e4503b30fc78200f846c62cf8091b76ff5547662 Date: 2022-08-16T05:36:25.715Z (2 wks ago) Electron: 18.3.5 Chromium: 100.0.4896.160 Node.js: 16.13.2 V8: 10.0.139.17-electron.0 OS: Linux x64 5.0.9
Only way to check what is wrong is to debug the extension itself. I can take a look but, I will need the SVD file. Can you compress and attach it?
You can also use Microsoft's version of SVD view. In your launch.json add an entry svdPath
instead of svdFile
. You can even try both at the same time. You have to install the following though.
https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-embedded-tools
Our debugger and their tools work with each other.
I've replied to the eMail from github - but it seems it doesnt work :-(, so pls see the SVD's attached here, I've attached the "faulty" SVD ( max32625.svd ) , and a working one ( max32660.svd ) , beside this I will check Your other thoughts ;-), SVDs.zip
Microsofts SVD View also didnt work:
Please file an issue with them as well. We are hoping that in the future we can just rely on them for SVD which is too expensive for a one man show here to maintain.
I will take a look this weekend.
Could you do me a favor and look at this and vote for the issue on the MS Website if you agree.
https://github.com/Marus/cortex-debug/issues/729#issuecomment-1233293715
upvoted right now ;-), THX for taking some time to look at this "special" SVD from MAXIM - the major Problem here is the nearly useless error message, its nearly same as telling me "Error 5" :-) , a more detailed Error Description would be fine, at least the Line # because SVD's are very large. Because ARM's svd checker shows me no Errors there is probably a Problem with the SVD - engine thinking MAXIM did made a correct SVD ;-)
Found the problem. There were two files. One file was parsed fine. But the file max32625.svd
had a whole bunch of empty enumerations which was not expected. Perhaps not illegal
<enumeratedValues></enumeratedValues>
Please note that XML (which SVD is) is not really a language. It is data so our parser is not built like a compiler looking for problems and it probably made some bad assumptions 3-5 years ago. Normally it looks like this
<enumeratedValues>
<enumeratedValue>
<name>en</name>
<description>Slave clock stretching enabled.</description>
<value>0</value>
</enumeratedValue>
<enumeratedValue>
<name>dis</name>
<description>Slave clock stretching disabled.</description>
<value>1</value>
</enumeratedValue>
</enumeratedValues>
I already updated the code but we are not releasing anything until another issue is resolved. Perhaps this weekend.
Hopefully, you filed an issue with the MS Embedded tools as well. We would love to ditch our SVD support and let someone big like MS handle it.
ok, THX a lot ;-), I will clean up the SVD from those empty strings and check again ...
I will also open an issue to MS Embedded tools ;-), I've observed that installing both ( MS and Yours ) is not working very well - the ARM- Register View is not correct ( as it was before installing MS ) - but I need to verify this ...
well, empty enums are not the Problem ;-), I've removed all that Stuff - not working, so I tried to validate the SVD here --> https://www.freeformatter.com/xml-validator-xsd.html - I've used the latest CMSIS-SVD.xsd ( attached ) and max32625.svd --- surprisingly it shows me many. many Errors (!), so, to verify it I tried max32660.svd --- ALL fine here :-), that means at the End that I need to clean up the huge max32625.svd so that the Validator is happy with it , then try again -- this I will do also on Weekend because its seems to be a long lasting task :-) CMSIS-SVD.zip
Hmmm, it parsed just fine for me after I allowed empty enums to just be ignored. I will check again.
One was to debug this is to remove all peripherals and add them one at a time back in until you find the problem one. Then start removing stuff from that problem peripheral until find the offending XML-node and deduce a pattern/construct that is causing the issue.
Btw, that validator just says that the XML has the right syntax and matches the schema. Does not say that that it makes sense. Given ASRMs history on this, I don't even know if their xsd is correct..
I thought you were using this utility from Keil (unfortunately, Windows only so that is not easy for me)
https://www.keil.com/pack/doc/CMSIS/SVD/html/svd_SVDConv_pg.html https://www.keil.com/pack/doc/CMSIS/SVD/html/svd_validate_file_pg.html
If they could just use the xml-validator, they would have. Again, that is an XML validator. Not and SVD validator.
Hello again, well, I've checked max32625.svd against the Schema-File CMSIS-SVD.xsd as "xmllint --schema CMSIS-SVD.xsd max32625.svd" - it shows me a lot of errors :-(, so did use xmllint's error Messages tix them - mostly the Tag- Order was wrong ( like this "
oops, the online editor removed some important chars thinking its html :-(, here is the right statement: ... "xmllint's error Messages to fix them - mostly the Tag- Order was wrong ( like this \<description>whatever\</description> was followed by \<value>whatever\</value> - that is WRONG so I interchanged those lines and xmllint was happy :-)" ...
I have a custom build you can try and give me feedback on. Especially look at the CLKMAN
block to make sure all the registers are there. Also, check a couple of other blocks. I can't because I don't have this device/board.
https://github.com/Marus/cortex-debug/releases/tag/v1.6.3-pre4
Btw, when you type in markdown, use code blocks
for code and it won't be touched, formatted or interpreted as HTML. Optionally, specify a language so it can color code as well.
<description>whatever</description>
https://www.markdownguide.org/extended-syntax/#fenced-code-blocks
Oops I had the wrong link earlier...
https://github.com/Marus/cortex-debug/releases/tag/v1.6.3-pre4
It should say 1.6.3-pre4 if you check after install.
ok, I did it ( installed v1.6.3-pre4) - it works so far ;-)
I am going to close this. The fix will be in the next release in a day or so...
Just FYI: I ran into this same problem with the version 9/13/23 of Cortex-Debug and the svd file for and nrf52840.
I made a local copy of the svd file and after changing all of the
@skiphansen Cortex-Debug no longer does SVD. It has been moved to
https://github.com/mcu-debug/peripheral-viewer
Can you submit an issue over there with your svd file and it will get addressed.
@haneefdm Thanks for the pointer, I'll do just that.
Hello, I got the Error Message "Unable to parse SVD file /home/eg/DisplayR7/Config/max32625.svd: TypeError: Cannot read properties of undefined (reading 'map')" when I start debugging - I've checked "max32625.svd" with ARM's SVDConv - no Errors here. So, I want to ask 1) can I check in more detail what the Problem is ? and 2) Is there any Solution probably for this ? THX in advance, Enrico