Open-CMSIS-Pack / devtools

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

Access Sequence without build or target type should resolve with --context-set #1587

Closed ReinhardKeil closed 1 day ago

ReinhardKeil commented 1 week ago

Describe The Problem To Be Solved

The example https://github.com/ReinhardKeil/csolution-examples/blob/V2.5.0/SimpleTrustZone uses a context-set:

cbuild-set:
  generated-by: csolution version 2.5.0-devint2
  contexts:
    - context: CM33_s.Release+AVH
    - context: CM33_ns.Debug+AVH

And it has an Access Sequence without build/target type to access the secure part (in CM33_ns.cproject.yml):

    - group: CMSE Library
      files:
        - file: $cmse-lib(CM33_s)$

Currently it compiles with thes errors:

C:\w\csolution-examples\SimpleTrustZone>cbuild SimpleTZ.csolution.yml -S
+----------------------------
Building "CM33_s.Release+AVH"
CMake Error at CMakeLists.txt:80 (add_dependencies):
  The dependency target "CM33_s.Debug+AVH" of target
  "CM33_ns.Debug+AVH-build" does not exist.

CMake Generate step failed.  Build files cannot be regenerated correctly.
error cbuild: exit status 1
+---------------------------
Building "CM33_ns.Debug+AVH"
CMake Error at CMakeLists.txt:80 (add_dependencies):
  The dependency target "CM33_s.Debug+AVH" of target
  "CM33_ns.Debug+AVH-build" does not exist.

CMake Generate step failed.  Build files cannot be regenerated correctly.
error cbuild: exit status 1
+------------------------------------------------------------
Build summary: 0 succeeded, 2 failed - Time Elapsed: 00:00:00
+============================================================

Suggest A Solution

When using a context-set effectively this should resolve in the current selected context:

        - file: $cmse-lib(CM33_s.Release+AVH)$

It should be also possible to mix build-types of projects. However there should be a check that the same target-type is used across the project.

Versions