Open-CMSIS-Pack / devtools

Open-CMSIS-Pack development tools - C++
Apache License 2.0
74 stars 56 forks source link

Improve user messages for `cbuild setup` with compiler selection and layer is delivered in one step #1708

Closed ReinhardKeil closed 2 weeks ago

ReinhardKeil commented 1 month ago

Describe the bug

To user message could be improved as explained below.

To Reproduce

Use this project USBD.zip

Steps to reproduce the behavior:

>cbuild setup USB_Device.csolution.yml -S
error csolution: undefined variables in USB_Device.csolution.yml:
  - $Board-Layer$

error csolution: board 'STMicroelectronics::B-U585I-IOT02A' was not found
error csolution: processing context 'HID.Debug+B-U585I-IOT02A' failed
error csolution: compiler undefined, use '--toolchain' option or add 'compiler: <value>' to yml input, selectable values can be found in cbuild-idx.yml
error cbuild: exit status 2

A command line user is confused by unclear messages.

Expected behavior

Suggest this improvements:

>cbuild setup USB_Device.csolution.yml -S
error csolution: undefined variables in USB_Device.csolution.yml:
  - $Board-Layer$
To resolve undefined variables, copy the settings from cbuild-idx.yml to csolution.yml

error csolution: compiler undefined, use '--toolchain' option or add 'compiler: <value>' to csolution.yml, possible values in cbuild-idx.yml 

Note: small modifications to the error messages.

Environment:

soumeh01 commented 3 weeks ago

@ReinhardKeil Unable to reproduce it using cmsis-toolbox 2.6.0. It shows the same results as expected

$ cbuild setup USB_Device.csolution.yml -S -l all
error csolution: undefined variables in USB_Device.csolution.yml:
  - $Board-Layer$
To resolve undefined variables, copy the settings from cbuild-idx.yml to csolution.yml
error cbuild: exit status 2
jkrech commented 2 weeks ago

It just had not been validated with the released 2.6.0 version. Closing