Skip to content

[csolution] Provide a way to find out project-context specific values of variables #2287

@jkrech

Description

@jkrech

Describe The Problem To Be Solved
a) When a filename of a project is specified using a variable, the file cannot be opened from the CMSIS View
(see: ARM-software/vscode-cmsis-csolution#159)
b) When a layer is specified using a variable the file cannot be opened from the editor display *.cproject.yml file
(see: ARM-software/vscode-cmsis-csolution#250)

Suggest A Solution
a) csolution creates a Dictionary listing all variables and their values per project-context
b) *.cbuild.yml lists files with and without variable

a)

variables:
        - Board-Layer: $SolutionDir()$/Board/B-U585I-IOT02A/Board.clayer.yml
layers:
  - layer: $Board-Layer$

cbuild-idx.yml

  cbuilds:
    - cbuild: out/DataTest/STM32U585AIIx/DebugRec/DataTest.DebugRec+STM32U585AIIx.cbuild.yml
      project: DataTest
      configuration: .DebugRec+STM32U585AIIx
      clayers:
        - clayer: Board/B-U585I-IOT02A/Board.clayer.yml
          ref: $Board-Layer$

b)
cproject.yml:

  groups:
    - group: Source
      files:
        - file: test_$TargetType$.c

cbuild.yml:

        - file: ../../../../datatest/test_STM32U585AIIx.c
          category: sourceC
          ref: test_$TargetType$.c

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions