Skip to content

add download timeouts for PDSC entries, log error to STDOUT #242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

danieldegrasse
Copy link

@danieldegrasse danieldegrasse commented Jun 6, 2025

Add a timeout of 5 seconds on downloads of PDSC entries, and log an error to stdout. This way broken PDSC entries do not hang the pyocd pack update command

Without this change:

$ pyocd pack clean
$ pyocd pack update
0000154 I Updating pack index... [pack_cmd]
Downloading descriptors (1611/1631) # command hangs here, does not complete

With this change:

$ pyocd pack clean
$ pyocd pack update
0000154 I Updating pack index... [pack_cmd]
17:44:58 [ERROR] Download of https://www.nsing.com.sg/uploadfile/file/pack/NSING.N32G05x_DFP.pdsc failed: Response code in invalid range: 500
17:44:58 [ERROR] Download of https://www.nsing.com.sg/uploadfile/file/pack/NSING.N32G030_DFP.pdsc failed: Response code in invalid range: 500
17:45:01 [ERROR] Download of http://www.ixys.com/Zilog/packs/Zilog.ZNEO32_DFP.pdsc failed: Response code in invalid range: 404
17:45:03 [ERROR] Download of https://www.abov.co.kr/data/mds/PACK/ABOV.A33G53x_Series.pdsc failed: error sending request for url (https://www.abov.co.kr/data/mds/PACK/ABOV.A33G53x_Series.pdsc)
17:45:03 [ERROR] Download of http://www.mcu.com.cn/Cmsemicon.BAT32G135-A.pdsc failed: Response code in invalid range: 404
17:45:03 [ERROR] Download of https://www.geehy.com/uploads/tool/Geehy.G32R5xx_DFP.pdsc failed: error sending request for url (https://www.geehy.com/uploads/tool/Geehy.G32R5xx_DFP.pdsc)
17:45:04 [ERROR] Download of http://www.qorvo.com/extra/keil_pack/Active-Semi.PAC52XX.pdsc failed: Response code in invalid range: 403
17:45:04 [ERROR] Download of http://www.qorvo.com/extra/keil_pack/Active-Semi.PAC55XX.pdsc failed: Response code in invalid range: 403
17:45:05 [ERROR] Download of http://download.analog.com/tools/EZBoards/ADSP-SC83x/Releases/AnalogDevices.ADSP-SC83x_FreeRTOS-OSAL.pdsc failed: error sending request for url (http://download.analog.com/tools/EZBoards/ADSP-SC83x/Releases/AnalogDevices.ADSP-SC83x_FreeRTOS-OSAL.pdsc)
17:45:06 [ERROR] Download of https://www.geehy.com/uploads/tool/Geehy.APM32F4xx_DFP.pdsc failed: error sending request for url (https://www.geehy.com/uploads/tool/Geehy.APM32F4xx_DFP.pdsc)
17:45:06 [ERROR] Download of https://www.geehy.com/uploads/tool/Geehy.APM32E1xx_DFP.pdsc failed: error sending request for url (https://www.geehy.com/uploads/tool/Geehy.APM32E1xx_DFP.pdsc)
17:45:06 [ERROR] Download of https://www.geehy.com/uploads/tool/Geehy.APM32F1xx_DFP.pdsc failed: error sending request for url (https://www.geehy.com/uploads/tool/Geehy.APM32F1xx_DFP.pdsc)
17:45:06 [ERROR] Download of https://www.geehy.com/uploads/tool/Geehy.APM32F0xx_DFP.pdsc failed: error sending request for url (https://www.geehy.com/uploads/tool/Geehy.APM32F0xx_DFP.pdsc)
17:45:06 [ERROR] Download of https://www.geehy.com/uploads/tool/Geehy.APM32F00x_DFP.pdsc failed: error sending request for url (https://www.geehy.com/uploads/tool/Geehy.APM32F00x_DFP.pdsc)
17:45:06 [ERROR] Download of https://ftp.willert.de/downloads/Keil/Pack/RXF/SodiusWillert.RXF.pdsc failed: Response code in invalid range: 404
17:45:07 [ERROR] Download of http://download.analog.com/tools/EZBoards/COG_4050/Releases/AnalogDevices.EV-COG-AD4050LZ_BSP.pdsc failed: error sending request for url (http://download.analog.com/tools/EZBoards/COG_4050/Releases/AnalogDevices.EV-COG-AD4050LZ_BSP.pdsc)
17:45:07 [ERROR] Download of http://download.analog.com/tools/EZBoards/COG_AD3029/Releases/AnalogDevices.EV-COG-AD3029LZ_BSP.pdsc failed: error sending request for url (https://download.analog.com/tools/EZBoards/COG_AD3029/Releases/AnalogDevices.EV-COG-AD3029LZ_BSP.pdsc)
17:45:07 [ERROR] Download of http://download.analog.com/tools/EZBoards/CM302x/Releases/AnalogDevices.ADuCM302x_DFP.pdsc failed: error sending request for url (http://download.analog.com/tools/EZBoards/CM302x/Releases/AnalogDevices.ADuCM302x_DFP.pdsc)
17:45:08 [ERROR] Download of https://www.geehy.com/uploads/tool/Geehy.APM32A4xx_DFP.pdsc failed: error sending request for url (https://www.geehy.com/uploads/tool/Geehy.APM32A4xx_DFP.pdsc)
17:45:09 [ERROR] Download of http://www.advsolned.com/armpack/ASN.Filter_Designer.pdsc failed: Response code in invalid range: 403
17:45:10 [ERROR] Download of https://geehy.com/uploads/tool/APEXMIC.APM32F1xx_DFP.pdsc failed: error sending request for url (https://geehy.com/uploads/tool/APEXMIC.APM32F1xx_DFP.pdsc)
17:45:11 [ERROR] Download of https://www.geehy.com/uploads/tool/Geehy.APM32S1xx_DFP.pdsc failed: error sending request for url (https://www.geehy.com/uploads/tool/Geehy.APM32S1xx_DFP.pdsc)
17:45:11 [ERROR] Download of https://www.geehy.com/uploads/tool/Geehy.APM32A0xx_DFP.pdsc failed: error sending request for url (https://www.geehy.com/uploads/tool/Geehy.APM32A0xx_DFP.pdsc)
17:45:11 [ERROR] Download of https://www.geehy.com/uploads/tool/Geehy.APM32A10x_DFP.pdsc failed: error sending request for url (https://www.geehy.com/uploads/tool/Geehy.APM32A10x_DFP.pdsc)
17:45:11 [ERROR] Download of https://www.geehy.com/uploads/tool/Geehy.APM32F035_DFP.pdsc failed: error sending request for url (https://www.geehy.com/uploads/tool/Geehy.APM32F035_DFP.pdsc)
Downloading descriptors (1631/1631)

Command completes and I can use the packs that downloaded correctly

Add a timeout of 5 seconds on downloads of PDSC entries, and log an
error to stdout. This way broken PSDC entries do not hang the
`pyocd pack update` command

Signed-off-by: Daniel DeGrasse <[email protected]>
@maxgerhardt-phy
Copy link

+1! With this issue being present, it breaks some workflows like building containers that do a pyocd pack update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants