ARM-software / vscode-cmsis-csolution

Extension support for VS Code CMSIS Project Extension
https://marketplace.visualstudio.com/items?itemName=Arm.cmsis-csolution
Other
25 stars 5 forks source link

Display all board revisions provided by different packs #97

Open TeoMahnic opened 1 week ago

TeoMahnic commented 1 week ago

Display all available board revisions if installed packs provide different board revisions. Only one is currently shown in the Create new solution - Target Board menu.

Example of current behavior

Install the following packs:

cpackget add Keil::STM32F7xx_DFP@2.16.0
cpackget add Keil::STM32F7xx_DFP@3.0.0
cpackget add Keil::STM32F769I-EVAL_BSP@1.0.0

Use Create new solution button in VS Code. In the Target Board dropdown only STM32F769I-EVAL (Rev.A) is listed. The behavior is not reproducible every time, sometimes only STM32F769I-EVAL (Rev.B) is listed.

image

Environment

Possible workaround

Remove pack which provides the unwanted board revision.

jkrech commented 1 week ago

My expectation is that we would only read the latest version of a pack for listing boards and devices when we start a new project. Since the board is not present in the latest pack version Keil::STM32F7xx_DFP@3.0.0 I would expect to always see Rev. B.

After installing a pack using cpackget, have you restarted VSCode?

TeoMahnic commented 1 week ago

VS Code was not running during installation of the mentioned packs and was only reopened after all packs were successfully installed.

thorstendb-ARM commented 1 week ago

Seems to toggle on CTRL-R (reload VSCode), and stable when closing and opening "Create new".

ReinhardKeil commented 1 week ago

My expectation is that we would only read the latest version of a pack for listing boards and devices when we start a new project. Since the board is not present in the latest pack version Keil::STM32F7xx_DFP@3.0.0 I would expect to always see Rev. B.

After installing a pack using cpackget, have you restarted VSCode?

I would argue that it should show both board revisions. Customers may still have Rev A. and there might be a hardware difference.

thorstendb-ARM commented 1 week ago

Duplicates on name get filtered out in UI for some reason. After disabling the filtering: image

Why do they toggle? The position in the array changes, and the first entry wins :-)

thorstendb-ARM commented 1 week ago

See PR, removed duplicate filter. Imho boards with the same name but different rev. should appear both. If boards with the same name, vendor and rev. will now appear ("exact duplicates") we should think about handling them in CoreTools, because in the array CSolution "Create new" receives, it seems random which one is first in the array.

jkrech commented 1 week ago

I would argue that it should show both board revisions. Customers may still have Rev A. and there might be a hardware difference.

We are removing the filtering of boards with different Brevision which is expected to show both boards

In my view a mistake was made by the Pack Vendor: STM32F769I-EVAL (Rev.A) is described in Keil::STM32F7xx_DFP@2.16.0 but no longer in the next pack revision: Keil::STM32F7xx_DFP@3.0.0 nor in the newly introduced dedicated BSP, instead only STM32F769I-EVAL (Rev.B) is described in Keil::STM32F769I-EVAL_BSP@1.0.0

I am not sure if we should expect that the discovery of boards and devices must read through all pack versions or we just read the latest pack version.

Note that only Rev B is listed on keil.arm.com: https://www.keil.arm.com/boards/?q=STM32F769I-EVAL

ReinhardKeil commented 1 week ago

Yes, I agree. If a later version of the pack only contains Rev. B we should only show Rev. B.

We should review how packs are loaded by the system. IMHO It should only load latest for the Create New Solution workflow.