Check the core library version

Hi,

I've got no problems with my libraries (I use STM32 and ESP32). Probably, or rather certainly, I've got two core libraries, STM32 and ESP32. Or is it core releases? I think they are defined by Preferences > Settings > Additional boards manager URLs

Is there a simple way just to look up what I've got in my core toolbox without wandering through URLs?

If you compile with verbose output during compilation enabled (in file/preferences), you will see the information (first few lines).

FQBN: arduino:avr:mega
Using board 'mega' from platform in folder: C:\Users\bugge\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\bugge\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

The end of the lines tell you which core (aavr) and core version (1.8.6) is used; yours will obviously be different as the above is for a Mega.

1 Like

Thanks! It works. Not very obvious, but it works.

Each board manager URL returns a list of all available versions for a set of boards.

For whatever reason, the IDE Board Manager does not have an option to just show the Installed ones, like the Library Manager does. But with the standard find utility (even through WSL on Windows) you can list them, starting at the OS-specific location of your .arduino15 directory

$ cd ~/.arduino15/packages/
$ find . -maxdepth 2 -name hardware -exec find {} -mindepth 2 -maxdepth 2 \;
./arduino/hardware/avr/1.8.6
./arduino/hardware/renesas_uno/1.2.0
./m5stack/hardware/esp32/2.1.1
  • under the packages is each vendor
  • for which there are hardware and tools
  • the former has the versioned cores

I think that not knowing the existence of the .arduino15 directory was OP's problem.

And not knowing how to use find, too :blush:

I think it's time to put a suitable alias into .bashrc...

UPD

alias ac="find ~/.arduino15/packages -maxdepth 2 -name hardware -exec find {} -mindepth 2 -maxdepth 2 \;"

so far.

Thanks!

My output:

~/.arduino15/packages> find . -maxdepth 2 -name hardware -exec find {} -mindepth 2 -maxdepth 2 \;
./arduino/hardware/avr/1.8.6
./STMicroelectronics/hardware/stm32/2.8.1
~/.arduino15/packages>

I'd expect ESP32 too, because of my Preferences > Settings > Additional boards manager URLs:

https://espressif.github.io/arduino-esp32/package_esp32_index.json
https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json

The additional board URL will only tell the IDE where to find the board package on the web; it does not install it automatically. So the question is if you installed the ESP32 board package after adding the additional board URL (or in short, do you have the option under tools/board to select an ESP32 based board)?

That's probably it, thanks! I haven't yet created a single ESP32 project.

Unnecessarily complicated.

printf '%s\n' */hard*/*/*
1 Like

TWIMC

.bashrc:

alias ac="printf '%s\n' ~/.arduino15/packages/*/hard*/*/*"

This one looks more Arduino way :smile:

~> arduino-cli core list
ID                       Installed Latest Name
esp32:esp32              3.1.1     3.1.1  esp32
STMicroelectronics:stm32 2.9.0     2.9.0  STM32 MCU based boards
1 Like