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

cbuild setup with --packs option should install required packs #1819

Open
ReinhardKeil opened this issue Oct 21, 2024 · 3 comments
Open

cbuild setup with --packs option should install required packs #1819

ReinhardKeil opened this issue Oct 21, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@ReinhardKeil
Copy link
Collaborator

Describe the bug

When a BSP is loaded that requests a DFP with a certain version, the command cbuild setup with --packs option should install the required pack.

To Reproduce

Install these packs:

Use this project: Simple_Device_project.zip

Execute cbuild setup, it should show the following errors:

cbuild setup Simple.csolution.yml --packs --context-set
error csolution: no component was found with identifier 'Device:Config Tools:Init'
error csolution: processing context 'Simple.Debug+MCXN947VDF' failed

Expected behavior

cbuild downloads the required DFP pack 19.0.0, see:
https://github.com/VladimirUmek/NXP_FRDM-MCXN947_BSP/blob/main/NXP.FRDM-MCXN947_BSP.pdsc#L20

Note: cpackget add installs required packs, but I have used the uVision PackInstaller with a click on the pack file.

Environment (please complete the following information):

  • CMSIS-Toolbox 2.6.1
  • OS: Windows
@jkrech
Copy link
Member

jkrech commented Oct 24, 2024

Note that cbuild is intentionally calling cpackget --no-dependencies, fully relying on csolution to evaluate dependencies, in order to avoid that unnecessary pack versions get installed. Some packs require other packs only under certain circumstances, however all used pack versions required by a CMSIS solution project are known by csolution.

@ReinhardKeil
Copy link
Collaborator Author

ReinhardKeil commented Oct 24, 2024

The call with --no-dependencies was implemented as some packs had a long requirement list and forced in this way the installation of many unrelated packs. The requirement list in PDSC is therefore not representing a must have list of packs, but more a recommendation that packs outside the required version range will not work.

This is what we got:

MCXN947_BSP requires DFP 19.0.0 or higher to work.
Template project contains no pack versions which avoids that it needs to be constantly updated. But it lists the right packs (so this requirement list is correct, just versions are missing).

Potential solution:

Once the requested packs by the project are loaded, use the requirement list in the PDSC to check if pack versions are matching. At least this could result in an user notification.

Proposed output:

warning: pack NXP.FRDM-MCXN947_BSP requires pack NXP::[email protected] or higher

@ReinhardKeil ReinhardKeil added enhancement New feature or request and removed bug Something isn't working labels Oct 24, 2024
@jkrech
Copy link
Member

jkrech commented Oct 28, 2024

Looks like we were drawing the wrong conclusions in #1356 where we abandoned the check behind a debug flag but listing all required packs regardless whether they are loaded by the solution or not.
The proposal above limits the requirements check between pack versions that are already selected/loaded.

@jkrech jkrech moved this to Backlog in CMSIS-Toolbox 2.7.0 Oct 28, 2024
@brondani brondani moved this from Backlog to In progress in CMSIS-Toolbox 2.7.0 Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In progress
Development

No branches or pull requests

3 participants