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

Loading SVD from Device Support Pack #288

Closed
dwalkes opened this issue May 10, 2020 · 3 comments
Closed

Loading SVD from Device Support Pack #288

dwalkes opened this issue May 10, 2020 · 3 comments

Comments

@dwalkes
Copy link

dwalkes commented May 10, 2020

Hi,

Thanks for sharing this project!

I'm attempting to use with Renode and this launch configuration on this test project:

        {
            "showDevDebugOutput": true,
            "cwd": "${workspaceRoot}",
            "executable": "./build/bluepill-starter.elf",
            "name": "Debug Renode",
            "request": "launch",
            "type": "cortex-debug",
            "servertype": "external",
            "preLaunchTask": "Build STM",
            "gdbTarget": "localhost:3333",
            "device": "STM32F103"
        }

Then manually starting Renode using the instructions here.

set bin @<path to working directory>/bluepill-starter/build/bluepill-starter.elf
s @scripts/single-node/stm32f103.resc
machine StartGdbServer 3333

I'm able to use interactive debug, however I haven't been able to come up with the correct settings for the device parameter to load the svd file, despite the fact that I"ve loaded the STM32F1 device support pack. Each time I see No SVD File Loaded: undefined. If I replace the device attribute with:

            "svdFile": "./STM32F103.svd",

Where the .svd file is taken from this link the peripherals view works.

I'm wondering how I should specify the device argument to get it to find the svd file so I don't need to specify it myself as a workaround.

The README link to https://marcelball.ca/projects/cortex-debug/ is down for me today, perhaps it would be explained there.

Thanks for sharing and for any suggestions you have to resolve this.

@haneefdm
Copy link
Collaborator

I am assuming you installed the support pack in vscode, which btw, I am not sure is being maintained. You can see the entire support pack here.

https://github.com/Marus/cortex-debug-dp-stm32f1

Btw, did you try "device": "STM32F103xx". I believe it is expecting two alpha-numeric chars after the device's major type. The device setting is also used for other purposes and it needs to match to a real device

@haneefdm
Copy link
Collaborator

haneefdm commented May 11, 2020

Btw, it is safer to use the svdFile setting to specify. In your case, since you are using an external gdb server, the device setting is not really used for anything else. Getting the svd file direct from the MCU vendor is what I highly recommend.

https://community.st.com/s/question/0D50X00009XkWDkSAN/how-does-st-manage-svd-files

There can be bug fixes in SVD files that you may not be getting if you get files distributed by others. Just a suggestion

@dwalkes
Copy link
Author

dwalkes commented May 11, 2020

Thanks for the response!

I am assuming you installed the support pack in vscode

I did.

Btw, did you try "device": "STM32F103xx".

I did not, but I confirm this does work.

Getting the svd file direct from the MCU vendor is what I highly recommend.

Thanks for the advice!

I've summarized in a new wiki page at https://github.com/Marus/cortex-debug/wiki/Specifying-SVD-Files.

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

2 participants