Open-CMSIS-Pack / Open-CMSIS-Pack-Spec

Common Microcontroller Software Interface Standard - Pack(age) based distribution system
https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/
Apache License 2.0
53 stars 21 forks source link

Extend clayers element with 'path' and 'copy-to' attributes #305

Closed ReinhardKeil closed 5 months ago

ReinhardKeil commented 5 months ago

Proposed changes to clayer element:

Attribute Description Type Use
path Path to the directory that contains the layer xs:string required
file Name of the *.clayer.yml file (optional with relative path to the directory specified with path) xs:string required
copy-to Path that used to copy the layer into the csolution project (default is attribute path) xs:string optional

Examples:

<csolution> 
  <clayer path="layers/board/FRDM-MCXA153-MW" file="Board.clayer.yml" copy-to="board/FRDM-MCXA153" condition="myId" />
  <clayer path="board/FRDM-MCXA153" file="Board.clayer.yml" condition="myId"/>
</csolution>
RobertRostohar commented 5 months ago

Specifying copy-to in the pack pdsc might present some issue. Since there are no explicit rules, the pack creators could use non unique path which would result in overriding files. Should the copy-to be actually a tool option rather than specifying it in a pack?