-
Notifications
You must be signed in to change notification settings - Fork 84
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
SVD parser throws error on rp2040.svd file: Unable to parse SVD file: TypeError: Cannot read property ‘0’ of undefined #21
Comments
People are helping out on making the svd compliant to the xsd, but so far it does not make any difference. I still get the error and missing debug features. |
Any follow up on this? I've compiled the latest raspberry pi openocd version, but it has the same errors. The changes in the SVD did not solve any problems. I'm using a simple Chinese ST Link v2 DAPLink compatible USB stick, and this works correctly with my STM32 boards. |
This still occurrs even when using the latests |
Thanks for the reply Max, long time no follow up although the problem still exists. My opinion is the same as yours, it's most likely something in the parser, so the people working on platformio perhaps should look into it. |
Just wanted to comment that the issue still exists, more than a year later, with the latest platformio core (6.1.13). Thanks to Max' guides - 🙏 , I was able to make my setup of Arduino Nano RP2040 Connect + Raspberry Pi Debug probe start working/debugging. Every time the debug session starts, the SVD error shows up - note that stepping through the code, breakpoints, variables inspection still work. The peripherals panel is not usable. I have tried several flavors of the rp2040 SVD file - all with same results:
Also note, other SVD files (for different chipsets - e.g. nrf52840) can be loaded fine. Are we confident the issue is on platformio's core parser side? |
Hi @danluca et al., I am facing similar problems (I think) running the latest platformio core (6.1.13) and trying to use a Pico and the Pi Debug probe. almost immediately after initialisation the message 'Unable to parse SVD file: TypeError: Cannot read properties of undefined (reading '0')' pops up, the debug console throws a warning:
and that's it. Im running on MacOS. Programming works fine. Starting the debugger from command line (arm-none-eabi-gdb) works fine. Sadly no nice debug tools from VScode. as platformio.ini I use [env:pico] Any obvious mistakes or steps I could take? |
The PlatformIO extension being unable to parse the SVD file should not cause GDB to crash -- those are two entirely different programs and GDB doesn't read the SVD file at all. Debugging should be possible, just no peripheral register view. I have not yet seen that one. Can you modify |
There is a line "svd_path": "rp2040.svd" in the pico.json. (which I remove, and after clean start the 'unable to parse SVD file' is no longer there. GBD still crashes. |
Then it's independent of the SVD file and should be discussed in https://github.com/maxgerhardt/platform-raspberrypi/issues/. |
Thank you, I will |
Hello,
I’m using VSCode and I can’t fully use the debugger with SWD and cmsis-dap on my Raspberry Pi Pico, as it throws an error on the rp2040.svd file: Unable to parse SVD file: TypeError: Cannot read property ‘0’ of undefined. No variables, watches or peripherals can be viewed, as these are defined in the svd file. The debugger starts and functions correctly, but I am only able to see the breakpoints, call stack en registers.
When checking the XML format of the svd file on https://www.freeformatter.com/xml-validator-xsd.html using the https://raw.githubusercontent.com/ARM-software/CMSIS/master/CMSIS/Utilities/CMSIS-SVD.xsd, I get a lot of errors on the svd file. Not sure if that is relevant.
I’m using the simple blinky code.
My platformio.ini:
[env]
platform = raspberrypi
framework = arduino
[env:pico]
board = pico
upload_protocol = picotool
debug_tool = cmsis-dap
The text was updated successfully, but these errors were encountered: