uC32 Doesn't recognize any TFT / LCD Screens

VHDL-BPA
Posts: 11
Joined: Tue Dec 27, 2016 7:19 pm

Re: uC32 Doesn't recognize any TFT / LCD Screens

Post by VHDL-BPA » Thu Dec 29, 2016 11:10 pm

Nothing changed. It still fails to compile and has the same long list of errors that I can't make sense of.

User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: uC32 Doesn't recognize any TFT / LCD Screens

Post by majenko » Fri Dec 30, 2016 12:34 pm

Could you maybe, I dunno, like share said errors? It's hard to know what is going on when you keep us in the dark like this.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

VHDL-BPA
Posts: 11
Joined: Tue Dec 27, 2016 7:19 pm

Re: uC32 Doesn't recognize any TFT / LCD Screens

Post by VHDL-BPA » Fri Dec 30, 2016 7:08 pm

Sorry! Here is my code and the list of errors.


#include <HX8357.h>
#include <DisplayCore.h>
#include <DSPI.h>

DSPI0 spi;
TFTDSPI mySpi(spi, 7, 10);
HX8357 tft(&mySpi);

void setup()
{
Serial.begin(115200);
pinMode(9, OUTPUT);
digitalWrite(9, HIGH);
tft.initializeDevice();

tft.fillScreen(Color::Black);
tft.setTextColor(Color::Red);
}

void loop()
{
tft.setCursor(10, 10);
tft.print(millis());
}

----------------------------------------------------------------



WARNING: Spurious .github folder in 'Adafruit HX8357 Library' library
In file included from C:\Users\PSCDefault\Documents\Arduino\WaveShare28\WaveShare28.ino:9:0:

C:\Users\PSCDefault\Documents\Arduino\libraries\DisplayCore/DisplayCore.h:24:3: error: conflicting declaration 'typedef struct FontHeader FontHeader'

} FontHeader;

^

In file included from C:\Users\PSCDefault\Documents\Arduino\hardware\chipkit-core\pic32\libraries\TFT-master/HX8357.h:4:0,

from C:\Users\PSCDefault\Documents\Arduino\WaveShare28\WaveShare28.ino:8:

C:\Users\PSCDefault\Documents\Arduino\hardware\chipkit-core\pic32\libraries\TFT-master/TFT.h:38:3: error: 'FontHeader' has a previous declaration as 'typedef struct FontHeader FontHeader'

} FontHeader;

^

In file included from C:\Users\PSCDefault\Documents\Arduino\WaveShare28\WaveShare28.ino:9:0:

C:\Users\PSCDefault\Documents\Arduino\libraries\DisplayCore/DisplayCore.h:26:8: error: redefinition of 'struct coord'

struct coord {

^

In file included from C:\Users\PSCDefault\Documents\Arduino\hardware\chipkit-core\pic32\libraries\TFT-master/HX8357.h:4:0,

from C:\Users\PSCDefault\Documents\Arduino\WaveShare28\WaveShare28.ino:8:

C:\Users\PSCDefault\Documents\Arduino\hardware\chipkit-core\pic32\libraries\TFT-master/TFT.h:40:8: error: previous definition of 'struct coord'

struct coord {

^

In file included from C:\Users\PSCDefault\Documents\Arduino\WaveShare28\WaveShare28.ino:9:0:

C:\Users\PSCDefault\Documents\Arduino\libraries\DisplayCore/DisplayCore.h:31:7: error: using typedef-name 'point3d' after 'class'

class point3d {

^

In file included from C:\Users\PSCDefault\Documents\Arduino\hardware\chipkit-core\pic32\libraries\TFT-master/HX8357.h:4:0,

from C:\Users\PSCDefault\Documents\Arduino\WaveShare28\WaveShare28.ino:8:

C:\Users\PSCDefault\Documents\Arduino\hardware\chipkit-core\pic32\libraries\TFT-master/TFT.h:49:3: note: 'point3d' has a previous declaration here

} point3d;

^

In file included from C:\Users\PSCDefault\Documents\Arduino\WaveShare28\WaveShare28.ino:9:0:

C:\Users\PSCDefault\Documents\Arduino\libraries\DisplayCore/DisplayCore.h:108:27: error: conflicting declaration 'typedef struct Color565 Color565'

} __attribute__((packed)) Color565;

^

In file included from C:\Users\PSCDefault\Documents\Arduino\hardware\chipkit-core\pic32\libraries\TFT-master/HX8357.h:4:0,

from C:\Users\PSCDefault\Documents\Arduino\WaveShare28\WaveShare28.ino:8:

C:\Users\PSCDefault\Documents\Arduino\hardware\chipkit-core\pic32\libraries\TFT-master/TFT.h:60:27: error: 'Color565' has a previous declaration as 'typedef struct Color565 Color565'

} __attribute__((packed)) Color565;

^

In file included from C:\Users\PSCDefault\Documents\Arduino\WaveShare28\WaveShare28.ino:9:0:

C:\Users\PSCDefault\Documents\Arduino\libraries\DisplayCore/DisplayCore.h:423:7: error: redefinition of 'class Touch'

class Touch {

^

In file included from C:\Users\PSCDefault\Documents\Arduino\hardware\chipkit-core\pic32\libraries\TFT-master/TFT.h:326:0,

from C:\Users\PSCDefault\Documents\Arduino\hardware\chipkit-core\pic32\libraries\TFT-master/HX8357.h:4,

from C:\Users\PSCDefault\Documents\Arduino\WaveShare28\WaveShare28.ino:8:

C:\Users\PSCDefault\Documents\Arduino\hardware\chipkit-core\pic32\libraries\TFT-master/Touch.h:11:7: error: previous definition of 'class Touch'

class Touch {

^

In file included from C:\Users\PSCDefault\Documents\Arduino\WaveShare28\WaveShare28.ino:9:0:

C:\Users\PSCDefault\Documents\Arduino\libraries\DisplayCore/DisplayCore.h:496:7: error: redefinition of 'class Filter'

class Filter {

^

In file included from C:\Users\PSCDefault\Documents\Arduino\hardware\chipkit-core\pic32\libraries\TFT-master/TFT.h:331:0,

from C:\Users\PSCDefault\Documents\Arduino\hardware\chipkit-core\pic32\libraries\TFT-master/HX8357.h:4,

from C:\Users\PSCDefault\Documents\Arduino\WaveShare28\WaveShare28.ino:8:

C:\Users\PSCDefault\Documents\Arduino\hardware\chipkit-core\pic32\libraries\TFT-master/Filter.h:8:7: error: previous definition of 'class Filter'

class Filter {

^

In file included from C:\Users\PSCDefault\Documents\Arduino\WaveShare28\WaveShare28.ino:9:0:

C:\Users\PSCDefault\Documents\Arduino\libraries\DisplayCore/DisplayCore.h:508:7: error: redefinition of 'class Image'

class Image : public DisplayCore {

^

In file included from C:\Users\PSCDefault\Documents\Arduino\hardware\chipkit-core\pic32\libraries\TFT-master/TFT.h:286:0,

from C:\Users\PSCDefault\Documents\Arduino\hardware\chipkit-core\pic32\libraries\TFT-master/HX8357.h:4,

from C:\Users\PSCDefault\Documents\Arduino\WaveShare28\WaveShare28.ino:8:

C:\Users\PSCDefault\Documents\Arduino\hardware\chipkit-core\pic32\libraries\TFT-master/Image.h:8:7: error: previous definition of 'class Image'

class Image {

^

Multiple libraries were found for "DisplayCore.h"
Used: C:\Users\PSCDefault\Documents\Arduino\libraries\DisplayCore
Not used: C:\Users\PSCDefault\Documents\Arduino\hardware\chipkit-core\pic32\libraries\DisplayCore
exit status 255
Error compiling for board chipKIT uC32.

User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: uC32 Doesn't recognize any TFT / LCD Screens

Post by majenko » Fri Dec 30, 2016 7:51 pm

Code: Select all

In file included from C:\Users\PSCDefault\Documents\Arduino\hardware\chipkit-core\pic32\libraries\TFT-master/HX8357.h:4:0,
I thought I told you to delete the TFT library that you have downloaded and installed?
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

VHDL-BPA
Posts: 11
Joined: Tue Dec 27, 2016 7:19 pm

Re: uC32 Doesn't recognize any TFT / LCD Screens

Post by VHDL-BPA » Tue Jan 03, 2017 9:16 pm

I did, I think that is the one for Arduino. Let me look again to see if I accidentally had multiple copies.

User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: uC32 Doesn't recognize any TFT / LCD Screens

Post by majenko » Tue Jan 03, 2017 9:43 pm

Well, the path component "hardware\chipkit-core" tells me it's not the Arduino one, but chipKIT. Also, the suffix "-master" tells me that you downloaded it from Github as a .ZIP file.

So no, it's not the Arduino one. It's one YOU downloaded and installed.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

VHDL-BPA
Posts: 11
Joined: Tue Dec 27, 2016 7:19 pm

Re: uC32 Doesn't recognize any TFT / LCD Screens

Post by VHDL-BPA » Wed Jan 04, 2017 11:33 pm

I don't understand though. I looked through a lot of the libraries while I was trying to troubleshoot, and they have #include the TFT library within them. How can I use the HX8357 without the TFT library? Doesn't it require it?

User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: uC32 Doesn't recognize any TFT / LCD Screens

Post by majenko » Thu Jan 05, 2017 10:04 pm

The TFT library is what came before DisplayCore. If you are seeing "#include <TFT.h>" anywhere then either it's in a sketch or example that isn't for chipKIT, or it's written for the (now ancient) TFT library that you shouldn't be using. In the majority of the latter cases you can replace "TFT.h" with "DisplayCore.h". In the former, you will need to re-write the program to use DisplayCore since it's nothing like the Arduino TFT library, which is only for the Arduino TFT shield.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

VHDL-BPA
Posts: 11
Joined: Tue Dec 27, 2016 7:19 pm

Re: uC32 Doesn't recognize any TFT / LCD Screens

Post by VHDL-BPA » Fri Jan 06, 2017 7:42 pm

The main trouble I am having is trying to interface to the HX8357 in the first place, and get it to work at all. I don't really mind having to change the programs I wrote for the Arduino. As for the drivers and libraries for the screen, I don't even know where to start since all of them require your old TFT library.

User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: uC32 Doesn't recognize any TFT / LCD Screens

Post by majenko » Sat Jan 07, 2017 12:48 pm

I don't know why you should think that. The only libraries that want the old TFT library are the old TFT libraries. DisplayCore is all you need - that and the associated driver libraries from DisplayCore - NOT the ones from the TFT libraries. If you see the word "TFT.h" in a library then it's the WRONG library.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

Post Reply