pyOCD
pyOCD copied to clipboard
pack download failures
"pyocd pack find stm32l" does not seem to work on across a few versions of pyOCD as well across linux and windows. In particular this did not work for when I was trying to do it for the stm32l011, but it does not seem to find any packs with the name stm32l.
Have you tried to run pyocd pack update
first?
I just tried the following:
$ pip install -U pyocd cmsis-pack-manager
[...]
$ pyocd pack update
0000411 I Updating pack index... [pack_cmd]
20:44:52 [INFO] Downloaded http://www.keil.com/pack/index.pidx
20:44:52 [INFO] Found 832 Pdsc entries
[...]
$ pyocd pack find stm32l011
Part Vendor Pack Version Installed
---------------------------------------------------------------------------------
STM32L011D3Px STMicroelectronics Keil.STM32L0xx_DFP 2.2.0 False
STM32L011D4Px STMicroelectronics Keil.STM32L0xx_DFP 2.2.0 False
STM32L011E3Yx STMicroelectronics Keil.STM32L0xx_DFP 2.2.0 False
STM32L011E4Yx STMicroelectronics Keil.STM32L0xx_DFP 2.2.0 False
STM32L011F3Px STMicroelectronics Keil.STM32L0xx_DFP 2.2.0 False
STM32L011F3Ux STMicroelectronics Keil.STM32L0xx_DFP 2.2.0 False
STM32L011F4Px STMicroelectronics Keil.STM32L0xx_DFP 2.2.0 False
STM32L011F4Ux STMicroelectronics Keil.STM32L0xx_DFP 2.2.0 False
STM32L011G3Ux STMicroelectronics Keil.STM32L0xx_DFP 2.2.0 False
STM32L011G4Ux STMicroelectronics Keil.STM32L0xx_DFP 2.2.0 False
STM32L011K3Tx STMicroelectronics Keil.STM32L0xx_DFP 2.2.0 False
STM32L011K3Ux STMicroelectronics Keil.STM32L0xx_DFP 2.2.0 False
STM32L011K4Tx STMicroelectronics Keil.STM32L0xx_DFP 2.2.0 False
STM32L011K4Ux STMicroelectronics Keil.STM32L0xx_DFP 2.2.0 False
I have the same issue when I'm trying to install a pack . Pack update reports :11:53:56 [WARN] XML error: Expecting </P> found </BODY>
$ pyocd pack install stm32l475xg
0001747 W No matching devices. Please make sure the pack index is up to date. [pack_cmd]
$ pyocd pack update
11:53:53 [INFO] Downloaded http://www.keil.com/pack/index.pidx
11:53:53 [INFO] Found 832 Pdsc entries
11:53:53 [WARN] No Core found!32)
11:53:53 [WARN] No Core found!
11:53:53 [WARN] No Core found!
11:53:53 [WARN] No Core found!
11:53:53 [WARN] No Core found!
11:53:53 [WARN] No Core found!
11:53:53 [WARN] No Core found!
11:53:53 [WARN] No Core found!
11:53:53 [WARN] No Core found!
11:53:53 [WARN] No Core found!
11:53:53 [WARN] No Core found!
I did try that pyocd pack update, but I get a similar issue to tonika31. It does not seem to update properly as the pyocd pack find stm32l command still does not work after that.
@carlVirtualincision / @tonika31: what versions of pyocd
and cmsis-pack-manager
packages are you using?
@carlVirtualincision / @tonika31: what versions of
pyocd
andcmsis-pack-manager
packages are you using?
$ pyocd --version
0.34.3
which command i should type to see the cmsis-pack-manager version
% pip show cmsis-pack-manager
Name: cmsis-pack-manager
Version: 0.5.1
Summary: Python manager for CMSIS-Pack index and cache with fast Rust backend
[...]
% pip show cmsis-pack-manager Name: cmsis-pack-manager Version: 0.5.1 Summary: Python manager for CMSIS-Pack index and cache with fast Rust backend [...]
$ pip show cmsis-pack-manager
Name: cmsis-pack-manager
Version: 0.5.1
Summary: Python manager for CMSIS-Pack index and cache with fast Rust backend
I am encountering the same issue while setting up a new PC to debug an STM32 MCU.
$ pyocd --version
0.34.3
$ pip show cmsis-pack-manager
Name: cmsis-pack-manager
Version: 0.5.1
Summary: Python manager for CMSIS-Pack index and cache with fast Rust backend
Home-page:
Author: Jimmy Brisson <[email protected]>, Chris Reed <[email protected]>, Mathias Brossard <[email protected]>
Author-email: Jimmy Brisson <[email protected]>, Chris Reed <[email protected]>, Mathias Brossard <[email protected]>
License: Apache-2.0
Location: /home/dev/.local/lib/python3.10/site-packages
Requires: appdirs, cffi, pyyaml
Required-by: pyocd
$ pyocd pack install stm32u*
01:05:01 [INFO] Downloaded http://www.keil.com/pack/index.pidx
01:05:01 [INFO] Found 833 Pdsc entries
01:05:25 [WARN] No Core found!33)
01:05:25 [WARN] No Core found!
01:05:25 [WARN] No Core found!
01:05:25 [WARN] No Core found!
... (more of the same)
01:05:25 [WARN] XML error: Expecting </link> found </head>
.... (more of the same)
01:05:26 [WARN] cannot parse integer from empty string
... (more of the same)
01:05:26 [WARN] Support for two parent processors not implemented!
... (more of the same)
01:05:26 [WARN] XML error: Expecting </P> found </BODY>
01:05:26 [WARN] XML error: Expecting </P> found </BODY>
01:05:26 [WARN] XML error: Expecting </P> found </BODY>
01:05:26 [WARN] XML error: Expecting </P> found </BODY>
01:05:26 [WARN] XML error: Expecting </P> found </BODY>
01:05:26 [WARN] XML error: Expecting </P> found </BODY>
01:05:26 [WARN] XML error: Expecting </P> found </BODY>
01:05:26 [WARN] XML error: Expecting </P> found </BODY>
01:05:26 [WARN] XML error: Expecting </P> found </BODY>
01:05:26 [WARN] No Core found!
01:05:26 [WARN] XML error: Expecting </P> found </BODY>
0089853 W No matching devices. Please make sure the pack index is up to date. [pack_cmd]
I'm trying this on both my Windows host, as well as Ubuntu 22.04 under WSL2 and getting the same result. I also tried rolling back to earlier versions of PyOCD and cmsis-pack-manager with no luck.
A new version of cmsis-pack-manager
(0.5.2) is being published that addresses an issue where PDSC file downloads might fail because too many downloads are started concurrently. This might explain the different observations in this issue.
I have pyocd .0.34.3 and cmsis-pack-manager 0.5.2 and I cant update. If I try I get the same XML error and more as @elliott-col posted.
Any fix?
@larsfagerbakke We haven't been able to reliably reproduce any issues since cmsis-pack-manager v0.5.2. I have seen errors downloading only NXP packs on very rare occasions, but they immediately went away next time I tried. @mathias-arm hasn't seen the errors at all, afaik.
Could you please provide the log output you see? The "XML error: Expecting </P>…" errors were caused by mishandling of errors in earlier versions that resulting in downloading of HTML responses to 404 errors (returned by the server because of too many simultaneous requests). CPM now correctly handles HTTP error responses (not taking into account possible bugs), so it won't try to parse HTML pages and therefore should not report similar XML parsing errors.
The errors from 404 responses now look like this (clearly not the most user-friendly):
20:12:31 [ERROR] download of Url { scheme: "http", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("ziweixing.workspacep5.webfoss.com")), port: None, path: "/uploads/XMC.CX32L003_DFP.pdsc", query: None, fragment: None } failed: Response code in invalid range: 404
(This is from a pack hosted on a server that apparently isn't running anymore, or the vendor provided an invalid path.)
So, if you are still seeing XML parsing errors, there's something new and different happening, or a variant of a previous problem.
Note that you can always download CMSIS-Packs manually from https://www.keil.com/dd2/pack/ and use the --pack
argument with pyocd (or the pack
session option). See the docs for more.
@mathias-arm I think the error @larsfagerbakke reports is the one I saw but couldn't reproduce.