Skip to content

[E2E] Create CMSIS Solution from Template #326

Description

@mguzmanm

[E2E] Create CMSIS Solution from Template

User Goal

As an Embedded Developer, I want to create a new CMSIS solution from a supported software template so that I can quickly start development with a correctly configured project structure, device settings, and build environment.

Workflows

Workflow 1: Create Solution from Device Template

Preconditions

  • VS Code workspace is open.
  • CMSIS Solution extension is installed and activated.
  • CMSIS-Toolbox is available.
  • Required CMSIS packs are installed or available for download.
  • At least one supported device is available.

Steps

  1. Open the Create Solution wizard from the CMSIS extension.
  2. Select a target device.
  3. Select a CMSIS software template.
  4. Choose a project location.
  5. Configure the compiler/toolchain.
  6. Complete the wizard and generate the solution.
  7. Open the generated solution.
  8. Build the solution.

Expected Results

  • The Create Solution wizard completes successfully.
  • Solution files are generated in the selected location.
  • A valid .csolution.yml file is created.
  • The solution is automatically discovered by the CMSIS Explorer.
  • Build completes successfully without configuration errors.

Postconditions

  • A new CMSIS solution exists in the workspace.
  • Generated configuration files are valid.
  • The solution is ready for further configuration, build, and debug operations.

E2E Automation Status

  • ✅ Target for the initial implementation.
  • Can be automated using the existing Playwright VS Code test framework.
  • Provides the highest coverage with the lowest dependency on external hardware.
  • Represents the smallest useful e2e test that delivers value and can realistically be implemented first. for Issue Expand E2E Test Coverage #81.

Workflow 2: Create Solution from Reference Application and Virtual Hardware Board

Objective

Create a new CMSIS solution using a Reference Application targeting a Virtual Hardware (VHT) Board, verify that the generated solution can be built, and optionally execute or debug it using the corresponding Arm Virtual Hardware (Fast Model/FVP).

Preconditions

  • VS Code is installed.
  • The CMSIS Solution extension is installed and activated.
  • CMSIS-Toolbox is installed and configured.
  • Required CMSIS packs are installed or can be downloaded.
  • At least one Virtual Hardware Board is available.
  • At least one compatible Reference Application is available for the selected board.
  • The corresponding Arm Virtual Hardware (Fast Model/FVP) for the selected board is installed and accessible from the local machine.
  • Any required Virtual Hardware license or runtime prerequisites are satisfied (if applicable).

Workflow

  1. Open the CMSIS Explorer.
  2. Select Create a New Solution.
  3. In the target selection page, choose a Virtual Hardware Board.
  4. Continue to the Reference Applications section.
  5. Select a compatible Reference Application.
  6. Specify the destination folder and project name.
  7. (Optional) Enable:
    • Initialize Git repository
    • Open project after creation
  8. Click Create.
  9. Wait for the solution generation to complete.
  10. Open the generated solution in VS Code.
  11. Verify that the solution appears in the CMSIS Explorer.
  12. Configure any required software layers.
  13. Build the solution.
  14. Verify that the build completes successfully and generates:
    • the application executable (.elf)
    • the corresponding .cbuild-run.yml file.
  15. (Optional) Execute the application using Run.
  16. Verify that the CMSIS extension launches the configured Virtual Hardware (Fast Model/FVP) and loads the generated executable.
  17. (Optional) Start a Debug session.
  18. Verify that the debugger attaches to the Virtual Hardware target and supports standard debugging operations (breakpoints, stepping, register/memory inspection).

Expected Results

  • The selected Virtual Hardware Board is accepted.
  • Compatible Reference Applications are listed for selection.
  • The solution is generated without errors.
  • A valid .csolution.yml file is created.
  • The generated solution contains the correct:
    • Board
    • Device
    • Context
    • Pack references
  • The solution is discovered by the CMSIS Explorer.
  • The solution builds successfully.
  • A valid .cbuild-run.yml file is generated for the selected Virtual Hardware target.
  • If Run is selected:
    • the Virtual Hardware (Fast Model/FVP) launches successfully;
    • the generated executable is loaded into the virtual target;
    • the application begins execution.
  • If Debug is selected:
    • a debug session starts successfully against the Virtual Hardware target.

Postconditions

  • A new CMSIS solution exists in the selected location.
  • The solution is based on the chosen Reference Application.
  • The solution targets the selected Virtual Hardware Board.
  • The project is ready for configuration, build, run, and debug using either Virtual Hardware or compatible physical hardware.

Automation Notes

  • Suitable for End-to-End (E2E) automation.
  • Requires a deterministic Reference Application and Virtual Hardware Board pair.
  • The required Fast Model/FVP must be pre-installed on the test environment.
  • Build verification can be fully automated.
  • Run verification should confirm that the Virtual Hardware process starts successfully and loads the generated executable.
  • Debug verification should confirm that a debug session can be established with the Virtual Hardware target.

Workflow 3: Create Solution from Board Template

Preconditions

  • VS Code workspace is open.
  • CMSIS Solution extension is installed and activated.
  • CMSIS-Toolbox is available.
  • Required CMSIS packs are installed or available for download.
  • At least one supported board is available.

Steps

  1. Open the Create Solution wizard.
  2. Select a target board.
  3. Select a compatible CMSIS software template.
  4. Choose a project location.
  5. Configure the compiler/toolchain.
  6. Generate the solution.
  7. Open the generated solution.
  8. Build the solution.

Expected Results

  • Board selection succeeds.
  • Compatible templates are displayed.
  • Solution files are generated successfully.
  • CMSIS Explorer displays the generated solution and contexts.
  • Build completes successfully.

Postconditions

  • A new board-based CMSIS solution exists.
  • Generated files contain valid board and device configuration.
  • The solution is ready for development.

E2E Automation Status

  • 🟡 Feasible.
  • Recommended after Workflow 1 is stable.
  • Requires a board/template combination with deterministic pack availability.
  • May require additional CI setup depending on board-specific dependencies.

Workflow 4: Handle Missing Required Pack

Preconditions

  • VS Code workspace is open.
  • CMSIS Solution extension is installed.
  • Selected template requires a pack that is not currently installed.

Steps

  1. Open the Create Solution wizard.
  2. Select a device or board.
  3. Select a template that requires a missing pack.
  4. Continue solution creation.

Expected Results

  • The extension detects the missing pack dependency.
  • The user is informed about the missing pack.
  • Appropriate guidance or installation options are presented.
  • Solution generation does not proceed with an invalid configuration.

Postconditions

  • No invalid solution is generated.
  • User receives actionable feedback to resolve the dependency issue.

E2E Automation Status

  • 🟡 Feasible with additional infrastructure.
  • Requires control over pack availability (offline environment, mocked repository, or intentionally missing pack).
  • Not recommended for the initial e2e implementation.
  • Better suited as a follow-up negative-path test.

Workflow 5: Handle Missing Compiler

Preconditions

  • VS Code workspace is open.
  • CMSIS Solution extension is installed.
  • No supported compiler/toolchain is configured.

Steps

  1. Open the Create Solution wizard.
  2. Select a device or board.
  3. Select a template.
  4. Proceed to compiler/toolchain configuration.
  5. Attempt to finish solution creation.

Expected Results

  • The extension detects that the required compiler is unavailable.
  • A clear validation message is displayed.
  • The user is prevented from completing creation with an invalid configuration.

Postconditions

  • No invalid solution is created.
  • User receives guidance on configuring a supported compiler.

E2E Automation Status

  • 🟡 Feasible with additional infrastructure.
  • Requires a test environment without a configured compiler or with compiler discovery intentionally disabled.
  • Not recommended for the initial e2e implementation.
  • Better suited as a follow-up negative-path test.

Related Requirements / Issues

Priority

  • High
  • Medium
  • Low

Notes (Optional)

This is the primary onboarding workflow for the CMSIS Solution extension and provides the foundation for all subsequent workflows such as solution management, component configuration, build, load/run, and debugging.

Initial E2E Scope

The initial implementation should focus on Workflow 1: Create Solution from Device Template and validate:

  • Create Solution wizard can be launched.
  • Device selection works.
  • Template selection works.
  • Solution files are generated successfully.
  • Generated .csolution.yml is valid.
  • CMSIS Explorer discovers the generated solution.

Build validation may be included if the required toolchain is available in the CI environment.

Future E2E Coverage

  • Workflow 2: Board-based solution creation.
  • Workflow 3: Missing pack validation.
  • Workflow 4: Missing compiler validation.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status
In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions