ARM-software / vscode-cmsis-csolution

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

Failed to load solution #17

Closed UniverGao closed 1 year ago

UniverGao commented 1 year ago

Type: Bug Report

Describe the bug

To Reproduce Steps to reproduce the behavior:

  1. Install the cmsis tools
  2. Install ninja and cmake
  3. Install the pack that the project need
  4. Open the folder of the project

Expected behavior

No error pop-out and 'Manage Software Components' interface of the CMSIS solution extention shows the pack components existed.

Code sample and logs

Screenshots

image image

Additional context

mcgordonite commented 1 year ago

Hi @UniverGao, to help debug this it would be useful to have the logs from VS Code:

  1. Open the command palette (CTRL-SHIFT-P on Windows).
  2. Run the "Developer: Toggle Developer Tools" command. The dev tools panel should appear.
  3. Open the Console tab.
  4. Copy the logs, or right click anywhere in the Console tab and select "Save As".
UniverGao commented 1 year ago

I did the test and the log is here: Best regrards.

vscode-app-csolution-v0.10.0.log

mcgordonite commented 1 year ago

Thanks for sharing. It looks like the first line is the cause of the problem:

workbench.desktop.main.js:89 [Extension Host] Core Tools process error Error: spawn c:\Users\%USERNAME%\.vscode\extensions\arm.cmsis-csolution-0.10.0\tools\cmsis-core-tools\cmsis.exe ENOENT at ChildProcess._handle.onexit (node:internal/child_process:283:19) at onErrorNT (node:internal/child_process:478:16) at process.processTicksAndRejections (node:internal/process/task_queues:83:21)

The CMSIS Core Tools is a binary the extension uses to understand the CMSIS ecosystem. Does the file exist at %HOME%\.vscode\extensions\arm.cmsis-csolution-0.10.0\tools\cmsis-core-tools\cmsis.exe? If so, can you run it from the command line?

Also, what is the CPU architecture for your machine? Intel 64 bit, 32 bit or Arm?

UniverGao commented 1 year ago

@mcgordonite Sorry that the extention was not installed correctly. I reinstalled the extension, cmsis.exe could be run corrently, the error message 'Failed to load solution at...' was disappeared, but the 'Manage Software Components' interface of the CMSIS solution extention was still empty. PS:

The log shown below is about the status after the extension correctly re-installed: vscode-app-cmsis-win-v0.10.0.log

mcgordonite commented 1 year ago

It looks like the issue is that csolution example includes components via layers. The preview Manage Components view doesn't support layers yet, although basic support is in the roadmap for the next few months. If you'd like to try out the component manager, you could use an example that doesn't use layers, e.g. https://github.com/Open-CMSIS-Pack/csolution-examples/.