Fails to install package tool-openocd on Windows
See original GitHub issueConfiguration
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
- Delete package from
C:\Users\username\.platformio\packages
- 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:
- Created 3 years ago
- Comments:11 (4 by maintainers)
Sorry 😦 It was my typo. Now it has been finally fixed. Please re-run
pio update
.The installation was now succesful.