0

I don't understand Arudino IDE. Ever. This is a part of the compilation output:

Alternatives for ArduinoJson.h: [ArduinoJson@6.14.0]
ResolveLibrary(ArduinoJson.h)
  -> candidates: [ArduinoJson@6.14.0]
/home/mark/.arduino15/packages/STM32/tools/xpack-arm-none-eabi-gcc/9.2.1-1.1/bin/arm-none-eabi-g++ -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb @/tmp/arduino_build_952252/sketch/build_opt.h -c -Os -w -std=gnu++14 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -fno-use-cxa-atexit -I/home/mark/OSC -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/cores/arduino/avr -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/cores/arduino/stm32 -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/cores/arduino/stm32/LL -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/cores/arduino/stm32/usb -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/cores/arduino/stm32/usb/hid -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/cores/arduino/stm32/usb/cdc -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/system/Drivers/STM32F4xx_HAL_Driver/Inc -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/system/Drivers/STM32F4xx_HAL_Driver/Src -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/system/STM32F4xx -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/system/Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/system/Middlewares/ST/STM32_USB_Device_Library/Core/Src -w -x c++ -E -CC -DSTM32F4xx -DARDUINO=10810 -DARDUINO_NUCLEO_F429ZI -DARDUINO_ARCH_STM32 "-DBOARD_NAME=\"NUCLEO_F429ZI\"" -DSTM32F429xx -DHAL_UART_MODULE_ENABLED -I/home/mark/.arduino15/packages/STM32/tools/CMSIS/5.5.1/CMSIS/Core/Include/ -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/system/Drivers/CMSIS/Device/ST/STM32F4xx/Include/ -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/system/Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc/ -I/home/mark/.arduino15/packages/STM32/tools/CMSIS/5.5.1/CMSIS/DSP/Include -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/cores/arduino -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/variants/NUCLEO_F429ZI -I/home/mark/Arduino/libraries/STM32duino_LwIP/src -I/home/mark/Arduino/libraries/STM32duino_STM32Ethernet/src -I/home/mark/Arduino/libraries/ArduinoJson/src /tmp/arduino_build_952252/sketch/OSC.ino.cpp -o /dev/null
Alternatives for FlexyStepper.h: [FlexyStepper@1.0.0]
ResolveLibrary(FlexyStepper.h)
  -> candidates: [FlexyStepper@1.0.0]
/home/mark/.arduino15/packages/STM32/tools/xpack-arm-none-eabi-gcc/9.2.1-1.1/bin/arm-none-eabi-g++ -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb @/tmp/arduino_build_952252/sketch/build_opt.h -c -Os -w -std=gnu++14 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -fno-use-cxa-atexit -I/home/mark/OSC -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/cores/arduino/avr -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/cores/arduino/stm32 -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/cores/arduino/stm32/LL -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/cores/arduino/stm32/usb -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/cores/arduino/stm32/usb/hid -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/cores/arduino/stm32/usb/cdc -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/system/Drivers/STM32F4xx_HAL_Driver/Inc -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/system/Drivers/STM32F4xx_HAL_Driver/Src -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/system/STM32F4xx -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/system/Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/system/Middlewares/ST/STM32_USB_Device_Library/Core/Src -w -x c++ -E -CC -DSTM32F4xx -DARDUINO=10810 -DARDUINO_NUCLEO_F429ZI -DARDUINO_ARCH_STM32 "-DBOARD_NAME=\"NUCLEO_F429ZI\"" -DSTM32F429xx -DHAL_UART_MODULE_ENABLED -I/home/mark/.arduino15/packages/STM32/tools/CMSIS/5.5.1/CMSIS/Core/Include/ -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/system/Drivers/CMSIS/Device/ST/STM32F4xx/Include/ -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/system/Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc/ -I/home/mark/.arduino15/packages/STM32/tools/CMSIS/5.5.1/CMSIS/DSP/Include -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/cores/arduino -I/home/mark/.arduino15/packages/STM32/hardware/stm32/1.8.0/variants/NUCLEO_F429ZI -I/home/mark/Arduino/libraries/STM32duino_LwIP/src -I/home/mark/Arduino/libraries/STM32duino_STM32Ethernet/src -I/home/mark/Arduino/libraries/ArduinoJson/src -I/home/mark/Arduino/libraries/FlexyStepper/src /tmp/arduino_build_952252/sketch/OSC.ino.cpp -o /dev/null
Alternatives for Tasker.h: [Tasker@2.0]
ResolveLibrary(Tasker.h)
  -> candidates: [Tasker@2.0]

Più di una libreria trovata per "ArduinoJson.h"
Usata: /home/mark/Arduino/libraries/ArduinoJson
Più di una libreria trovata per "FlexyStepper.h"
Usata: /home/mark/Arduino/libraries/FlexyStepper
Più di una libreria trovata per "Tasker.h"
Usata: /home/mark/Arduino/libraries/Tasker

Più di una libreria trovata in English means more than one library found. And Usata means Used.

It's telling me it finds multiple libraries and selects one among them. Cool. But why it doesn't tell me where are the others?

Ok, I do:

$ sudo find / -name Tasker.h
/home/mark/Arduino/libraries/Tasker/Tasker.h

the same happens with the others. So, where are the multiples libraries it finds?

2
  • 1
    it is a known bug of Arduino IDE 1.8.10. ignore it. you don't have multiple libraries if it only lists one. github.com/arduino/Arduino/issues/9601 – Juraj Jan 23 '20 at 8:34
  • There are 3 locations for your libraries. Arduino IDE checks on the Arduino IDE (installation path) library folder. On your sketch folder. And finally in your board folder. As you can see in your log, you have a custom board STM32 installed, and the IDE is taking the library located in .arduino15, not the one located in Arduino. Tutto chiaro? – Adriano Jan 23 '20 at 9:10
-1

When you install your Arduino, 3 locations are used for your libraries:

  • Installation folder
  • Personal folder
  • Boards folder

Installation folder

This is the location where you installed Arduino. Normally they are:
On Windows: %ProgramFilesDir%\Arduino\libraries
On Linux: /home/{USERNAME}/arduino-{VER}/libraries
There, you can find 5-10 base libraries.

Personal folder

Since, on each update, the installation folder is deleted, the sketches and custom libraries are stored in your personal data folder:
On Windows: %userprofile%\documents\Arduino\libraries
On Linux: /home/{USERNAME}/Arduino/libraries/
There, you can find all libraries that you downloaded from the IDE.

Boards folder

Some libraries comes with your board and are board optimized. Arduino IDE will always check this folder, before it search for other libraries.
On Windows: %LOCALAPPDATA%\Arduino15\packages\{BOARD}\hardware\{MODEL}\{VERSION}\libraries
On Linux: /home/{USERNAME}/.arduino15/packages/{BOARD}/hardware/{MODEL}/{VERSION}/libraries


As I can see, you have a custom board selected. So the Arduino IDE search on the boards folder. If it can find a library it will take this one. If not, it will search on your personal folder and finally in the installation folder. I am not sure, but it could also get the newer one, if there is a version on it. Can't say how the right library is selected by the IDE.

If more than 1 are found, a warning message will appear. But it is just a message, you can just check if the right library was taken.

2
  • 2
    I know where the libraries are located, but it's not the point here. As you can see I searched from the root, so there are no more than one library. It's a bug, as Juraij said. – Mark Jan 23 '20 at 10:18
  • You're right. sorry... I answered without read it completly. – Adriano Jan 23 '20 at 10:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.