Open-CMSIS-Pack / devtools

Open-CMSIS-Pack development tools - C++
Apache License 2.0
69 stars 50 forks source link

`cbuild setup USB_Device.csolution.yml --context-set` does not evaluate configurations #1568

Open ReinhardKeil opened 2 weeks ago

ReinhardKeil commented 2 weeks ago

Describe the bug cbuild setup USB_Device.csolution.yml --context-set does not evaluate layer configurations when the file *.cbuild-set.yml exists already.

To Reproduce To duplicate use MDK-Middleware example as described here: https://github.com/Open-CMSIS-Pack/Create-Scalable-SW/blob/main/Demo/MDK-MW_RefApp.md (see also issue #1562)

Steps to reproduce the behavior:

Content USB_Device.csolution.yml:

  target-types:
    - type: B-U585I-IOT02A
      board: STMicroelectronics::B-U585I-IOT02A
#      variables:
#        - Board-Layer: $SolutionDir()$/../../../../ST_B-U585I-IOT02A_BSP/Layers/usbd/Board.clayer.yml

Content USB_Device.cbuild-set.yml

cbuild-set:
  generated-by: csolution version 2.5.0-devint1
  contexts:
    - context: HID.Debug+B-U585I-IOT02A

Using cbuild setup USB_Device.csolution.yml --context-set no configurations: in cbuild-idx.yml are present.

Expected behavior

Using cbuild setup USB_Device.csolution.yml the configurations: are correctly evaluated, this is also the expected behavior in above case. The evaluation of layers should consider all context, even when a specific context-set is used.

Environment (please complete the following information):

ReinhardKeil commented 2 days ago

cbuild 2.5.0-devint3 delivers this output with --verbose and --debug

Image