Added definition of openOCDIP when gdb run in WSL but openOCD in host - #1256
Added definition of openOCDIP when gdb run in WSL but openOCD in host#1256adampaul012 wants to merge 1 commit into
Conversation
|
Thank you for the submission. There is more involved than just the gdb target host:ip. There is also free port detection, ports for rtt/swo, multi-core debug, etc. Sorry, we are not adding features to this extension. There is a rewrite of this extension (currently in alpha), where WSL, Docker, and SSH are supported in an automated way. It figures out most of it automatically with VSCode's help. https://github.com/mcu-debug/mcu-debug If you don't want to use that, try using With Btw, the new extension doesn't rely on |
|
Hi Thank you for your response. The reason I didn't use |
|
https://mcu-debug.github.io/mcu-debug/docs/remote/wsl It might help you. |
|
With mcu-debug, you have to make sure that your serverpath is the Windows version of openocd. As my proxy server + openocd runs on Windows natively where the probe is attached. The same goes for any openocd config files (you are fine if you are using config files that came with openocd since you can use relative paths) Depending on the WSL networking mode you are using, you may need this info. https://mcu-debug.github.io/mcu-debug/docs/remote#wsl-nat-security-warning If you have the time, please read that entire page |
I develop in WSL but proxing the USB of the debugger to WSL does not work so openOCD runs in Windows. The IP then needs to be set not to localhost but to the address of WSL host. This is when using servertype: openocd. The argument openOCDIP sets the ip for gdb and also binds openOCD to that IP so it listens on it. Tested with vscode 1.116.0.