ARM-software / vscode-cmsis-csolution

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

Create new solution is broken for simple examples #99

Open RobertRostohar opened 1 month ago

RobertRostohar commented 1 month ago

Type: Bug Report

Describe the bug

Starting a new solution based on existing CMSIS Solution examples incorrectly copies the contents from the pack. It seems that the project directory is copied twice and not completely. Sometimes only some files are copied and sometimes some files are corrupted (have only partial contents).

Also note that the specified 'Solution Name' is only used for the directory name within the 'Solution Location'. The actual name of the solution is taken from the pack. This is misleading.

To Reproduce Steps to reproduce the behavior:

Install at least the following CMSIS packs:

Example A: Simple example (solution and project yml files in the same directory)

  1. Go to 'Create a New solution'
  2. Select 'Target Board': STM32H743-EVAL
  3. Select 'Template, Reference Applications, and Examples:' CMSIS SOLUTION EXAMPLE - Blinky
  4. Chose 'Solution Location'
  5. Disable 'Initialize Git repository'
  6. Click on 'Create'
  7. Go to 'Explorer' and observe the copied files to the Solution location. It will contain duplicates in the 'Blinky' sub-directory. But some files are missing (ex: 'retarget_stdio.c'), and build fails.

Screenshot 2024-10-24 142130

Example B: Simple example (solution with two projects in sub-directories)

Steps are the same as for example A, except that the 'Target Board' is STM32H745I-DISCO. Results also in duplicated files when copying the project and with missing or corrupted files.

Expected behavior The project files from the pack should be copied to the specified location as they are found in the pack (no duplication or corruption).

ReinhardKeil commented 1 month ago

Internal reference MCUTO-380