bigtreetech / BIGTREETECH-SKR-MINI-V1.1

ARM Cortex-M3 series STM32F103RCT6 chip with 32-bit CPU 72MHz. Equipped with highly modular open source firmware Marlin2.0, convenient for users DIY and secondary development, exempt from the worries of the core code;
34 stars 49 forks source link

Error in sd2Card.cpp preventing successful compile #1

Open WayeeCool opened 5 years ago

WayeeCool commented 5 years ago
Processing BIGTREE_SKR_MINI (platform: ststm32@<4.4.0; board: genericSTM32F103RC; framework: arduino)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/genericSTM32F103RC.html
PLATFORM: ST STM32 > STM32F103RC (48k RAM. 256k Flash)
HARDWARE: STM32F103RCT6 72MHz 48KB RAM (256KB Flash)
DEBUG: CURRENT(jlink) EXTERNAL(blackmagic, jlink, stlink)

Converting Marlin.ino
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 33 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <LiquidCrystal> 1.3.4
|   |-- <Wire> 1.0
|-- <TMCStepper> 0.3.2
|   |-- <SPI> 1.0
|-- <30aa480>
|   |-- <Wire> 1.0
|-- <Arduino-L6470> 0.7.0
|-- <STM32ADC> 1.0
|-- <EEPROM>
|-- <SPI> 1.0
|-- <Wire> 1.0
Compiling .pioenvs/BIGTREE_SKR_MINI/src/src/sd/Sd2Card.cpp.o
Marlin/src/sd/Sd2Card.cpp:40:10: fatal error: spi.h: No such file or directory

*************************************************************
* Looking for spi.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:spi.h"
* Web  > https://platformio.org/lib/search?query=header:spi.h
*
*************************************************************

#include "spi.h"
^~~~~~~
compilation terminated.
*** [.pioenvs/BIGTREE_SKR_MINI/src/src/sd/Sd2Card.cpp.o] Error 1
========================== [ERROR] Took 3.54 seconds ==========================

To fix the issue #include "spi.h" needs to be changed to #include "SPI.h" on line 40 of Marlin/src/sd/Sd2Card.cpp. The PlatformIO compiler seems to be case-sensitive and fixing this capitalization issue results in a successful compile with no critical errors.