Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing context target results in CMake Error: cache does not match #1889

Closed
ReinhardKeil opened this issue Dec 6, 2024 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@ReinhardKeil
Copy link
Collaborator

A change to Target Type results in this error:

-- stderr output is:
CMake Error: The source "C:/w/AWS_MQTT_Demo/tmp/Demo.Debug+MyBoard/CMakeLists.txt" does not match the source "C:/w/AWS_MQTT_Demo/tmp/Demo.Debug+AVH/CMakeLists.txt" used to generate cache.  Re-run cmake with a different source directory.

CMake Error at C:/w/AWS_MQTT_Demo/tmp/Demo.Debug+MyBoard/src/Demo.Debug+MyBoard-stamp/Demo.Debug+MyBoard-configure-.cmake:47 (message):
  Stopping after outputting logs.

To Reproduce

  1. Use https://github.com/Arm-Examples/AWS_MQTT_Demo and modify Demo.csolution.yml as shown here:
  packs:
    - pack: ARM::V2M_MPS3_SSE_300_BSP@1.5.0
    - pack: Keil::NUCLEO-F756ZG_BSP@2.0.0 # Add BSP
    - pack: Keil::STM32F7xx_DFP@3.0.0
    - pack: ARM::CMSIS-Driver@2.10.0 # Add CMSIS-Driver for WiFi Shields

  
  target-types:
    # This target is a AVH-FVP simulation model that does not require hardware
    - type: AVH
      board: ARM::V2M-MPS3-SSE-300-FVP
      variables:
        - Board-Layer: $SolutionDir()$/Board/AVH_MPS3_Corstone-300/Board.clayer.yml
        - Shield-Layer: ""
        - Socket-Layer: $SolutionDir()$/Socket/VSocket/Socket.clayer.yml

    - type: MyBoard
      board: NUCLEO-F756ZG
      variables:
        - Board-Layer: $SolutionDir()$/Board/NUCLEO-F756ZG/Board.clayer.yml
        - Shield-Layer: $SolutionDir()$/Shield/WiFi/Sparkfun_ESP8266/Shield.clayer.yml
        - Socket-Layer: $SolutionDir()$/Socket/WiFi/Socket.clayer.yml
  1. Change Target-Type (using VS Code)

image

This results in the error.

Note: A click on the Status bar does not open Output - CMSIS Solution

Environment:

  • cbuild: Build Invocation v2.6.1-25-g3f083c7
@ReinhardKeil ReinhardKeil added the bug Something isn't working label Dec 6, 2024
@jkrech jkrech moved this to Backlog in CMSIS-Toolbox 2.7.0 Dec 6, 2024
@brondani brondani moved this from Backlog to In progress in CMSIS-Toolbox 2.7.0 Dec 6, 2024
brondani added a commit to Open-CMSIS-Pack/cbuild that referenced this issue Dec 9, 2024
## Fixes
<!-- List the issue(s) this PR resolves -->

- Open-CMSIS-Pack/devtools#1889

## Changes
<!-- List the changes this PR introduces -->

- Fix regression introduced in
#343

## Checklist
<!-- Put an `x` in the boxes. All tasks must be completed and boxes
checked before merging. -->

- [ ] 🤖 This change is covered by unit tests as required.
- [x] 🤹 All required manual testing has been performed.
- [x] 🛡️ Security impacts have been considered.
- [x] 📖 All documentation updates are complete.
- [x] 🧠 This change does not change third-party dependencies
@brondani brondani moved this from In progress to In review in CMSIS-Toolbox 2.7.0 Dec 9, 2024
@jkrech
Copy link
Member

jkrech commented Dec 10, 2024

Using CMSIS-Toolbox from nightly build from 2024-12-09 the switching of targets works flawless:

Enqueue: cbuild setup c:\workspace\github\AWS_MQTT_Demo\Demo.csolution.yml --context-set --packs --update-rte
Execute: cbuild setup c:\workspace\github\AWS_MQTT_Demo\Demo.csolution.yml --context-set --packs --update-rte
+-------------------------------------------
(1/1) Cleaning context: "Demo.Debug+MyBoard"
+---------------------------------------------
(1/1) Setting up context: "Demo.Debug+MyBoard"
[1/1] C:\WINDOWS\system32\cmd.exe /C "cd /D C:\workspace\github\AWS_MQTT_Demo\tmp\1 && C:\Users\jkrech\.vcpkg\artifacts\2139c4c6\tools.kitware.cmake\3.28.4\bin\cmake.exe -E make_directory C:/workspace/github/AWS_MQTT_Demo/out/Demo/MyBoard/Debug && C:\Users\jkrech\.vcpkg\artifacts\2139c4c6\tools.kitware.cmake\3.28.4\bin\cmake.exe -E copy_if_different C:/workspace/github/AWS_MQTT_Demo/tmp/1/compile_commands.json C:/workspace/github/AWS_MQTT_Demo/out/Demo/MyBoard/Debug"

Completed: cbuild succeed with exit code 0

@jkrech jkrech closed this as completed Dec 10, 2024
@github-project-automation github-project-automation bot moved this from In review to Done in CMSIS-Toolbox 2.7.0 Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

3 participants