Description of problem
I’m not too sure if this is considered a bug. I believe the platformio/tool-openocd-kendryte is not compiled for Raspberry PI (linux_armv7l)
Operating system:Raspbian GNU/Linux 10 (buster)
PlatformIO Version (
platformio --version): PlatformIO Core, version 5.1.1
****************** Error Log Start ******************
> Executing task in folder sipeed_test: platformio run --target upload --environment sipeed-maix-one-dock <
Processing sipeed-maix-one-dock (platform: kendryte210; board: sipeed-maix-one-dock; framework: kendryte-standalone-sdk)
Tool Manager: Installing platformio/tool-openocd-kendryte @ ^1.203.0
Error: Could not find the package with 'platformio/tool-openocd-kendryte @ ^1.203.0' requirements for your system 'linux_armv7l'
The terminal process "platformio 'run', '--target', 'upload', '--environment', 'sipeed-maix-one-dock'" terminated with exit code: 1.
Terminal will be reused by tasks, press any key to close it.
****************** Error Log End******************
Steps to Reproduce
- Create a new project and select Sipeed MAIX one dock
- Select Kendryte Standalone sdk
- Click on “Upload”
As seen in error log above, it cannot find a suitable binary for platformio/tool-openocd-kendryte
I expect not to see this error although I am not using platformio/tool-openocd-kendryte.
The package is not available in PlatformIO’s repos, please file a bug in Issues · sipeed/platform-kendryte210 · GitHub so that the people there (or @valeros?) can upload the missing packet.
However that may take some while.
Are you able to clone GitHub - kendryte/openocd-kendryte, install the depenendencies and configure the features (as per Compiling OpenOCD from Source on Ubuntu 16.04 | Tom Verbeure | Hackaday.io but don’t clone it from that link, but in the link given above)?
If you are able to compile (and
make install it to some directory) you can just add a
package.json to that folder with the content
"description": "Open On-Chip Debugger branch with RISC-V Kendryte support",
and use it by copying it to
~/.platformio/packages/tool-openocd-kendryte, with the same structure as e.g. the linux x64 package. That should make PlatformIO recongize that this package is already ‘installed’.
@maxgerhardt Thanks for info.
I first used a Intel PC to create a project and look at how the openocd is packaged for linux_x86_64.
I then changed the package.json as per your suggestion by updating the system to linux_armv7l
Since I already have openocd for k210 compiled, I just package is accordingly and uploaded it to git.
Somewhat related to my other issue on installing extra python packages. I ended up creating a fork of the platform and point everything to the intended packages (including this one).
So now my users just need to run pio platform install GitHub - xalogic-open/platform-kendryte210: Kendryte K210: development platform for PlatformIO
Hopefully, once this is more stable I will get it merged with the official platform.
Thanks again, you helped me better understand the way platformio work.
I’ve opened an issue in tool-openocd-kendryte not available for linux_armv7l · Issue #40 · sipeed/platform-kendryte210 · GitHub to track the OpenOCD issue.
Is it possible that you execute
pio package pack ~/.platformio/packages/tool-openocd-kendryte, this should result in one nice
.tar.gz package, upload it and post a link in the aforementioned issue? This may help other users and the maintainers directly.
@maxgerhardt I can do that but I would have to re-do it. Do give me a little time.
The reason is that I use that package mainly to use the Raspberry PI 40 pin IO to “bit bang” the JTAG interface of K210 using the bcm2835gpio interface.
So, I believe things like USB are not enabled as I did not fully follow the steps you pointed out in the article. To be honest, I don’t know how to fully test the package to ensure that it works. It just worked on the mode I am interested in.
Turns out it was easier when you do it a second time.
Link to tar ball
The steps to compile openocd-kendryte:
- sudo apt-get install libtool pkg-config texinfo libusb-dev libusb-1.0.0-dev libftdi-dev autoconf
- ./configure --prefix=/opt/openocd --enable-sysfsgpio --enable-bcm2835gpio
- sudo make install