Go Down

Topic: ILI9341(new)SPI library for Due supporting DMA transfer(Uno, Mega,.. compatible) (Read 177138 times) previous topic - next topic

Rossp


Still trying to develop an analog gauge on the Due but all examples fail to compile with error report in my previous post.
Examples work well on the Mega2560 but the display responds very slow.

Does anyone have an idea what this error below means ? Thank you in advance.


Arduino: 1.6.9 (Windows 10), Board: "Arduino Due (Programming Port)"

arcs:14: error: cannot allocate an object of abstract type 'ILI9341_due'

ILI9341_due tft = ILI9341_due(TFT_CS, TFT_DC, TFT_RST);

Rossp


Still trying to develop an analog gauge on the Due but all examples fail to compile with error report in my previous post.
Examples work well on the Mega2560 but the display responds very slow.

Does anyone have an idea what this error below means ? Thank you in advance.


Arduino: 1.6.9 (Windows 10), Board: "Arduino Due (Programming Port)"

arcs:14: error: cannot allocate an object of abstract type 'ILI9341_due'

ILI9341_due tft = ILI9341_due(TFT_CS, TFT_DC, TFT_RST);

david_prentice

I compiled the arcs example from the ILI9341_due library for a DUE:
Code: [Select]

Using library SPI at version 1.0 in folder: C:\Users\David Prentice\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.11\libraries\SPI
Using library ILI9341_due-master in folder: C:\Users\David Prentice\Documents\Arduino\libraries\ILI9341_due-master (legacy)
Sketch uses 70092 bytes (13%) of program storage space. Maximum is 524288 bytes.

I then built for a MEGA2560.   I did not run it on real hardware.
Code: [Select]

Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino-1.8.1\hardware\arduino\avr\libraries\SPI
Using library ILI9341_due-master in folder: C:\Users\David Prentice\Documents\Arduino\libraries\ILI9341_due-master (legacy)
Sketch uses 35874 bytes (14%) of program storage space. Maximum is 253952 bytes.
Global variables use 435 bytes (5%) of dynamic memory, leaving 7757 bytes for local variables. Maximum is 8192 bytes.


The HEX file is too big for a Uno.    But smaller examples build and run fine on a Uno.

My ILI9341_due is dated 23-Feb-2018 i.e. that is when I installed it on my PC.
It is not supported by the Library Manager.   It does not have a version number.

I suggest that you delete your current version and re-install from Marek's GitHub repository https://github.com/marekburiak/ILI9341_due

I have no intention of putting a 3.3V display on a 5V MEGA2560.
But we can certainly help you build the examples.

David.

Rossp

Many thanks David for your quick reply, as you suggest I'll delete the old install of the library, try a fresh install  and let you know how it goes.

PS
I use a 3.3v Mega2560 pro mini from Robotdyn for my ili9341 TFT displays and it works very well without having to use a level shifter, for the same price as a standard 5v Mega2560.

Thanks
Ross

Rossp

Unfortunately after removing, redownloading and reinstalling the ili9341_due library as suggested, still have the same compile error code for any of the built-in examples for Due board. Examples compile and function well for the Mega however so I modified the config.h file of the library to Normal (not DMA) mode and still have the same compile problem.
Even though I have successfully succeeded with other Due projects in the past 6 months there must be some fundamental flaw with my PC installation somewhere. I wonder if there's an upgrade or downgrade for the Due board.

Thanks
Ross

david_prentice

You use the Library Manager to install/upgrade a library
You use the Boards Manager to install/upgrade the SAM Boards (or any other third party boards).

Marek wrote the library several years ago.   It has always worked on Due, Uno, ...

I suspect your Due installation is corrupt or just out of date.

As a general rule,  you would use Transactions if you have multiple SPI devices e.g. SD card + ILI9341

David.

Rossp

Since the ili9341_due library is a couple years now and my SAM board install for the Due is the latest version at 1.6.11 perhaps this is the issue. I wonder what was the SAM hardware version at the release date of the library.
What version are you running to compile properly David ?

Thanks
Ross

david_prentice

My Due installation is 1.6.11 too.
#587  says that library is circa Feb 2018.

I presume that I had earlier versions of library and Due.    And they worked fine too.
I can't recall anyone having build problems.    They would have cropped up in this thread.

I would just reinstall everything and try again.
Mind you,   I suspect that you have done something silly in the config file.

David.

Rossp

I double checked my SPI is 1.0 and the config.h file is as originally issued in DMA mode for Due and Transactions are off. What version of Arduino IDE are you running ?

david_prentice

As you can see from #587.   On my Desktop Win10-64 PC the SAM package is 1.6.11
Code: [Select]

Using library SPI at version 1.0 in folder: C:\Users\David Prentice\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.11\libraries\SPI

And the AVR IDE is 1.8.1
Code: [Select]

Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino-1.8.1\hardware\arduino\avr\libraries\SPI


So I checked my Win7-32 Laptop PC the SAM package is 1.6.11,  IDE is 1.8.8
The ILI9341_due library was circa Jan 2017.  
So I left IDE.  Deleted the directory.  Started the IDE.  I have installed the current Beta on GitHub as of 14.00 UTC today.

Note that the library is not supported by the Library Manager.   I had to install from ZIP.   Hence the leave/delete/start IDE procedure.

Code: [Select]

Using library SPI at version 1.0 in folder: C:\Users\David\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.11\libraries\SPI
Using library ILI9341_due-master in folder: C:\Users\David\Documents\Arduino\libraries\ILI9341_due-master (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_667354/arcs.ino.elf"
Sketch uses 70092 bytes (13%) of program storage space. Maximum is 524288 bytes.


I have used the default examples and config.
The arcs example built and is running on a Due without problem.

David.

Rossp

I compared all your installs with  mine and found no major differences on my Win10 PC so I installed everything on my old WinXP machine and  all works fine on it. I can complete my analog gauge project now and see how well it functions with the ili9341_due library on the Due. There's a relatively new ili9341_eSpi library for the esp8266 which works very using sprites for analog gauges.

Many thanks David for all your assistance it's greatly appreciated.

Ross

david_prentice

I am pleased that you have it working now.

Have you worked out where your problem was?

David.

Rossp

The compile issue remains on my Win10 PC so I resurrected my old WinXP PC and it works fine on it.

Thanks
Ross

david_prentice

Ok,  so you have a problem with your Win10-64 installation,

I would just re-install.    Many punters will be using Win10-64.

David.

Rossp

Yes a reinstall but it's risky for old projects.

Made a bit of progress on my old WinXP machine which supports this Due library on Due but found out very quickly that the instruction tft.drawfloat() is not supported nor can I find a way to display any float variables to one decimal point.

Any ideas how it can be achieved ?

Go Up