Help with NANO Every ILI9341 Library

Hi Guys, I am trying to make a project using a NANO Every (my first project with this device)
I cant seem to locate the correct library for using a ILI9341. I read someplace that I should use
the library ILI9341_due.h but when I compile with it I get a boat load of compiling errors

Arduino: 1.8.19 (Windows 10), Board: "Arduino Nano Every, None (ATMEGA4809)"

In file included from C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master\examples\graphicstest\graphicstest.ino:19:0:

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:417:23: error: 'SCANLINE_PIXEL_COUNT' was not declared in this scope

  uint16_t _scanline16[SCANLINE_PIXEL_COUNT];

                       ^~~~~~~~~~~~~~~~~~~~

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:417:23: note: suggested alternative: 'SPI_INTERFACES_COUNT'

  uint16_t _scanline16[SCANLINE_PIXEL_COUNT];

                       ^~~~~~~~~~~~~~~~~~~~

                       SPI_INTERFACES_COUNT

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h: In member function 'void ILI9341_due::write8_cont(uint8_t)':

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:896:3: error: 'dmaSend' was not declared in this scope

   dmaSend(c);

   ^~~~~~~

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:896:3: note: suggested alternative: 'va_end'

   dmaSend(c);

   ^~~~~~~

   va_end

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h: In member function 'void ILI9341_due::write8_last(uint8_t)':

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:910:3: error: 'dmaSend' was not declared in this scope

   dmaSend(c);

   ^~~~~~~

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:910:3: note: suggested alternative: 'va_end'

   dmaSend(c);

   ^~~~~~~

   va_end

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h: In member function 'void ILI9341_due::write16_cont(uint16_t)':

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:925:3: error: 'dmaSend' was not declared in this scope

   dmaSend(highByte(d));

   ^~~~~~~

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:925:3: note: suggested alternative: 'va_end'

   dmaSend(highByte(d));

   ^~~~~~~

   va_end

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h: In member function 'void ILI9341_due::write16_last(uint16_t)':

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:939:3: error: 'dmaSend' was not declared in this scope

   dmaSend(highByte(d));

   ^~~~~~~

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:939:3: note: suggested alternative: 'va_end'

   dmaSend(highByte(d));

   ^~~~~~~

   va_end

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h: In member function 'void ILI9341_due::write_cont(uint16_t*, uint32_t)':

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:1194:3: error: 'dmaSend' was not declared in this scope

   dmaSend(buf, n);

   ^~~~~~~

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:1194:3: note: suggested alternative: 'va_end'

   dmaSend(buf, n);

   ^~~~~~~

   va_end

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h: In member function 'void ILI9341_due::write_cont(const uint16_t*, uint32_t)':

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:1205:3: error: 'dmaSend' was not declared in this scope

   dmaSend(buf, n);

   ^~~~~~~

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:1205:3: note: suggested alternative: 'va_end'

   dmaSend(buf, n);

   ^~~~~~~

   va_end

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h: In member function 'void ILI9341_due::read_cont(uint8_t*, uint32_t)':

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:1212:3: error: 'dmaReceive' was not declared in this scope

   dmaReceive(buf, n);

   ^~~~~~~~~~

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h: In member function 'void ILI9341_due::writeScanline16(uint32_t)':

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:1274:11: error: '_scanline16' was not declared in this scope

   dmaSend(_scanline16, n); // each pixel is 2 bytes

           ^~~~~~~~~~~

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:1274:11: note: suggested alternative: 'fillScanline16'

   dmaSend(_scanline16, n); // each pixel is 2 bytes

           ^~~~~~~~~~~

           fillScanline16

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:1274:3: error: 'dmaSend' was not declared in this scope

   dmaSend(_scanline16, n); // each pixel is 2 bytes

   ^~~~~~~

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:1274:3: note: suggested alternative: 'va_end'

   dmaSend(_scanline16, n); // each pixel is 2 bytes

   ^~~~~~~

   va_end

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h: In member function 'void ILI9341_due::writeScanlineLooped(uint32_t)':

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:1283:11: error: 'SCANLINE_PIXEL_COUNT' was not declared in this scope

   if (n > SCANLINE_PIXEL_COUNT) {

           ^~~~~~~~~~~~~~~~~~~~

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:1283:11: note: suggested alternative: 'SPI_INTERFACES_COUNT'

   if (n > SCANLINE_PIXEL_COUNT) {

           ^~~~~~~~~~~~~~~~~~~~

           SPI_INTERFACES_COUNT

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:1291:35: error: 'SCANLINE_PIXEL_COUNT' was not declared in this scope

   uint16_t remainingPixels = n == SCANLINE_PIXEL_COUNT ? SCANLINE_PIXEL_COUNT : n % SCANLINE_PIXEL_COUNT;

                                   ^~~~~~~~~~~~~~~~~~~~

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:1291:35: note: suggested alternative: 'SPI_INTERFACES_COUNT'

   uint16_t remainingPixels = n == SCANLINE_PIXEL_COUNT ? SCANLINE_PIXEL_COUNT : n % SCANLINE_PIXEL_COUNT;

                                   ^~~~~~~~~~~~~~~~~~~~

                                   SPI_INTERFACES_COUNT

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h: In member function 'uint8_t ILI9341_due::read8_cont()':

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:1326:10: error: 'dmaReceive' was not declared in this scope

   return dmaReceive();

          ^~~~~~~~~~

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h: In member function 'uint8_t ILI9341_due::read8_last()':

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:1339:15: error: 'dmaReceive' was not declared in this scope

   uint8_t r = dmaReceive();

               ^~~~~~~~~~

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h: In member function 'uint16_t ILI9341_due::read16()':

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:1357:16: error: 'dmaReceive' was not declared in this scope

   uint16_t r = dmaReceive();

                ^~~~~~~~~~

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h: In member function 'uint16_t ILI9341_due::readPixel_start_cont()':

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:1376:16: error: 'dmaReceive' was not declared in this scope

   uint16_t r = dmaReceive();

                ^~~~~~~~~~

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h: In member function 'void ILI9341_due::fillScanline16(uint16_t)':

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:1462:28: error: 'SCANLINE_PIXEL_COUNT' was not declared in this scope

   for (uint16_t i = 0; i < SCANLINE_PIXEL_COUNT; i++)

                            ^~~~~~~~~~~~~~~~~~~~

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:1462:28: note: suggested alternative: 'SPI_INTERFACES_COUNT'

   for (uint16_t i = 0; i < SCANLINE_PIXEL_COUNT; i++)

                            ^~~~~~~~~~~~~~~~~~~~

                            SPI_INTERFACES_COUNT

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:1464:4: error: '_scanline16' was not declared in this scope

    _scanline16[i] = color;

    ^~~~~~~~~~~

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:1464:4: note: suggested alternative: 'fillScanline16'

    _scanline16[i] = color;

    ^~~~~~~~~~~

    fillScanline16

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h: In member function 'void ILI9341_due::fillScanline16(uint16_t, uint16_t)':

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:1473:4: error: '_scanline16' was not declared in this scope

    _scanline16[i] = color;

    ^~~~~~~~~~~

C:\Users\Rick's\Documents\Arduino\libraries\ILI9341_due-master/ILI9341_due.h:1473:4: note: suggested alternative: 'fillScanline16'

    _scanline16[i] = color;

    ^~~~~~~~~~~

    fillScanline16

exit status 1

Error compiling for board Arduino Nano Every.

any help would be greatly appreciated!
Rick

It seems that this library is incompatible with atmega4809 controller, because as far I can see the library uses DMA that is not in the controller used.

Either you misunderstood or that "someplace" talks nonsense in which case you should never visit that "someplace" again.

Is there a reason that you haven't tried the Adafruit ILI9341 library? I don't have a 4809 based board but the example codes do compile.

The "someplace" was on google...
I will try the Adafruit Library in a few minuets.

Rick

Hi sterretje,

When I try the Adafruit ILI9341 Library Version 1.5.12 the examples do not compile either.
is there another version I should be using?

Rick

Using Version 1.5.12 of "Adafruit_ILI9341.h" installed from the Library manager with 1.8.19 I can compile the first library example "Graphics Test" for the Nano Every.

Please post the verbose error message you are getting.

There may be issues with the SPI setup and bus speed given that the architecture of the Nano Every is not explicitly dealt by the library and the default values for unspecified boards may not be correct.

If I read the snippet right, it says: …\libraries\ILI9341_due-master\examples\graphicstest\graphicstest.ino
The DUE has a SAM chip, the Nano Every has a 4809 chip. It will never work.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.