Run tool-openocd-esp32

I tried to run tool-openocd-esp32 with reference to the installation example and pio pkg exec example.

pio pkg exec --package "platformio/tool-openocd-esp32" -- <CMD> [ARGS]

I don’t know how to set “CMD” [ARGS]. After running without CMD [ARGS], the following error occurred.

PS C:\Users\JJS\Documents\PlatformIO\Projects\221107-141244-espidf-arduino-wifiscan> pio pkg exec --package "platformio/tool-openocd-esp32"
Usage: pio pkg exec [OPTIONS] [ARGS]...
Try 'pio pkg exec -h' for help.

Error: Please provide command name

I would like to know how to set the Command and Argument.

>pio pkg exec -p "tool-openocd-esp32" -c "openocd --version"
Using tool-openocd-esp32@2.1100.20220706 package
Open On-Chip Debugger  v0.11.0-esp32-20220706 (2022-07-06-15:48)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html

Because

>pio pkg exec --help
Usage: pio pkg exec [OPTIONS] [ARGS]...

Options:
  -p, --package SPECIFICATION
  -c, --call <cmd> [args...]
  -h, --help                   Show this message and exit.

Example

pio pkg exec -p "tool-openocd-esp32" -c "openocd -f board/esp32-wrover-kit-3.3v.cfg"
2 Likes