Open-CMSIS-Pack / devtools

Open-CMSIS-Pack development tools - C++
Apache License 2.0
76 stars 58 forks source link

`cbuild setup --packs` does not install missing packs requested by layers #1841

Open ReinhardKeil opened 2 weeks ago

ReinhardKeil commented 2 weeks ago

Describe the bug

When a pack that is referenced by a layer is missing, the layer detection fails with:

cbuild setup USB_Device.csolution.yml --context-set --packs --update-rte
error csolution: required pack: ARM::CMSIS-Compiler@2.1.0 not installed
error csolution: no compatible software layer found. Review required connections of the project

To Reproduce

Install these packs:

ARM::CMSIS@6.1.0
ARM::CMSIS-Driver_STM32
Keil::B-U585I-IOT02A_BSP@2.0.0
Keil::MDK-Middleware@8.0.0
Keil::STM32U5xx_DFP@3.0.0

Make sure that ARM::CMSIS-Compiler pack is not installed!

Then use the USB_Device example configured for board: STMicroelectronics::B-U585I-IOT02A as shown above.

Expected behavior

The layer detection does not fail due to missing packs referenced by a potential layer. Once the layer is specified, the --pack option downloads the pack.

Environment (please complete the following information):

jkrech commented 2 weeks ago

Root cause: today the list layers command reads all pdsc file from packs listed in potentially matching layers and therefore reports missing packs and results in the corresponding layer not matching.