Open-CMSIS-Pack / devtools

Open-CMSIS-Pack development tools - C++
Apache License 2.0
74 stars 57 forks source link

Header files that are excluded by condition should not be in *.cbuild.yml files #1800

Open ReinhardKeil opened 3 weeks ago

ReinhardKeil commented 3 weeks ago

Describe the bug

The attached project is configured without TrustZone (this should be anyway default, but the cproject.yml specifies this explicit).

The CMSIS.pdsc defines:

   <component Cclass="CMSIS" Cgroup="CORE" Cversion="6.1.0"  condition="ARMv6_7_8-M Device" >
      <description>CMSIS-CORE for Cortex-M, SC000, SC300, Star-MC1, ARMv8-M, ARMv8.1-M</description>
      <files>
        <file category="header"  name="CMSIS/Core/Include/tz_context.h" condition="TrustZone"/>

To Reproduce

Use this project and run cbuild setup CubeMX.zip

Expected behavior

tz_context.h should not be included in *.cbuild.yml

  components:
    - component: ARM::CMSIS:CORE@6.1.0
      files:
        - file: ${CMSIS_PACK_ROOT}/ARM/CMSIS/6.1.0/CMSIS/Core/Include/tz_context.h    # this is wrong
          category: header
          version: 6.1.0

Environment (please complete the following information):

jkrech commented 3 weeks ago

The condition in the pdsc file checks for Dtz but not Dsecure

    <condition id="TrustZone">
      <description>TrustZone</description>
      <require Dtz="TZ"/>
    </condition>

Dtz is set by the device description The trustzone node sets the Software Model Selection Dsecure