bigtreetech / BIGTREETECH-SKR-E3-DIP-V1.0

BIGTREETECH SKR-E3-DIP-V1.0 motherboard is launched by the 3D printing team of Shenzhen BIGTREE technology co., LTD. This board is specially tailored for Ender 3 printer, perfectly replacing the original Ender3 printer motherboard.
130 stars 111 forks source link

Marlin 2.0.5 doesn't compiling for SKRs boards #81

Closed VijitCoder closed 4 years ago

VijitCoder commented 4 years ago

I have tried a lot of configurations from the original Marlin repo.

I ended in this repo.

Downloaded and tried to compile "as is" - FAIL. Tried to change in platformio.ini default_envs:

The compilation is always fails. Different errors, but the same result - no firmware.

At the same time I see in this repo prepared firmwares, which is obviously were compiled with the Marlin sources from this repo. So, how did you manage to do this?

For an example, building of STM32F103RC_btt fails with that:

Compiling .pio/build/STM32F103RC_btt/libe86/LiquidTWI2/LiquidTWI2.cpp.o
.pio/libdeps/STM32F103RC_btt/Adafruit BusIO_ID6214/Adafruit_SPIDevice.cpp: In member function 'void Adafruit_SPIDevice::transfer(uint8_t*, size_t)':
.pio/libdeps/STM32F103RC_btt/Adafruit BusIO_ID6214/Adafruit_SPIDevice.cpp:99:31: error: no matching function for call to 'SPIClass::transfer(uint8_t*&, size_t&)'
     _spi->transfer(buffer, len);
                               ^
In file included from .pio/libdeps/STM32F103RC_btt/Adafruit BusIO_ID6214/Adafruit_SPIDevice.h:1:0,
                 from .pio/libdeps/STM32F103RC_btt/Adafruit BusIO_ID6214/Adafruit_SPIDevice.cpp:1:
Marlin/src/HAL/STM32F1/SPI.h:268:11: note: candidate: uint8_t SPIClass::transfer(uint8_t) const
   uint8_t transfer(uint8_t data) const;
           ^~~~~~~~
Marlin/src/HAL/STM32F1/SPI.h:268:11: note:   candidate expects 1 argument, 2 provided
.pio/libdeps/STM32F103RC_btt/Adafruit BusIO_ID6214/Adafruit_I2CDevice.cpp: In member function 'bool Adafruit_I2CDevice::read(uint8_t*, size_t, bool)':
.pio/libdeps/STM32F103RC_btt/Adafruit BusIO_ID6214/Adafruit_I2CDevice.cpp:160:79: error: no matching function for call to 'TwoWire::requestFrom(uint8_t, uint8_t, uint8_t)'
   size_t recv = _wire->requestFrom((uint8_t)_addr, (uint8_t)len, (uint8_t)stop);
                                                                               ^
In file included from /home/vijit/.platformio/packages/framework-arduinoststm32-maple/STM32F1/libraries/Wire/Wire.h:42:0,
                 from .pio/libdeps/STM32F103RC_btt/Adafruit BusIO_ID6214/Adafruit_I2CDevice.h:1,
                 from .pio/libdeps/STM32F103RC_btt/Adafruit BusIO_ID6214/Adafruit_I2CDevice.cpp:1:
/home/vijit/.platformio/packages/framework-arduinoststm32-maple/STM32F1/libraries/Wire/utility/WireBase.h:101:11: note: candidate: uint8 WireBase::requestFrom(uint8, int)
     uint8 requestFrom(uint8, int);
           ^~~~~~~~~~~
/home/vijit/.platformio/packages/framework-arduinoststm32-maple/STM32F1/libraries/Wire/utility/WireBase.h:101:11: note:   candidate expects 2 arguments, 3 provided
/home/vijit/.platformio/packages/framework-arduinoststm32-maple/STM32F1/libraries/Wire/utility/WireBase.h:106:11: note: candidate: uint8 WireBase::requestFrom(int, int)
     uint8 requestFrom(int, int);
           ^~~~~~~~~~~
/home/vijit/.platformio/packages/framework-arduinoststm32-maple/STM32F1/libraries/Wire/utility/WireBase.h:106:11: note:   candidate expects 2 arguments, 3 provided
*** [.pio/build/STM32F103RC_btt/libc46/Adafruit BusIO_ID6214/Adafruit_SPIDevice.cpp.o] Error 1
*** [.pio/build/STM32F103RC_btt/libc46/Adafruit BusIO_ID6214/Adafruit_I2CDevice.cpp.o] Error 1
In file included from .pio/libdeps/STM32F103RC_btt/Adafruit_MAX31865/Adafruit_MAX31865.cpp:17:0:
.pio/libdeps/STM32F103RC_btt/Adafruit_MAX31865/Adafruit_MAX31865.h:84:32: warning: passing NULL to non-pointer argument 1 of 'Adafruit_SPIDevice::Adafruit_SPIDevice(int8_t, uint32_t, BitOrder, uint8_t, SPIClass*)' [-Wconversion-null]
   Adafruit_SPIDevice spi_dev = NULL;
                                ^~~~

A complete log in the attachment.

ckuethe commented 4 years ago

Maybe a duplicate of #74 which references MarlinFirmware/Marlin#18081 ? I think you just have to change one line in your platformio.inifile

VijitCoder commented 4 years ago

Thanks a lot!

I spent a few hours, fighting till deep of the night, but didn't find the answer. And what is turned out.. A wrong dependency.

Thanks.


Just for the protocol. File platformio.ini, change Adafruit_MAX31865 link from the "master" to 1.1.0:

[common]
lib_deps =
...
Adafruit_MAX31865=https://github.com/adafruit/Adafruit_MAX31865/archive/1.1.0.zip