Community-PIO-CH32V / platform-ch32v

PlatformIO platform for CH32V RISC-V chips (CH32V003, CH32V103, CH32V20x, CH32V30x, CH32X035) and CH56x, CH57x, CH58x, CH59x
Apache License 2.0
234 stars 37 forks source link

Linux debug failed #24

Closed gicking closed 1 year ago

gicking commented 1 year ago

hello,

thanks to issue #22, upload to CH32V003 now works also under Linux (thanks a lot!). Note also this comment on udev rules

However, if I try to start a debug session, I get an error message

Error: Could not launch Debug Server 'bin/openocd'. Please check that it is installed and is included in a system PATH

The only executable openocd I found under ~/.platformio is in ~/.platformiopackages/tool-openocd/bin, so I added this to PATH via .profile. Still, same error message :-(

As you can see in the screenshot, openocd path is indeed found. But PIO seemingly is not aware of it, even after a reboot.

grafik

maxgerhardt commented 1 year ago

PlatformIO will only use the OpenOCD version of the installed PlatformIO package, never a system-wide installed tool.

But I definitely see that I have a bug here, on a fresh Linux installation it's trying to clone it from the repo again that is for Windows and then it doesn't find it. Since it's in the PIO registry now the fix should be easy.

undefinedTool Manager: Installing git+https://github.com/Community-PIO-CH32V/tool-openocd-riscv-wch.git
git version 2.37.2
undefinedKlone nach '/home/max/.platformio/.cache/tmp/pkg-installing-qcxw7b70' …
Error: Could not launch Debug Server 'bin/openocd'. Please check that it is installed and is included in a system PATH
See https://docs.platformio.org/page/plus/debugging.html
maxgerhardt commented 1 year ago

Yes the latest commit f72fb36e724ea23ee5bb05f298f6133c61414f98 has fixed this.

grafik

You can try updating with a PlatformIO Core CLI -> pio pkg update -g -p ch32v

gicking commented 1 year ago

debugging works after updating. Thanks a lot! :-)