Skip to content

[BUG] Error compiling at SPI and I2Cdevice #5

@swolffke

Description

@swolffke

Bug Description

When compiling for Sermoon D1 the compilation fails

My Configurations

The standard configuration.h and _adv.h in this repo (CrealityOfficial/Sermoon-d1)

Steps to Reproduce

Open Visual Studio Code
Load project
compile

Expected behavior: Compiled binary

Actual behavior: Compilation failed

Additional Information

Warning! src_filter configuration option in section [env:megaatmega2560] is deprecated and will be removed in the next release! Please use build_src_filter instead
Warning! src_filter configuration option in section [env:sanguino_atmega644p] is deprecated and will be removed in the next release! Please use build_src_filter instead
Warning! src_filter configuration option in section [env:at90usb1286_cdc] is deprecated and will be removed in the next release! Please use build_src_filter instead
Warning! src_filter configuration option in section [env:DUE] is deprecated and will be removed in the next release! Please use build_src_filter instead
Warning! src_filter configuration option in section [env:LPC1768] is deprecated and will be removed in the next release! Please use build_src_filter instead
Warning! src_filter configuration option in section [env:STM32F1_base] is deprecated and will be removed in the next release! Please use build_src_filter instead
Warning! src_filter configuration option in section [env:STM32F4] is deprecated and will be removed in the next release! Please use build_src_filter instead
Warning! src_filter configuration option in section [env:STM32F7] is deprecated and will be removed in the next release! Please use build_src_filter instead
Warning! src_filter configuration option in section [env:ARMED] is deprecated and will be removed in the next release! Please use build_src_filter instead
Warning! src_filter configuration option in section [env:STM32F103CB_malyan] is deprecated and will be removed in the next release! Please use build_src_filter instead
Warning! src_filter configuration option in section [env:STM32_hal] is deprecated and will be removed in the next release! Please use build_src_filter instead
Warning! src_filter configuration option in section [env:teensy31] is deprecated and will be removed in the next release! Please use build_src_filter instead
Warning! src_filter configuration option in section [env:teensy35] is deprecated and will be removed in the next release! Please use build_src_filter instead
Warning! src_filter configuration option in section [env:esp32] is deprecated and will be removed in the next release! Please use build_src_filter instead
Warning! src_build_flags configuration option in section [env:linux_native] is deprecated and will be removed in the next release! Please use build_src_flags instead
Warning! src_filter configuration option in section [env:linux_native] is deprecated and will be removed in the next release! Please use build_src_filter instead
Warning! src_filter configuration option in section [env:SAMD51_grandcentral_m4] is deprecated and will be removed in the next release! Please use build_src_filter instead
Warning! src_filter configuration option in section [env:include_tree] is deprecated and will be removed in the next release! Please use build_src_filter instead
Marlin\src\lcd\dwin\LCD_RTS.cpp: In member function 'void RTSSHOW::RTS_HandleData()':
Marlin\src\lcd\dwin\LCD_RTS.cpp:1777:71: warning: 'max' may be used uninitialized in this function [-Wmaybe-uninitialized]
else if (current_position[axis] > max) current_position[axis] = max;
Marlin\src\lcd\dwin\LCD_RTS.cpp:1776:66: warning: 'min' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (current_position[axis] < min) current_position[axis] = min;
Marlin\src\lcd\dwin\LCD_RTS.cpp:1775:30: warning: 'axis' may be used uninitialized in this function [-Wmaybe-uninitialized]
current_position[axis] = ((float)recdat.data[0])/10;
^
.pio\libdeps\creality\Adafruit BusIO\Adafruit_SPIDevice.cpp: In member function 'void Adafruit_SPIDevice::transfer(uint8_t*, size_t)':
.pio\libdeps\creality\Adafruit BusIO\Adafruit_SPIDevice.cpp:144:31: error: no matching function for call to 'SPIClass::transfer(uint8_t*&, size_t&)'
_spi->transfer(buffer, len);
^
In file included from .pio\libdeps\creality\Adafruit BusIO\Adafruit_SPIDevice.h:9:0,
from .pio\libdeps\creality\Adafruit BusIO\Adafruit_SPIDevice.cpp:1:
Marlin\src\HAL\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\HAL_STM32F1/SPI.h:268:11: note: candidate expects 1 argument, 2 provided
*** [.pio\build\creality\liba08\Adafruit BusIO\Adafruit_SPIDevice.cpp.o] Error 1
.pio\libdeps\creality\Adafruit BusIO\Adafruit_I2CDevice.cpp: In member function 'bool Adafruit_I2CDevice::write(const uint8_t*, size_t, bool, const uint8_t*, size_t)':
.pio\libdeps\creality\Adafruit BusIO\Adafruit_I2CDevice.cpp:112:47: error: invalid conversion from 'const uint8_t* {aka const unsigned char*}' to 'uint8* {aka unsigned char*}' [-fpermissive]
if (_wire->write(prefix_buffer, prefix_len) != prefix_len) {
^
In file included from C:\Users\steven.WOLFFKE.platformio\packages\framework-arduinoststm32-maple\STM32F1\libraries\Wire/Wire.h:42:0,
from .pio\libdeps\creality\Adafruit BusIO\Adafruit_I2CDevice.h:5,
from .pio\libdeps\creality\Adafruit BusIO\Adafruit_I2CDevice.cpp:1:
C:\Users\steven.WOLFFKE.platformio\packages\framework-arduinoststm32-maple\STM32F1\libraries\Wire/utility/WireBase.h:116:12: note: initializing argument 1 of 'size_t WireBase::write(uint8*, int)'
size_t write(uint8*, int);
^~~~~
.pio\libdeps\creality\Adafruit BusIO\Adafruit_I2CDevice.cpp:121:31: error: invalid conversion from 'const uint8_t* {aka const unsigned char*}' to 'uint8* {aka unsigned char*}' [-fpermissive]
if (_wire->write(buffer, len) != len) {
^
In file included from C:\Users\steven.WOLFFKE.platformio\packages\framework-arduinoststm32-maple\STM32F1\libraries\Wire/Wire.h:42:0,
from .pio\libdeps\creality\Adafruit BusIO\Adafruit_I2CDevice.h:5,
from .pio\libdeps\creality\Adafruit BusIO\Adafruit_I2CDevice.cpp:1:
C:\Users\steven.WOLFFKE.platformio\packages\framework-arduinoststm32-maple\STM32F1\libraries\Wire/utility/WireBase.h:116:12: note: initializing argument 1 of 'size_t WireBase::write(uint8*, int)'
size_t write(uint8*, int);
^~~~~
.pio\libdeps\creality\Adafruit BusIO\Adafruit_I2CDevice.cpp: In member function 'bool Adafruit_I2CDevice::_read(uint8_t*, size_t, bool)':
.pio\libdeps\creality\Adafruit BusIO\Adafruit_I2CDevice.cpp:195: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 C:\Users\steven.WOLFFKE.platformio\packages\framework-arduinoststm32-maple\STM32F1\libraries\Wire/Wire.h:42:0,
from .pio\libdeps\creality\Adafruit BusIO\Adafruit_I2CDevice.h:5,
from .pio\libdeps\creality\Adafruit BusIO\Adafruit_I2CDevice.cpp:1:
C:\Users\steven.WOLFFKE.platformio\packages\framework-arduinoststm32-maple\STM32F1\libraries\Wire/utility/WireBase.h:101:11: note: candidate: uint8 WireBase::requestFrom(uint8, int)
uint8 requestFrom(uint8, int);
^~~~~~~~~~~
C:\Users\steven.WOLFFKE.platformio\packages\framework-arduinoststm32-maple\STM32F1\libraries\Wire/utility/WireBase.h:101:11: note: candidate expects 2 arguments, 3 provided
C:\Users\steven.WOLFFKE.platformio\packages\framework-arduinoststm32-maple\STM32F1\libraries\Wire/utility/WireBase.h:106:11: note: candidate: uint8 WireBase::requestFrom(int, int)
uint8 requestFrom(int, int);
^~~~~~~~~~~
C:\Users\steven.WOLFFKE.platformio\packages\framework-arduinoststm32-maple\STM32F1\libraries\Wire/utility/WireBase.h:106:11: note: candidate expects 2 arguments, 3 provided
C:\Users\steven.WOLFFKE.platformio\packages\framework-arduinoststm32-maple\STM32F1\libraries\STM32ADC\src\utility\util_adc.c:10:30: warning: 'adc_result' initialized and declared 'extern'
extern volatile unsigned int adc_result = 0;
^~~~~~~~~~
*** [.pio\build\creality\liba08\Adafruit BusIO\Adafruit_I2CDevice.cpp.o] Error 1
====================================================================================================================================================================== [FAILED] Took 19.96 seconds ======================================================================================================================================================================

Environment Status Duration


creality FAILED 00:00:19.959
Configuration.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions