Hello,
I have a very frustrating problem, as the title says: Arduino cannot find the library...
I have read this thread: Arduino not finding library - Programming Questions - Arduino Forum
but it does not solve my issue.
Arduino placed under [user]\Downloads\Arduino.
Ssketch running from [user]\Documents\Arduino\STM32F4_blink\STM32F4_blink.ino
STM32 files from: [user]\Documents\Arduino\hardware\Arduino_STM32, where there is one \STM32F1\ and one \STM32F4\ subfolder, respectively.
Each family (F1 and F4) has a core, a library and a variant subfolder.
There is an identical SPI library in both \libraries\SPI\src\ subfolders, with identical named .cpp and .h files.
Both platforms are almost identical, the difference is only due to the M3 and M4 core difference.
Now, when building the same empty sketch where I add "#include <SPI.h>, if I chose one F1 variant, the SPI library will be recognized by Arduino:
C:\Users\[user]\Downloads\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Users\[user]\Downloads\Arduino\hardware -hardware C:\Users\[user]\AppData\Local\Arduino15\packages -hardware C:\Users\[user]\Documents\Arduino\hardware -tools C:\Users\[user]\Downloads\Arduino\tools-builder -tools C:\Users\[user]\Downloads\Arduino\hardware\tools\avr -tools C:\Users\[user]\AppData\Local\Arduino15\packages -built-in-libraries C:\Users\[user]\Downloads\Arduino\libraries -libraries C:\Users\[user]\Documents\Arduino\libraries -fqbn=Arduino_STM32:STM32F1:genericSTM32F103C:device_variant=STM32F103CB,upload_method=DFUUploadMethod,cpu_speed=speed_72mhz -ide-version=10612 -build-path C:\Users\[user]\AppData\Local\Temp\arduino_build_793233 -warnings=default -prefs=build.warn_data_percentage=75 -verbose C:\Users\[user]\Documents\Arduino\STM32F4_blink\STM32F4_blink.ino
C:\Users\[user]\Downloads\Arduino\arduino-builder -compile -logger=machine -hardware C:\Users\[user]\Downloads\Arduino\hardware -hardware C:\Users\[user]\AppData\Local\Arduino15\packages -hardware C:\Users\[user]\Documents\Arduino\hardware -tools C:\Users\[user]\Downloads\Arduino\tools-builder -tools C:\Users\[user]\Downloads\Arduino\hardware\tools\avr -tools C:\Users\[user]\AppData\Local\Arduino15\packages -built-in-libraries C:\Users\[user]\Downloads\Arduino\libraries -libraries C:\Users\[user]\Documents\Arduino\libraries -fqbn=Arduino_STM32:STM32F1:genericSTM32F103C:device_variant=STM32F103CB,upload_method=DFUUploadMethod,cpu_speed=speed_72mhz -ide-version=10612 -build-path C:\Users\[user]\AppData\Local\Temp\arduino_build_793233 -warnings=default -prefs=build.warn_data_percentage=75 -verbose C:\Users\[user]\Documents\Arduino\STM32F4_blink\STM32F4_blink.ino
Using board 'genericSTM32F103C' from platform in folder: C:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1
Using core 'maple' from platform in folder: C:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1
Detecting libraries used...
"C:\Users\[user]\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8002000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10612 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103CB -mthumb -march=armv7-m -D__STM32F1__ -DMCU_STM32F103CB -mthumb -march=armv7-m -D__STM32F1__ "-IC:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include" "-IC:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "C:\Users\[user]\AppData\Local\Temp\arduino_build_793233\sketch\STM32F4_blink.ino.cpp" -o "nul"
"C:\Users\[user]\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8002000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10612 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103CB -mthumb -march=armv7-m -D__STM32F1__ -DMCU_STM32F103CB -mthumb -march=armv7-m -D__STM32F1__ "-IC:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include" "-IC:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\SPI\src" "C:\Users\[user]\AppData\Local\Temp\arduino_build_793233\sketch\STM32F4_blink.ino.cpp" -o "nul"
"C:\Users\[user]\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8002000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10612 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103CB -mthumb -march=armv7-m -D__STM32F1__ -DMCU_STM32F103CB -mthumb -march=armv7-m -D__STM32F1__ "-IC:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include" "-IC:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\SPI\src" "C:\Users\[user]\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\SPI\src\SPI.cpp" -o "nul"
Generating function prototypes...
- t.b.c. -