question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fails to install package tool-openocd on Windows

See original GitHub issue

Configuration

Operating system: Windows 10

PlatformIO Version (platformio --version): 4.3.4

Description of problem

PlatformIO is unable to install the package tool-openocd on Windows. The package is needed for uploads or for debugging.

Steps to Reproduce

  1. Delete package from C:\Users\username\.platformio\packages
  2. Execute an upload (e.g. if st-link is specified as upload_protocol for an stm32 project)

Actual Results

The installation and the upload fails

Warning! Package Mirror: [Errno 22] invalid mode ('wb') or filename: 'C:\\Users\\username\\.platformio\\packages\\_tmp_installing-8dezjz-package\\scripts\\target\\1986??1?.cfg'

Also see the error reports in https://community.platformio.org/t/openocd-installation-issue/8199/12 (posts since about Aug 10, 2020).

Expected Results

The package installs successfully and can be used for upload and debugging.

Additional info

The problem might depend on the selected locale / language. My Windows machine has a mixture of English (United States) and Switzerland. Other users reports problems with German settings.

The core of the problem likely are the Cyrillic filenames 1986ве1т.cfg and к1879xб1я.cfg in OpenOCD (see https://sourceforge.net/p/openocd/code/ci/master/tree/tcl/target/). The tar file format has no robust and standardized way for representing such filenames across all platforms. If the tar file is created with UTF-8 encoding, the same encoding must be used for decoding. Otherwise the current encoding is used to decode the filenames, resulting in problems.

On my Mac, there was no problem unpacking the file. So as a workaround, I downloaded the file https://bintray.com/platformio/dl-packages/download_file?file_path=tool-openocd-windows_amd64-2.1000.200628.tar.gz on my Mac, unpacked it, copied to Windows, renamed it to tool-openocd and put it in the right place.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ivankravetscommented, Aug 25, 2020

Sorry 😦 It was my typo. Now it has been finally fixed. Please re-run pio update.

0reactions
LupinIIIcommented, Sep 14, 2020

@LupinIII fixed tool-openocd-esp32 package too. Please re-run pio update.

The installation was now succesful.

Tool Manager: Installing platformio/tool-openocd-esp32 @ 1.1000.20190709
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Tool Manager: tool-openocd-esp32 @ 1.1000.20190709 has been installed!
Read more comments on GitHub >

github_iconTop Results From Across the Web

OpenOCD installation Issue - Development Platforms
Hi! I am trying to install espressif32 platform on PlatformIO on Visual Studio Code on Win10. However, I got the follow error messages,....
Read more >
Installing the Cross Tools for ARM - Apache Mynewt
This page shows you how to install the tools to build, run, and debug Mynewt OS applications that run on supported ARM target...
Read more >
Getting OpenOCD
In other words, installing OpenOCD is as easy as running an apt-get install openocd command in Debian GNU/Linux (and derivatives), emerge openocd in...
Read more >
How to install the xPack OpenOCD binaries
The easiest way to install OpenOCD is by using the binary xPack, available as @xpack-dev-tools/openocd from the npmjs.com registry.
Read more >
Installing Old Versions of VisualGDB Packages
Check the "Show old packages" checkbox at the bottom of the Package Manager window. VisualGDB will show the old versions of all available...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found