pyocd / cmsis-pack-manager

A Rust and Python module for handling CMSIS Pack files
Apache License 2.0
28 stars 35 forks source link

Failure to download STM32F4xx DFP #95

Closed flit closed 5 years ago

flit commented 5 years ago

If the Python API is used to download the Keil::STM32F4xx_DFP::2.13.0 pack, you get this file instead:

<?xml version="1.0" encoding="utf-8"?><Error><Code>BlobNotFound</Code><Message>The specified blob does not exist.
RequestId:00ffc5ad-601e-00b2-3a34-f61678000000
Time:2019-04-18T22:14:45.2212973Z</Message></Error>

Downloading manually from http://www.keil.com/dd2/pack works fine.

flit commented 5 years ago

Fyi, created internal issue SDMDK-8487. Not sure if the problem is with cpm or the Keil server.

At the very least, cpm should look at the contents of the file it downloaded and check that it's a valid zip file, maybe even check for this error report.

flit commented 5 years ago

Root cause identified: If the URL in the element in the PDSC does not have a trailing slash, CPM fails to properly construct the pack's full URL. Confirmed by editing the Keil.STM32F4xx_DFP.2.13.0.pdsc file in the CPM index and re-downloading, which was successful.

theotherjimmy commented 5 years ago

Oh, interesting. I'll have to make sure that the trailing slash is added correctly.

theotherjimmy commented 5 years ago

Note to self: pack-manager cache devs STM32F411RETx reproduces the behavior.

theotherjimmy commented 5 years ago

https://github.com/ARMmbed/cmsis-pack-manager/blob/17e6a6d6f3f99c50c1211152e0d0df706649887d/rust/cmsis-update/src/dl_pack.rs#L22 facepalm Fix incoming.