mbed-tools icon indicating copy to clipboard operation
mbed-tools copied to clipboard

`mbed-tools configure` fails due to multiple mbed-os paths being searched

Open OllyMcBrideOB opened this issue 3 years ago • 0 comments

Issue The same error as #234 (see error message below), possibly caused by using a shared instance of mbed-os.

Error ValueError: Setting <random configuration setting> already defined. You cannot duplicate config settings! (The setting name changes every time the command is executed)

Details I believe this issue is caused when assemble_config() finds the mbed-os/ path within program.root, and then the mbed-os/ path is also passed in via program.mbed_os.root.

https://github.com/ARMmbed/mbed-tools/blob/519d3ecb5b362e31f3329ce8e4a2186bbb4b8cb7/src/mbed_tools/build/config.py#L36-L38

In the above snipped, if I remove program.mbed_os.root everything works correctly.

To Reproduce

  1. Navigate to mbed-os-example-blinky
  2. Use shared instance of mbed-os
  3. Enter mbed-tools configure -m NRF52_DK -t GCC_ARM

Expected behavior The mbed-tools configure -m NRF52_DK -t GCC_ARM command should configure the mbed-os-example-blinky project for CMake.

Desktop (please complete the following information):

  • OS: Windows
  • Version: 21H1

Mbed (please complete the following information):

  • Device: NRF52_DK
  • Mbed OS Version: [e.g. 6.8.0]
  • Mbed CLI 2 Version: 7.50.0

OllyMcBrideOB avatar Feb 08 '22 10:02 OllyMcBrideOB