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

OpenOCD gdb_port command does not work for certain chips #149

Closed
haneefdm opened this issue Apr 7, 2019 · 2 comments
Closed

OpenOCD gdb_port command does not work for certain chips #149

haneefdm opened this issue Apr 7, 2019 · 2 comments

Comments

@haneefdm
Copy link
Collaborator

haneefdm commented Apr 7, 2019

For OpenOCD, you have to typically run one or more tcl scripts to get it going. Some scripts require an 'init' function to be executed after which they can do additional configuration to get the debug target ready.

Problem is that our extension selects the port(s) automatically (nice) and passes it as the desired/required port to openocd as the last argument. But if the config scripts ever called 'init', then the last command line causes a stack trace in openocd and it quits.

There is nothing wrong with setting the port as the first argument instead of the last. It is just a global variable in openocd that is not used until 'init' is called and which is why you can't change after 'init' is called.

I have a simple fix in my sandbox but I want to hear opinions.

@haneefdm
Copy link
Collaborator Author

haneefdm commented Apr 8, 2019

I tested it and it is harmless to set the gdb_port at the beginning of the command line for OpenOCD

The change is in my fork: https://github.com/haneefdm/cortex-debug

@haneefdm
Copy link
Collaborator Author

Closed with PR #151

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

1 participant