Problem with SSD1306 oled and Bluepill

Hi guys,

i dont know what i am doing wrong, i installed all libraries (even manually). Tryied diffrent versions of the arduino ide. It just wont compile ((((((((((((( A half year ago i could upload with no problem and now i cant even compile.

I am using adafruit library and SSD1306_i2c_stm32 example.....

This is the code and compile error
Please help me

/*
STM32 adaption by Matthias Diro, tested with maple mini and heltec OLED 12864 I2c; adress: 0x3C (SPI should work, but I didn't own one)
Things to know:
 This adaption uses hardware I2C (now Wire.h), Port: I2c2. SDA=0, SCL=1 on maple mini
 further details: STM32_README.txt
*/
/*********************************************************************
This is an example for our Monochrome OLEDs based on SSD1306 drivers

  Pick one up today in the adafruit shop!
  ------> http://www.adafruit.com/category/63_98

This example is for a 128x64 size display using I2C to communicate
3 pins are required to interface (2 I2C and one reset)

Adafruit invests time and resources providing this open source code, 
please support Adafruit and open-source hardware by purchasing 
products from Adafruit!

Written by Limor Fried/Ladyada  for Adafruit Industries.  
BSD license, check license.txt for more information
All text above, and the splash screen must be included in any redistribution
*********************************************************************/

#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306_STM32.h>

#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);

#define NUMFLAKES 10
#define XPOS 0
#define YPOS 1
#define DELTAY 2


#define LOGO16_GLCD_HEIGHT 16 
#define LOGO16_GLCD_WIDTH  16 
static const unsigned char PROGMEM logo16_glcd_bmp[] =
{ B00000000, B11000000,
  B00000001, B11000000,
  B00000001, B11000000,
  B00000011, B11100000,
  B11110011, B11100000,
  B11111110, B11111000,
  B01111110, B11111111,
  B00110011, B10011111,
  B00011111, B11111100,
  B00001101, B01110000,
  B00011011, B10100000,
  B00111111, B11100000,
  B00111111, B11110000,
  B01111100, B11110000,
  B01110000, B01110000,
  B00000000, B00110000 };

#if (SSD1306_LCDHEIGHT != 64)
#error("Height incorrect, please fix Adafruit_SSD1306.h!");
#endif

void setup()   {                
  Serial.begin(9600);

  // by default, we'll generate the high voltage from the 3.3v line internally! (neat!)
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);  // initialize with the I2C addr 0x3D (for the 128x64)
  // init done
  
  // Show image buffer on the display hardware.
  // Since the buffer is intialized with an Adafruit splashscreen
  // internally, this will display the splashscreen.
  display.display();
  delay(2000);

  // Clear the buffer.
  display.clearDisplay();

  // draw a single pixel
  display.drawPixel(10, 10, WHITE);
  // Show the display buffer on the hardware.
  // NOTE: You _must_ call display after making any drawing commands
  // to make them visible on the display hardware!
  display.display();
  delay(2000);
  display.clearDisplay();

  // draw many lines
  testdrawline();
  display.display();
  delay(2000);
  display.clearDisplay();

  // draw rectangles
  testdrawrect();
  display.display();
  delay(2000);
  display.clearDisplay();

  // draw multiple rectangles
  testfillrect();
  display.display();
  delay(2000);
  display.clearDisplay();

  // draw mulitple circles
  testdrawcircle();
  display.display();
  delay(2000);
  display.clearDisplay();

  // draw a white circle, 10 pixel radius
  display.fillCircle(display.width()/2, display.height()/2, 10, WHITE);
  display.display();
  delay(2000);
  display.clearDisplay();

  testdrawroundrect();
  delay(2000);
  display.clearDisplay();

  testfillroundrect();
  delay(2000);
  display.clearDisplay();

  testdrawtriangle();
  delay(2000);
  display.clearDisplay();
   
  testfilltriangle();
  delay(2000);
  display.clearDisplay();

  // draw the first ~12 characters in the font
  testdrawchar();
  display.display();
  delay(2000);
  display.clearDisplay();

  // draw scrolling text
  testscrolltext();
  delay(2000);
  display.clearDisplay();

  // text display tests
  display.setTextSize(1);
  display.setTextColor(WHITE);
  display.setCursor(0,0);
  display.println("Hello, world!");
  display.setTextColor(BLACK, WHITE); // 'inverted' text
  display.println(3.141592);
  display.setTextSize(2);
  display.setTextColor(WHITE);
  display.print("0x"); display.println(0xDEADBEEF, HEX);
  display.display();
  delay(2000);

  // miniature bitmap display
  display.clearDisplay();
  display.drawBitmap(30, 16,  logo16_glcd_bmp, 16, 16, 1);
  display.display();

  // invert the display
  display.invertDisplay(true);
  delay(1000); 
  display.invertDisplay(false);
  delay(1000); 

  // draw a bitmap icon and 'animate' movement
  testdrawbitmap(logo16_glcd_bmp, LOGO16_GLCD_HEIGHT, LOGO16_GLCD_WIDTH);
}


void loop() {
  
}




}

Sorry cant print the whole code max lenght is 9000 chareters

//-------------------------------ERROR COMPILE------------------------

In file included from C:\Users\ilya\Documents\Arduino\libraries\Adafruit_GFX_Library\Adafruit_MonoOLED.h:31:0,

from C:\Users\ilya\Documents\Arduino\libraries\Adafruit_GFX_Library\Adafruit_MonoOLED.cpp:20:

C:\Users\ilya\Documents\Arduino\libraries\Adafruit_BusIO/Adafruit_SPIDevice.h:37:43: error: 'SPI_BITORDER_MSBFIRST' was not declared in this scope

BitOrder dataOrder = SPI_BITORDER_MSBFIRST,

^

C:\Users\ilya\Documents\Arduino\libraries\Adafruit_BusIO/Adafruit_SPIDevice.h:42:43: error: 'SPI_BITORDER_MSBFIRST' was not declared in this scope

BitOrder dataOrder = SPI_BITORDER_MSBFIRST,

^

C:\Users\ilya\Documents\Arduino\libraries\Adafruit_GFX_Library\Adafruit_MonoOLED.cpp: In constructor 'Adafruit_MonoOLED::Adafruit_MonoOLED(uint16_t, uint16_t, int8_t, int8_t, int8_t, int8_t, int8_t)':

C:\Users\ilya\Documents\Arduino\libraries\Adafruit_GFX_Library\Adafruit_MonoOLED.cpp:102:75: error: call to 'Adafruit_SPIDevice::Adafruit_SPIDevice(int8_t, int8_t, int8_t, int8_t, uint32_t, BitOrder, uint8_t)' uses the default argument for parameter 6, which is not yet defined

spi_dev = new Adafruit_SPIDevice(cs_pin, sclk_pin, -1, mosi_pin, 1000000);

^

C:\Users\ilya\Documents\Arduino\libraries\Adafruit_GFX_Library\Adafruit_MonoOLED.cpp: In constructor 'Adafruit_MonoOLED::Adafruit_MonoOLED(uint16_t, uint16_t, SPIClass*, int8_t, int8_t, int8_t, uint32_t)':

C:\Users\ilya\Documents\Arduino\libraries\Adafruit_GFX_Library\Adafruit_MonoOLED.cpp:135:53: error: 'SPI_BITORDER_MSBFIRST' was not declared in this scope

spi_dev = new Adafruit_SPIDevice(cs_pin, bitrate, SPI_BITORDER_MSBFIRST,

^

Meerdere bibliotheken gevonden voor "Wire.h"
Gebruikt: C:\Users\ilya\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2020.5.26\libraries\Wire
Niet gebruikt: C:\Users\ilya\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2020.5.26\libraries\WireSlave
exit status 1
Fout bij het compileren voor board Generic STM32F103C6/fake STM32F103C8

Nobody ?

God gave you the STM32 Core from STMicroelectronics.
I would expect regular Adafruit libraries to work on this Core.

You have chosen the RogerClark Maple Core.
Yes, I am sure that the "accompanying libraries" worked at one time.
You have chosen the 2020.5.26 version
If it worked 6 months ago, install the historic version.

It looks like your code was written for a MapleMini and you have chosen a Fake BluePill.

I suggest that you ask for help on the https://www.stm32duino.com/ Forum saying that you are using the "LibMaple" (RogerClark) Core.

David.

Thanks David, seems to be a very weird problem as it seems to happen only to me. Because i cannot find any threads that point out this problem. Dev going to try if it ll compile with maple mini boards.

And the older versions of Arduino ide dont work either, i always get the same error messenge.

You normally select "Generic STM32F103C" with "Variant 128kB Flash"

It looks as if the new "Generic STM32F103C6 /Fake STM32F103C8" selection is designed to fail.

I suggest that you select the traditional "103C with 128k" style for your BluePill.
But quite honestly, the STMicroelectronics Core seems a wiser option.

David.

So i deleted the libraries from documents->arduino

and reinstalled arduino ide. Now when i compile i get this error:

i get the same error with:

  • Generic STM32F103C6 /Fake STM32F103C8 -> upload method serial
  • STM32F103C series -> upload method serial
  • maple mini
  • STMicroelectronics Core << i dont have this option

Working on windows 10
arduino version 1.8.12

I dont get what is the problem, its the third day that i try to get the basic code compiled......................................:frowning:

C:\Users\ilya\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp: In member function 'void Adafruit_SPIDevice::transfer(uint8_t*, size_t)':

C:\Users\ilya\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:99:31: error: no matching function for call to 'SPIClass::transfer(uint8_t*&, size_t&)'

_spi->transfer(buffer, len);

^

C:\Users\ilya\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:99:31: note: candidate is:

In file included from C:\Users\ilya\Documents\Arduino\libraries\Adafruit_BusIO/Adafruit_SPIDevice.h:1:0,

from C:\Users\ilya\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:1:

C:\Users\ilya\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2020.5.26\libraries\SPI\src/SPI.h:286:11: note: uint8 SPIClass::transfer(uint8) const

uint8 transfer(uint8 data) const;

^

C:\Users\ilya\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2020.5.26\libraries\SPI\src/SPI.h:286:11: note: candidate expects 1 argument, 2 provided

exit status 1
Fout bij het compileren voor board Generic STM32F103C series

Google for "official Arduino STM32" and you will get GitHub - stm32duino/Arduino_Core_STM32: STM32 core support for Arduino

Follow the instructions.
If you have a problem, quote the "instruction" on that web page that you do not understand.

However, you can continue with the C:\Users\ilya\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2020.5.26

  1. select "Generic STM32F103C" with "Variant 128kB Flash"
  2. Run STM32F1\2020.5.26\libraries\Adafruit_SSD1306\examples\ssd1306_128x64_i2c_STM32

SDA=PB7
SCL=PB6

It should compile and run.

This is my Usage report:

Using library SPI at version 1.0 in folder: C:\Users\David Prentice\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2020.4.23\libraries\SPI 
Using library Wire at version 1.0 in folder: C:\Users\David Prentice\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2020.4.23\libraries\Wire 
Using library Adafruit_GFX_Library at version 1.7.5 in folder: C:\Users\David Prentice\Documents\Arduino\libraries\Adafruit_GFX_Library 
Using library Adafruit_SSD1306 in folder: C:\Users\David Prentice\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2020.4.23\libraries\Adafruit_SSD1306 (legacy)
"C:\\Users\\David Prentice\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\4.8.3-2014q1/bin/arm-none-eabi-size" -A "C:\\Users\\DAVIDP~1\\AppData\\Local\\Temp\\arduino_build_98465/ssd1306_128x64_i2c_STM32.ino.elf"
Sketch uses 36168 bytes (27%) of program storage space. Maximum is 131072 bytes.
Global variables use 5560 bytes (27%) of dynamic memory, leaving 14920 bytes for local variables. Maximum is 20480 bytes.

I have the 2020.4.23 library on this Win10-64 Desktop.

I will rebuild have rebuilt on my Win7-32 Laptop (with 2020.5.26) and add that report.

Using library SPI at version 1.0 in folder: C:\Users\David\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2020.5.26\libraries\SPI 
Using library Wire at version 1.0 in folder: C:\Users\David\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2020.5.26\libraries\Wire 
Using library Adafruit_GFX_Library at version 1.7.5 in folder: C:\Users\David\Documents\Arduino\libraries\Adafruit_GFX_Library 
Using library Adafruit_SSD1306 in folder: C:\Users\David\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2020.5.26\libraries\Adafruit_SSD1306 (legacy)
"C:\\Users\\David\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\4.8.3-2014q1/bin/arm-none-eabi-size" -A "C:\\Users\\David\\AppData\\Local\\Temp\\arduino_build_307783/ssd1306_128x64_i2c_STM32.ino.elf"
Sketch uses 36184 bytes (27%) of program storage space. Maximum is 131072 bytes.
Global variables use 5560 bytes (27%) of dynamic memory, leaving 14920 bytes for local variables. Maximum is 20480 bytes.

David.

Well i downloaded the zip version of arduino compilited with generic stm32c8 flash 128, i get exact the same error again.

Got adafruit libraries for ssd1306 loaded the stm32 version.

Inthink i dont got the right library or something. Im on different computer and the error stays the same.

C:\Users\ilya\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2020.5.26\libraries\SPI\src/SPI.h:286:11: note: candidate expects 1 argument, 2 provided

I strongly recommend that you follow what I did in #6.
i.e. start with an example that comes with your library.

I have no idea what you are doing in #0 because you don't attach the whole sketch. A link would be fine.

Then I can try to replicate any problems with your sketch.

Incidentally, regular Adafruit_SSD1306 library should work fine on STM32.

David.

However, you can continue with the C:\Users\ilya\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2020.5.26

  1. select "Generic STM32F103C" with "Variant 128kB Flash"
  2. Run STM32F1\2020.5.26\libraries\Adafruit_SSD1306\examples\ssd1306_128x64_i2c_STM32

I did all of this, using the origninal example

examples\ssd1306_128x64_i2c_STM32

Still i get errors.

Now that you have said what IDE settings and what sketch, please attach the errors. (Or copy-paste to the message if short enough)

Incidentally, I tried compiling for the fake board selection. And it fails with link errors:

Linking everything together...
"C:\\Users\\David\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\4.8.3-2014q1/bin/arm-none-eabi-g++" -Os -Wl,--gc-sections -mcpu=cortex-m3 "-TC:\\Users\\David\\AppData\\Local\\Arduino15\\packages\\stm32duino\\hardware\\STM32F1\\2020.5.26\\variants\\generic_stm32f103c/ld/jtag_c6.ld" "-Wl,-Map,C:\\Users\\David\\AppData\\Local\\Temp\\arduino_build_307783/ssd1306_128x64_i2c_STM32.ino.map" "-LC:\\Users\\David\\AppData\\Local\\Arduino15\\packages\\stm32duino\\hardware\\STM32F1\\2020.5.26\\variants\\generic_stm32f103c/ld" -o "C:\\Users\\David\\AppData\\Local\\Temp\\arduino_build_307783/ssd1306_128x64_i2c_STM32.ino.elf" "-LC:\\Users\\David\\AppData\\Local\\Temp\\arduino_build_307783" -lm -lgcc -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group "C:\\Users\\David\\AppData\\Local\\Temp\\arduino_build_307783\\sketch\\ssd1306_128x64_i2c_STM32.ino.cpp.o" "C:\\Users\\David\\AppData\\Local\\Temp\\arduino_build_307783\\libraries\\SPI\\SPI.cpp.o" "C:\\Users\\David\\AppData\\Local\\Temp\\arduino_build_307783\\libraries\\Wire\\SoftWire.cpp.o" "C:\\Users\\David\\AppData\\Local\\Temp\\arduino_build_307783\\libraries\\Wire\\Wire.cpp.o" "C:\\Users\\David\\AppData\\Local\\Temp\\arduino_build_307783\\libraries\\Wire\\utility\\WireBase.cpp.o" "C:\\Users\\David\\AppData\\Local\\Temp\\arduino_build_307783\\libraries\\Adafruit_GFX_Library\\glcdfont.c.o" "C:\\Users\\David\\AppData\\Local\\Temp\\arduino_build_307783\\libraries\\Adafruit_GFX_Library\\Adafruit_GFX.cpp.o" "C:\\Users\\David\\AppData\\Local\\Temp\\arduino_build_307783\\libraries\\Adafruit_GFX_Library\\Adafruit_SPITFT.cpp.o" "C:\\Users\\David\\AppData\\Local\\Temp\\arduino_build_307783\\libraries\\Adafruit_SSD1306\\Adafruit_SSD1306_STM32.cpp.o" "C:\\Users\\David\\AppData\\Local\\Temp\\arduino_build_307783\\core\\wirish\\start.S.o" "C:\\Users\\David\\AppData\\Local\\Temp\\arduino_build_307783\\core\\wirish\\start_c.c.o" "C:\\Users\\David\\AppData\\Local\\Temp\\arduino_build_307783\\core\\wirish\\syscalls.c.o" "C:\\Users\\David\\AppData\\Local\\Temp\\arduino_build_307783\\core\\board.cpp.o" "C:\\Users\\David\\AppData\\Local\\Temp\\arduino_build_307783\\core\\wirish\\boards.cpp.o" "C:\\Users\\David\\AppData\\Local\\Temp\\arduino_build_307783\\core\\wirish\\boards_setup.cpp.o" "C:\\Users\\David\\AppData\\Local\\Temp\\arduino_build_307783\\core\\core.a" -Wl,--end-group
c:/users/david/appdata/local/arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: C:\Users\David\AppData\Local\Temp\arduino_build_307783/ssd1306_128x64_i2c_STM32.ino.elf section `.data' will not fit in region `rom'

c:/users/david/appdata/local/arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: region `rom' overflowed by 3416 bytes

David.

upload method: Serial
programmer: AVRISP mkII

This is the error messenge:

C:\Users\izj\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp: In member function 'void Adafruit_SPIDevice::transfer(uint8_t*, size_t)':

C:\Users\izj\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:99:31: error: no matching function for call to 'SPIClass::transfer(uint8_t*&, size_t&)'

_spi->transfer(buffer, len);

^

C:\Users\izj\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:99:31: note: candidate is:

In file included from C:\Users\izj\Documents\Arduino\libraries\Adafruit_BusIO/Adafruit_SPIDevice.h:1:0,

from C:\Users\izj\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:1:

C:\Users\izj\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2020.5.26\libraries\SPI\src/SPI.h:286:11: note: uint8 SPIClass::transfer(uint8) const

uint8 transfer(uint8 data) const;

^

C:\Users\izj\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2020.5.26\libraries\SPI\src/SPI.h:286:11: note: candidate expects 1 argument, 2 provided

Multiple libraries were found for "Wire.h"
Used: C:\Users\izj\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2020.5.26\libraries\Wire
Not used: C:\Users\izj\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2020.5.26\libraries\WireSlave
exit status 1
Error compiling for board Generic STM32F103C series.

What is Adafruit_SPIDevice.h ?

Unless Adafruit have been messing about with their SPI libraries again. And my versions are out of date.

Note that you can see my library version numbers and locations.

David.

Edit. Just updated Adafruit_GFX to v2.2.1 and Adafruit_SSD1306 to v1.8.4

Yes, I get build errors now. I suggest that you downgrade Adafruit_GFX for the moment.
I will have a look at the Adafrut code later. But Adafruit do not always respond to Pull Requests even if it fixes their code.

Damn i feel so stupid. Just downloaded some older versions of the librarys and it compiled just fine. Thats for your effort to help me out.

I have a problem with Wire.h/Wire.cpp. I get an error :-

"C:\Users\Trevor\Documents\Arduino\libraries\Wire\Wire.cpp:53:46: error: too few arguments to function 'void i2c_master_enable(i2c_dev*, uint32, uint32)'

Although the code compiles and runs on an Arduino Uno!

Could this be an incorrect version of Wire.h?

It's driving me nuts!

This happens with ANY graphics sketch that uses Wire.h

Any advice would be welcome

Thanks.

"C:\Users\Trevor\Documents\Arduino\libraries\Wire\Wire.cpp:53:46: error: too few arguments to function 'void i2c_master_enable(i2c_dev*, uint32, uint32)'

The Wire.h library is a "system" library that comes with your core. e.g.

C:\Users\David Prentice\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\libraries\Wire\src\Wire.cpp

If you have a custom user "Wire" library it must be compatible with your core.

File->Preferences: show verbose output during: compilation

Then you can see which libraries were used and where they are located.

David.

Thank you David. I have found that the wire library can be removed from the libraries folder and the sketch still works with a UNO. The sketch compiles on the STM103C and now runs!!

So why should the wire library give a too few arguments error, and why is it needed?

However since I now have it working I will forget about it. I am an electronic engineer NOT a software person!

Thanks for the rapid answer.

Trevor

Hey Hazanovo,

I'm having the same issue and cant seem to get a workaround, can you provide which libraries you downgraded and to which versions? I would love to use stm32 core however theres still a few libraries I use which I don't believe will work on the new core.

Thanks,

It still doesn't work for me, I've tried downgrading the libraries but I get:

/Users/aman/Library/Arduino15/packages/stm32duino/hardware/STM32F1/2020.8.9/libraries/Wire/Wire.cpp:41:7: warning: unused parameter 'stop' [-Wunused-parameter]
 uint8 TwoWire::process(uint8 stop) {
       ^
/Users/aman/Library/Arduino15/packages/stm32duino/hardware/STM32F1/2020.8.9/libraries/Wire/Wire.cpp:86:6: warning: unused parameter 'self_addr' [-Wunused-parameter]
 void TwoWire::begin(uint8 self_addr) {
      ^
/Users/aman/Dropbox/Aman/Documents/Arduino/libraries/Adafruit_GFX_Library/Adafruit_GFX.cpp:1531:6: warning: unused parameter 'i' [-Wunused-parameter]
 void Adafruit_GFX::invertDisplay(boolean i) {
      ^
In file included from /Users/aman/Dropbox/Aman/Documents/Arduino/libraries/Adafruit_GFX_Library/Adafruit_MonoOLED.cpp:18:0:
/Users/aman/Dropbox/Aman/Documents/Arduino/libraries/Adafruit_GFX_Library/Adafruit_MonoOLED.h: In constructor 'Adafruit_MonoOLED::Adafruit_MonoOLED(uint16_t, uint16_t, TwoWire*, int8_t, uint32_t, uint32_t)':
/Users/aman/Dropbox/Aman/Documents/Arduino/libraries/Adafruit_GFX_Library/Adafruit_MonoOLED.h:92:7: warning: 'Adafruit_MonoOLED::rstPin' will be initialized after [-Wreorder]
       rstPin; ///< The Arduino pin connected to reset (-1 if unused)
       ^
/Users/aman/Dropbox/Aman/Documents/Arduino/libraries/Adafruit_GFX_Library/Adafruit_MonoOLED.h:81:24: warning:   'int32_t Adafruit_MonoOLED::i2c_preclk' [-Wreorder]
   int32_t i2c_preclk = 400000,        ///< Configurable 'high speed' I2C rate
                        ^
/Users/aman/Dropbox/Aman/Documents/Arduino/libraries/Adafruit_GFX_Library/Adafruit_MonoOLED.cpp:60:1: warning:   when initialized here [-Wreorder]
 Adafruit_MonoOLED::Adafruit_MonoOLED(uint16_t w, uint16_t h, TwoWire *twi,
 ^
/Users/aman/Dropbox/Aman/Documents/Arduino/libraries/Adafruit_GFX_Library/Adafruit_SPITFT.cpp:979:6: warning: unused parameter 'block' [-Wunused-parameter]
 void Adafruit_SPITFT::writePixels(uint16_t *colors, uint32_t len, bool block,
      ^
/Users/aman/Dropbox/Aman/Documents/Arduino/libraries/Adafruit_GFX_Library/Adafruit_SPITFT.cpp:979:6: warning: unused parameter 'bigEndian' [-Wunused-parameter]
/Users/aman/Dropbox/Aman/Documents/Arduino/libraries/Adafruit_GFX_Library/Adafruit_SPITFT.cpp:1960:10: warning: unused parameter 'addr' [-Wunused-parameter]
 uint16_t Adafruit_SPITFT::readcommand16(uint16_t addr) {
          ^
/Users/aman/Dropbox/Aman/Documents/Arduino/libraries/Adafruit_GFX_Library/Adafruit_SPITFT.cpp:2165:6: warning: unused parameter 'w' [-Wunused-parameter]
 void Adafruit_SPITFT::write16(uint16_t w) {
      ^
/Users/aman/Dropbox/Aman/Documents/Arduino/libraries/Adafruit_SSD1306/Adafruit_SSD1306.cpp:233:1: warning: unused parameter 'bitrate' [-Wunused-parameter]
 Adafruit_SSD1306::Adafruit_SSD1306(uint8_t w, uint8_t h, SPIClass *spi,
 ^
/Users/aman/Dropbox/Aman/Documents/Arduino/libraries/Adafruit_BusIO/Adafruit_SPIDevice.cpp: In member function 'void Adafruit_SPIDevice::transfer(uint8_t*, size_t)':
/Users/aman/Dropbox/Aman/Documents/Arduino/libraries/Adafruit_BusIO/Adafruit_SPIDevice.cpp:115:31: error: no matching function for call to 'SPIClass::transfer(uint8_t*&, size_t&)'
     _spi->transfer(buffer, len);
                               ^
/Users/aman/Dropbox/Aman/Documents/Arduino/libraries/Adafruit_BusIO/Adafruit_SPIDevice.cpp:115:31: note: candidate is:
In file included from /Users/aman/Dropbox/Aman/Documents/Arduino/libraries/Adafruit_BusIO/Adafruit_SPIDevice.h:1:0,
                 from /Users/aman/Dropbox/Aman/Documents/Arduino/libraries/Adafruit_BusIO/Adafruit_SPIDevice.cpp:1:
/Users/aman/Library/Arduino15/packages/stm32duino/hardware/STM32F1/2020.8.9/libraries/SPI/src/SPI.h:285:11: note: uint8 SPIClass::transfer(uint8) const
     uint8 transfer(uint8 data) const;
           ^
/Users/aman/Library/Arduino15/packages/stm32duino/hardware/STM32F1/2020.8.9/libraries/SPI/src/SPI.h:285:11: note:   candidate expects 1 argument, 2 provided
exit status 1
Error compiling for board Generic STM32F103C series.

Any solutions to this?