0

2.8" TFT V2 breakout... SDConfig.h issues when compiling cod
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

2.8" TFT V2 breakout... SDConfig.h issues when compiling cod

by doublec4 on Thu Dec 19, 2019 3:38 pm

Hi All,

I'm trying to complete the example of displaying .bmp images from the SD card from the Adafruit learning center.

I have had the screen working with the 'graphicstest' example earlier in the tutorial so I know the wiring is correct.

I am getting the compiler errors with the unforked version of SDFat:

#error ENABLE_EXTENDED_TRANSFER_CLASS must be set to 1 in SdFat SdFatConfig.h
#error FAT12_SUPPORT must be set to 1 in SdFat SdFatConfig.h

When I go into the SDFatConfig and change those values appropriately, the result is a partition on the SD card with a bunch of files on it that appear to pertain to a Raspberry Pi ? Then my Serial monitor spits out that it cannot find the bmp files that I originally had on the card (since now they are on a separate partition).

If I used the Adafruit forked version of SDFat, I get a huge myriad of warnings from the compiler related to integer overflows, string conversions, etc:

Code: Select all | TOGGLE FULL SIZE
In file included from \\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlash.h:31:0,

                 from \\xxxx\My Documents\Arduino\WPD_LogoDEMO\WPD_LogoDEMO.ino:13:

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlashBase.h:35:26: warning: integer overflow in expression [-Woverflow]

   SFLASH_BLOCK_SIZE  = 64*1024,

                        ~~^~~~~

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlashBase.h:35:27: warning: overflow in constant expression [-fpermissive]

   SFLASH_BLOCK_SIZE  = 64*1024,

                           ^~~~

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlashBase.h:35:27: warning: overflow in constant expression [-fpermissive]

\\xxxx\My Documents\Arduino\WPD_LogoDEMO\WPD_LogoDEMO.ino: In function 'void setup()':

\\xxxx\My Documents\Arduino\WPD_LogoDEMO\WPD_LogoDEMO.ino:93:47: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]

   stat = reader.drawBMP("/logo.bmp", tft, 0, 0);

                                               ^

\\xxxx\My Documents\Arduino\WPD_LogoDEMO\WPD_LogoDEMO.ino:98:61: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]

   stat = reader.bmpDimensions("/parrot.bmp", &width, &height);

                                                             ^

\\xxxx\My Documents\Arduino\WPD_LogoDEMO\WPD_LogoDEMO.ino: In function 'void loop()':

\\xxxx\My Documents\Arduino\WPD_LogoDEMO\WPD_LogoDEMO.ino:129:46: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]

         (tft.height() * i / 3) - (height / 2));

                                              ^

In file included from \\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_SPIFlashBase.cpp:2:0:

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_SPIFlashBase.h:35:26: warning: integer overflow in expression [-Woverflow]

   SFLASH_BLOCK_SIZE  = 64*1024,

                        ~~^~~~~

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_SPIFlashBase.h:35:27: warning: overflow in constant expression [-fpermissive]

   SFLASH_BLOCK_SIZE  = 64*1024,

                           ^~~~

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_SPIFlashBase.h:35:27: warning: overflow in constant expression [-fpermissive]

In file included from \\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_SPIFlashBase.h:31:0,

                 from \\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_SPIFlashBase.cpp:2:

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\flash_devices.h:91:25: warning: left shift count >= width of type [-Wshift-count-overflow]

     .total_size = (1 << 21), /* 2 MiB */ \

                         ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_SPIFlashBase.cpp:22:3: note: in expansion of macro 'GD25Q16C'

   GD25Q16C, GD25Q64C,    // Main devices current Adafruit

   ^~~~~~~~

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\flash_devices.h:109:25: warning: left shift count >= width of type [-Wshift-count-overflow]

     .total_size = (1 << 23), /* 8 MiB */ \

                         ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_SPIFlashBase.cpp:22:13: note: in expansion of macro 'GD25Q64C'

   GD25Q16C, GD25Q64C,    // Main devices current Adafruit

             ^~~~~~~~

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\flash_devices.h:145:25: warning: left shift count >= width of type [-Wshift-count-overflow]

     .total_size = (1 << 21), /* 2 MiB */ \

                         ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_SPIFlashBase.cpp:23:3: note: in expansion of macro 'S25FL116K'

   S25FL116K, S25FL216K,

   ^~~~~~~~~

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\flash_devices.h:163:25: warning: left shift count >= width of type [-Wshift-count-overflow]

     .total_size = (1 << 21), /* 2 MiB */ \

                         ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_SPIFlashBase.cpp:23:14: note: in expansion of macro 'S25FL216K'

   S25FL116K, S25FL216K,

              ^~~~~~~~~

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\flash_devices.h:181:25: warning: left shift count >= width of type [-Wshift-count-overflow]

     .total_size = (1 << 21), /* 2 MiB */ \

                         ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_SPIFlashBase.cpp:24:3: note: in expansion of macro 'W25Q16FW'

   W25Q16FW, W25Q64JV_IQ, // Only a handful of production run

   ^~~~~~~~

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\flash_devices.h:286:25: warning: left shift count >= width of type [-Wshift-count-overflow]

     .total_size = (1 << 23), /* 8 MiB */ \

                         ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_SPIFlashBase.cpp:24:13: note: in expansion of macro 'W25Q64JV_IQ'

   W25Q16FW, W25Q64JV_IQ, // Only a handful of production run

             ^~~~~~~~~~~

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\flash_devices.h:378:25: warning: left shift count >= width of type [-Wshift-count-overflow]

     .total_size = (1 << 23), /* 8 MiB */ \

                         ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_SPIFlashBase.cpp:26:3: note: in expansion of macro 'MX25R6435F'

   MX25R6435F,            // Nordic PCA10056

   ^~~~~~~~~~

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_SPIFlashBase.cpp: In member function 'uint32_t Adafruit_SPIFlashBase::getJEDECID()':

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_SPIFlashBase.cpp:143:42: warning: left shift count >= width of type [-Wshift-count-overflow]

   return (_flash_dev->manufacturer_id << 16) | (_flash_dev->memory_type << 8) | _flash_dev->capacity;

                                          ^~

In file included from \\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_SPIFlash.h:31:0,

                 from \\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_SPIFlash.cpp:1:

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_SPIFlashBase.h:35:26: warning: integer overflow in expression [-Woverflow]

   SFLASH_BLOCK_SIZE  = 64*1024,

                        ~~^~~~~

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_SPIFlashBase.h:35:27: warning: overflow in constant expression [-fpermissive]

   SFLASH_BLOCK_SIZE  = 64*1024,

                           ^~~~

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_SPIFlashBase.h:35:27: warning: overflow in constant expression [-fpermissive]

In file included from \\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_SPIFlash.h:31:0,

                 from \\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_FlashCache.cpp:25:

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_SPIFlashBase.h:35:26: warning: integer overflow in expression [-Woverflow]

   SFLASH_BLOCK_SIZE  = 64*1024,

                        ~~^~~~~

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_SPIFlashBase.h:35:27: warning: overflow in constant expression [-fpermissive]

   SFLASH_BLOCK_SIZE  = 64*1024,

                           ^~~~

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src\Adafruit_SPIFlashBase.h:35:27: warning: overflow in constant expression [-fpermissive]

In file included from \\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlash.h:31:0,

                 from \\xxxx\My Documents\Arduino\libraries\Adafruit_ImageReader\Adafruit_ImageReader.h:19,

                 from \\xxxx\My Documents\Arduino\libraries\Adafruit_ImageReader\Adafruit_ImageReader.cpp:39:

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlashBase.h:35:26: warning: integer overflow in expression [-Woverflow]

   SFLASH_BLOCK_SIZE  = 64*1024,

                        ~~^~~~~

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlashBase.h:35:27: warning: overflow in constant expression [-fpermissive]

   SFLASH_BLOCK_SIZE  = 64*1024,

                           ^~~~

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlashBase.h:35:27: warning: overflow in constant expression [-fpermissive]

In file included from \\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlash.h:31:0,

                 from \\xxxx\My Documents\Arduino\libraries\Adafruit_ImageReader\Adafruit_ImageReader.h:19,

                 from \\xxxx\My Documents\Arduino\libraries\Adafruit_ImageReader\Adafruit_ImageReader_EPD.h:18,

                 from \\xxxx\My Documents\Arduino\libraries\Adafruit_ImageReader\Adafruit_ImageReader_EPD.cpp:1:

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlashBase.h:35:26: warning: integer overflow in expression [-Woverflow]

   SFLASH_BLOCK_SIZE  = 64*1024,

                        ~~^~~~~

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlashBase.h:35:27: warning: overflow in constant expression [-fpermissive]

   SFLASH_BLOCK_SIZE  = 64*1024,

                           ^~~~

\\xxxx\My Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlashBase.h:35:27: warning: overflow in constant expression [-fpermissive]

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD/Adafruit_MCPSRAM.h:15:7: warning: type 'struct Adafruit_MCPSRAM' violates the C++ One Definition Rule [-Wodr]

 class Adafruit_MCPSRAM {

       ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.h:15:7: note: a different type is defined in another translation unit

 class Adafruit_MCPSRAM {

       ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD/Adafruit_MCPSRAM.h:39:13: note: the first difference of corresponding definitions is field 'mosiport'

    PortReg *mosiport, *clkport, *csport, *misoport;

             ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.h:42:9: note: a field with different name is defined in another translation unit

  int8_t _cs, _mosi, _miso, _sck;

         ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.h:34:7: warning: 'csLow' violates the C++ One Definition Rule  [-Wodr]

  void csLow();

       ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.cpp:381:6: note: implicit this pointer type mismatch

 void Adafruit_MCPSRAM::csLow()

      ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.h:15:7: note: type 'struct Adafruit_MCPSRAM' itself violates the C++ One Definition Rule

 class Adafruit_MCPSRAM {

       ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD/Adafruit_MCPSRAM.h:15:7: note: the incompatible type is defined here

 class Adafruit_MCPSRAM {

       ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.cpp:381:6: note: 'csLow' was previously declared here

 void Adafruit_MCPSRAM::csLow()

      ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.cpp:381:6: note: code may be misoptimized unless -fno-strict-aliasing is used

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.h:33:7: warning: 'csHigh' violates the C++ One Definition Rule  [-Wodr]

  void csHigh();

       ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.cpp:364:6: note: implicit this pointer type mismatch

 void Adafruit_MCPSRAM::csHigh()

      ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.h:15:7: note: type 'struct Adafruit_MCPSRAM' itself violates the C++ One Definition Rule

 class Adafruit_MCPSRAM {

       ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD/Adafruit_MCPSRAM.h:15:7: note: the incompatible type is defined here

 class Adafruit_MCPSRAM {

       ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.cpp:364:6: note: 'csHigh' was previously declared here

 void Adafruit_MCPSRAM::csHigh()

      ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.cpp:364:6: note: code may be misoptimized unless -fno-strict-aliasing is used

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.h:21:7: warning: 'begin' violates the C++ One Definition Rule  [-Wodr]

  void begin();

       ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.cpp:42:6: note: implicit this pointer type mismatch

 void Adafruit_MCPSRAM::begin()

      ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.h:15:7: note: type 'struct Adafruit_MCPSRAM' itself violates the C++ One Definition Rule

 class Adafruit_MCPSRAM {

       ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD/Adafruit_MCPSRAM.h:15:7: note: the incompatible type is defined here

 class Adafruit_MCPSRAM {

       ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.cpp:42:6: note: 'begin' was previously declared here

 void Adafruit_MCPSRAM::begin()

      ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.cpp:42:6: note: code may be misoptimized unless -fno-strict-aliasing is used

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.h:18:2: warning: '__comp_ctor ' violates the C++ One Definition Rule  [-Wodr]

  Adafruit_MCPSRAM(int8_t cs);

  ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.cpp:31:1: note: implicit this pointer type mismatch

 Adafruit_MCPSRAM::Adafruit_MCPSRAM(int8_t cs)

 ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.h:15:7: note: type 'struct Adafruit_MCPSRAM' itself violates the C++ One Definition Rule

 class Adafruit_MCPSRAM {

       ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD/Adafruit_MCPSRAM.h:15:7: note: the incompatible type is defined here

 class Adafruit_MCPSRAM {

       ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.cpp:31:1: note: '__comp_ctor ' was previously declared here

 Adafruit_MCPSRAM::Adafruit_MCPSRAM(int8_t cs)

 ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.cpp:31:1: note: code may be misoptimized unless -fno-strict-aliasing is used

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.h:17:2: warning: '__comp_ctor ' violates the C++ One Definition Rule  [-Wodr]

  Adafruit_MCPSRAM(int8_t mosi, int8_t miso, int8_t sck, int8_t cs);

  ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.cpp:16:1: note: implicit this pointer type mismatch

 Adafruit_MCPSRAM::Adafruit_MCPSRAM(int8_t mosi, int8_t miso, int8_t sck, int8_t cs)

 ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.h:15:7: note: type 'struct Adafruit_MCPSRAM' itself violates the C++ One Definition Rule

 class Adafruit_MCPSRAM {

       ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD/Adafruit_MCPSRAM.h:15:7: note: the incompatible type is defined here

 class Adafruit_MCPSRAM {

       ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.cpp:16:1: note: '__comp_ctor ' was previously declared here

 Adafruit_MCPSRAM::Adafruit_MCPSRAM(int8_t mosi, int8_t miso, int8_t sck, int8_t cs)

 ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.cpp:16:1: note: code may be misoptimized unless -fno-strict-aliasing is used

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.h:25:7: warning: 'erase' violates the C++ One Definition Rule  [-Wodr]

  void erase(uint16_t addr, uint16_t length, uint8_t val = 0x00);

       ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.cpp:299:6: note: implicit this pointer type mismatch

 void Adafruit_MCPSRAM::erase(uint16_t addr, uint16_t length, uint8_t val)

      ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.h:15:7: note: type 'struct Adafruit_MCPSRAM' itself violates the C++ One Definition Rule

 class Adafruit_MCPSRAM {

       ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD/Adafruit_MCPSRAM.h:15:7: note: the incompatible type is defined here

 class Adafruit_MCPSRAM {

       ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.cpp:299:6: note: 'erase' was previously declared here

 void Adafruit_MCPSRAM::erase(uint16_t addr, uint16_t length, uint8_t val)

      ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.cpp:299:6: note: code may be misoptimized unless -fno-strict-aliasing is used

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.h:30:7: warning: 'write8' violates the C++ One Definition Rule  [-Wodr]

  void write8(uint16_t addr, uint8_t val, uint8_t reg = MCPSRAM_WRITE);

       ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.cpp:271:6: note: implicit this pointer type mismatch

 void Adafruit_MCPSRAM::write8(uint16_t addr, uint8_t val, uint8_t reg)

      ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.h:15:7: note: type 'struct Adafruit_MCPSRAM' itself violates the C++ One Definition Rule

 class Adafruit_MCPSRAM {

       ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD/Adafruit_MCPSRAM.h:15:7: note: the incompatible type is defined here

 class Adafruit_MCPSRAM {

       ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.cpp:271:6: note: 'write8' was previously declared here

 void Adafruit_MCPSRAM::write8(uint16_t addr, uint8_t val, uint8_t reg)

      ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.cpp:271:6: note: code may be misoptimized unless -fno-strict-aliasing is used

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.h:27:10: warning: 'read8' violates the C++ One Definition Rule  [-Wodr]

  uint8_t read8(uint16_t addr, uint8_t reg = MCPSRAM_READ);

          ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.cpp:242:9: note: implicit this pointer type mismatch

 uint8_t Adafruit_MCPSRAM::read8(uint16_t addr, uint8_t reg)

         ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.h:15:7: note: type 'struct Adafruit_MCPSRAM' itself violates the C++ One Definition Rule

 class Adafruit_MCPSRAM {

       ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD/Adafruit_MCPSRAM.h:15:7: note: the incompatible type is defined here

 class Adafruit_MCPSRAM {

       ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.cpp:242:9: note: 'read8' was previously declared here

 uint8_t Adafruit_MCPSRAM::read8(uint16_t addr, uint8_t reg)

         ^

\\xxxx\My Documents\Arduino\libraries\Adafruit_EPD\Adafruit_MCPSRAM.cpp:242:9: note: code may be misoptimized unless -fno-strict-aliasing is used

Sketch uses 23174 bytes (71%) of program storage space. Maximum is 32256 bytes.
Global variables use 1165 bytes (56%) of dynamic memory, leaving 883 bytes for local variables. Maximum is 2048 bytes.


The bmp images show up... a little weird behavior with how they are displayed... but they are displayed. The serial monitor tells that:

Initializing filesystem...SD begin() failed

Good news is that no partition has been made...

So... what is causing all these warnings and should I be concerned?

doublec4
 
Posts: 8
Joined: Sat Apr 20, 2019 12:23 am

Re: 2.8" TFT V2 breakout... SDConfig.h issues when compiling

by adafruit_support_mike on Fri Dec 20, 2019 2:22 am

Those errors say they're coming from our library for SPI Flash chips on the Express series of boards.

It looks like the compiler is trying to use a 16-bit number for the enumeration that sets the sizes for the memory array on such a Flash chip, and the warning says you're trying to fit a 17-bit value into a 16-bit word.

It looks like the enum is just being used as a way to define constants, so you can probably make the errors go away by defining those three values as 'const uint32_t'.

adafruit_support_mike
 
Posts: 60783
Joined: Thu Feb 11, 2010 2:51 pm

Re: 2.8" TFT V2 breakout... SDConfig.h issues when compiling

by adafruit2 on Sun Dec 22, 2019 5:19 pm

doublec4, what exact board are you compiling for? Arduino UNO?
to make it easier for us - please make sure you're running IDE 1.8.8 and update/install all your libraries using the library manager - that will help us be able to reproduce the issue. post a screenshot of your IDE tools menu too :)

adafruit2
Site Admin
 
Posts: 19059
Joined: Fri Mar 11, 2005 7:36 pm

Please be positive and constructive with your questions and comments.