No hardware found, if "Arduino15" folder is moved

Hi, All

IDE version is 2.3.6.

If to move the Arduino15 folder into another drive by the settings in
C:\Users\%USER_NAME%\.arduinoIDE\arduino-cli.yaml like:

board_manager:
    additional_urls:
        - https://arduino.esp8266.com/stable/package_esp8266com_index.json
        - https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
directories:
    builtin:
        libraries: d:\Programs\Arduino\Arduino15\libraries
    data: d:\Programs\Arduino\Arduino15
    user: d:\Programs\Arduino\Sketches
locale: en

, after it "arduino-cli" utility does not recognize the installed boards.
But they are installed, a sketch is compiled\uploaded\working OK.

Is it known bug ? Anyone touched ?

Hi @peacemakervlad.

I'm not sure I understand what you mean by this.

Please provide a detailed description of what you mean by "does not recognize the installed boards", including:

  • What did you do?
  • What were the results you expected from doing that thing?
  • What were the results you observed that did not match your expectations?

Make sure to include the full and exact text of any error or warning messages you might have encountered.

Are you using Arduino CLI directly from the command line when you encounter this problem, or are you using Arduino IDE?

Arduino IDE works OK.
But i need to use Arduino-CLI, and it returns empty list:

arduino-cli.exe board list

At old laptop with default installation onto C:\ drive all was OK as usual, but here on the new laptop, when the Arduino15 folder is at D: drive the arduino-cli returns the empty board list.

I guess, Arduino-cli should check arduino-cli.yaml path first, for getting the board list, but it doesn't.

C:\Users\%USER_NAME%\.arduinoIDE\arduino-cli.yaml is not the default location for the Arduino CLI configuration file.

So when using Arduino CLI directly, if you want to use a configuration file from this location, you must explicitly configure Arduino CLI to use the file from that path (which is what Arduino IDE does when it executes Arduino CLI). You can do that by using Arduino CLI's --config-file flag:

https://arduino.github.io/arduino-cli/latest/commands/arduino-cli/#options

--config-file string        The custom config file (if not specified the default will be used).

For example:

arduino-cli.exe --config-file "C:\Users\%USERNAME%\.arduinoIDE\arduino-cli.yaml" board list
1 Like

Thanks.

Hmm, did not help...but

But installed !

The board list command lists the ports on your computer that have been identified as Arduino boards:

https://arduino.github.io/arduino-cli/latest/commands/arduino-cli_board_list/

So if you don't have any boards connected to your computer with a USB cable, or if the boards that are connected don't produce unique properties that allow them to be identified as Arduino boards (which is the case for boards that use general purpose USB to serial bridge chips like the WCH CH340, Silicon Labs CP2102, FTDI FT232R, etc.) then it is normal and expected that the board list command will not return any results.

If you instead want the list of boards platforms you have installed, then you must use the core list command:

https://arduino.github.io/arduino-cli/latest/commands/arduino-cli_core_list/

1 Like

Thanks, indeed !

And this one returns the non-empty list in the file:

d:\Programs\Arduino\CLI>arduino-cli.exe --config-file "C:\Users\LOQ\.arduinoIDE\arduino-cli.yaml" board listall --format json > 1.txt

You are welcome. I'm glad it is working now.

Regards, Per

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.