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

VSCode GDB Launch Configuration Not Taken From openocd.gdb #85

Open
david-boles opened this issue Mar 6, 2020 · 6 comments
Open

VSCode GDB Launch Configuration Not Taken From openocd.gdb #85

david-boles opened this issue Mar 6, 2020 · 6 comments

Comments

@david-boles
Copy link
Contributor

Would it be possible to configure the VSCode cortex-debug extension to pull its gdb commands from openocd.gdb? I ran into this when trying to use semihosting, openocd.gdb enables it but the cortex-debug launch configuration doesn't. If not (I couldn't see how), should I make a pull request to add "preLaunchCommands": ["monitor arm semihosting enable"] to the launch configurations?

@rubberduck203
Copy link
Contributor

rubberduck203 commented Mar 10, 2020

AFAIK it’s not currently possible to load a gdb script through the cortex-debug extension. I would encourage you to open an issue there as I couldn’t find a related one.

I think it’s reasonable to open a PR that adds semihosting to the QEMU launch config, since the stm32f303 config is set up to use ITM. That way we have an example for both communication mechanisms. QEMU doesn’t support ITM, so it seems reasonable, to me, for it to be the one to be configured for semihosting.

@andresv
Copy link

andresv commented May 7, 2020

You can add this to your launch.json. Worked nicely with stm32g0.

            "postLaunchCommands": [
                "monitor arm semihosting enable",
            ],

Also cortex-debug supports a lot of parameters that can be tweaked: https://github.com/Marus/cortex-debug/blob/master/package.json#L195

@andresv
Copy link

andresv commented May 7, 2020

Damn, I should have read OP more carefully. It was all there.

@rubberduck203
Copy link
Contributor

Can this issue be closed?

@reitermarkus
Copy link
Member

Is there a way to configure the extension to show hprintln output?

@reitermarkus
Copy link
Member

Ah, nevermind, hprintln output is in the gdb-server terminal.

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

4 participants