1.8" TFT shield with joystick and SD card on chipKIT

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

Re: 1.8" TFT shield with joystick and SD card on chipKIT

Post by majenko » Sun Feb 02, 2014 6:57 pm

The version on github is the version I use locally. Are you sure the version your MPIDE installation is using is the version you think it is? You don't have other copies anywhere?
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".

hdphilip
Posts: 39
Joined: Sat Apr 14, 2012 7:54 am

Re: 1.8" TFT shield with joystick and SD card on chipKIT

Post by hdphilip » Sun Feb 02, 2014 7:39 pm

i do have a few copies, on my "test copy"mpide, i have to change the sketchbook directory to avoid conflicts with my "working" sketch book directory.

as an experiment,
i also loaded all of the "tft files" into the TFT/examples/TFTDEMO folder, opened the TFTdemo, had all of the tabs listed, same results.

tomarrow, at work i'll try it again, i run it off of a flash drive.

could the math.h in your tft directory be conflicting with the math.h located in
hardware/pic32/complier/pic32-tools/pic32mx/include/c++/4.5.1/tr1 ?

philip

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

Re: 1.8" TFT shield with joystick and SD card on chipKIT

Post by majenko » Sun Feb 02, 2014 7:55 pm

Hmmm... possible actually, if you are on an inferior operating system, I guess. The file is Math.h, not math.h, and a sensible operating system distinguishes between the two.

I'll try changing it and see if that helps.
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".

hdphilip
Posts: 39
Joined: Sat Apr 14, 2012 7:54 am

Re: 1.8" TFT shield with joystick and SD card on chipKIT

Post by hdphilip » Sun Feb 02, 2014 8:16 pm

that's kinda what i was thinking, what about removing the math.h and just put it in the calling program?

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

Re: 1.8" TFT shield with joystick and SD card on chipKIT

Post by majenko » Sun Feb 02, 2014 9:20 pm

Could do. I have renamed it MathFuncs.h / .cpp though in GitHub. It's used in multiple places, and soon I'll get round to updating it with some new functions I have developed for another project that are about 90% more efficient.
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".

hdphilip
Posts: 39
Joined: Sat Apr 14, 2012 7:54 am

Re: 1.8" TFT shield with joystick and SD card on chipKIT

Post by hdphilip » Sun Feb 02, 2014 9:48 pm

Thanks,
I'm looking forward to using your library, from what i see, it'll be very useful.
I'll check it out

Philip

hdphilip
Posts: 39
Joined: Sat Apr 14, 2012 7:54 am

Re: 1.8" TFT shield with joystick and SD card on chipKIT

Post by hdphilip » Tue Feb 04, 2014 3:10 am

Matt,
good news!
it's working now, although the kittens still has a frame buffer error,

sprites, TFTdemo, simplemenu work,
Thanks.JPG
Thanks.JPG (49.46 KiB) Viewed 1047 times

HunterR
Posts: 14
Joined: Fri Feb 27, 2015 7:56 am

Re: 1.8" TFT shield with joystick and SD card on chipKIT

Post by HunterR » Wed May 06, 2015 11:35 am

Hello, I just picked up one of these shields w/ joystick, but I am having issues using it in either the most current MPIDE or the most recent UECIDE alpha. I just want to test if my shield works on a Chipkit Uno32 (unexpectedly's old one) but I keep getting strange errors like the below:

Code: Select all

ST7735\ST7735.cpp.o:(.gnu.linkonce.r._ZTI6ST7735._ZTI6ST7735+0x8): undefined reference to `typeinfo for GFX'
collect2: ld returned 1 exit status
(this was taken from unexpectedly's initial thread of supposedly "working" examples on Adafruit)
http://forums.adafruit.com/viewtopic.php?f=47&p=213748

Furthermore, all the ZIP archives downloaded from the thread here are corrupt:
viewtopic.php?f=18&t=2530

I have tried using the following repositories in both UECIDE and MPIDE to no avail: errors present for each sketch are stated below:

https://github.com/cacycleworks/chipKIT_ST7735
IN MPIDE (current 20150318)
ST7735 - Simplemenu:

Code: Select all

In file included from simpleMenu.cpp:13:0:
\mpide\libraries\GFX/GFX.h:15:21: fatal error: algorithm: No such file or directory
compilation terminated.
after editing GFX and comenting <algorithms> for the #define swap, and changing all std::swap to swap:

Code: Select all

ST7735\ST7735.cpp.o:(.gnu.linkonce.r._ZTI6ST7735._ZTI6ST7735+0x8): undefined reference to `typeinfo for GFX'
collect2: ld returned 1 exit status
ST7735 - TFTDemo

Code: Select all

ST7735\ST7735.cpp.o:(.gnu.linkonce.r._ZTI6ST7735._ZTI6ST7735+0x8): undefined reference to `typeinfo for GFX'
collect2: ld returned 1 exit status
ST7735B "buffered" - Kittens (before/after removing all "Kittens" but 1 to save RAM

Code: Select all

Kittens.cpp.o: Link Error: Could not allocate section .bss.tft.tft, size = 21040 bytes, attributes = bss 
 Link Error: Could not allocate data memory
collect2: ld returned 1 exit status
ST7735B "buffered" - Sprites

Code: Select all

Sprites.cpp.o: Link Error: Could not allocate section .bss.tft.tft, size = 21040 bytes, attributes = bss 
 Link Error: Could not allocate data memory
collect2: ld returned 1 exit status
IN UECIDE (current alpha Version 0.8.8alpha11)
ST7735 - TFTDemo (UECIDE complains a LOT about \ character in //commented lines \n like this)

Code: Select all

Compiling...
• Compiling sketch...
Error at line 103 in file simpleMenu.ino
\UECIDE\libraries\ST7735\examples\simpleMenu\simpleMenu.ino:103:10: error: 'menu_edit' was not declared in this scope
Error at line 104 in file simpleMenu.ino
\UECIDE\libraries\ST7735\examples\simpleMenu\simpleMenu.ino:104:16: error: 'menu_edit' was not declared in this scope
Error at line 105 in file simpleMenu.ino
\UECIDE\libraries\ST7735\examples\simpleMenu\simpleMenu.ino:105:25: error: 'goto_menu' was not declared in this scope
Error at line 106 in file simpleMenu.ino
\UECIDE\libraries\ST7735\examples\simpleMenu\simpleMenu.ino:106:17: error: 'goto_menu' was not declared in this scope
Error at line 107 in file simpleMenu.ino
\UECIDE\libraries\ST7735\examples\simpleMenu\simpleMenu.ino:107:15: error: 'menu_hide' was not declared in this scope
Error at line 110 in file simpleMenu.ino
\UECIDE\libraries\ST7735\examples\simpleMenu\simpleMenu.ino:110:25: error: 'do_deposit' was not declared in this scope
Error at line 111 in file simpleMenu.ino
\UECIDE\libraries\ST7735\examples\simpleMenu\simpleMenu.ino:111:24: error: 'do_deposit' was not declared in this scope
Error at line 112 in file simpleMenu.ino
\UECIDE\libraries\ST7735\examples\simpleMenu\simpleMenu.ino:112:25: error: 'do_withdrawl' was not declared in this scope
Error at line 113 in file simpleMenu.ino
\UECIDE\libraries\ST7735\examples\simpleMenu\simpleMenu.ino:113:24: error: 'do_withdrawl' was not declared in this scope
Error at line 114 in file simpleMenu.ino
\UECIDE\libraries\ST7735\examples\simpleMenu\simpleMenu.ino:114:13: error: 'goto_menu' was not declared in this scope
Error at line 117 in file simpleMenu.ino
\UECIDE\libraries\ST7735\examples\simpleMenu\simpleMenu.ino:117:22: error: 'show_balance' was not declared in this scope
Error at line 118 in file simpleMenu.ino
\UECIDE\libraries\ST7735\examples\simpleMenu\simpleMenu.ino:118:21: error: 'show_balance' was not declared in this scope
Error at line 119 in file simpleMenu.ino
\UECIDE\libraries\ST7735\examples\simpleMenu\simpleMenu.ino:119:13: error: 'goto_menu' was not declared in this scope
Failed compiling sketch

ST7735B "buffered" - Kittens (before/after removing all "Kittens" but 1 to save RAM

Code: Select all

Compiling...
• Compiling sketch...
• Compiling core...
‣ api
• Compiling libraries...
‣ ST7735B
‣ DSPI
‣ GFX
‣ ST7735
• Linking sketch...
\Temp\build-ed0a4c02-96c2-4f92-830b-b45d5c6d2508\Kittens.cpp.o: Link Error: Could not allocate section .bss.tft.tft, size = 21040 bytes, attributes = bss 
 Link Error: Could not allocate data memory
collect2: ld returned 1 exit status
Failed linking sketch
ST7735B "buffered" - Sprites

Code: Select all

Compiling...
• Compiling sketch...
• Compiling core...
‣ api
• Compiling libraries...
‣ ST7735B
‣ DSPI
‣ GFX
‣ ST7735
• Linking sketch...
\Temp\build-d34f7ac2-e5f7-4a0f-bfa5-60a3799f4064\Sprites.cpp.o: Link Error: Could not allocate section .bss.tft.tft, size = 21040 bytes, attributes = bss 
 Link Error: Could not allocate data memory
collect2: ld returned 1 exit status
Failed linking sketch

I've also tried the repositories here and here:
https://github.com/TFTLibraries/TFT <- No examples compile (in either MPIDE or UECIDE)
IN MPIDE (current)
Simplemenu example

Code: Select all

\mpide\libraries\TFT\PICadillo35t.cpp: In member function 'virtual void PICadillo35t::windowData(uint16_t*, uint32_t)':
\mpide\libraries\TFT\PICadillo35t.cpp:349:16: error: 'DCH3CONbits' was not declared in this scope
\mpide\libraries\TFT\PICadillo35t.cpp:359:9: error: 'DCH3INTbits' was not declared in this scope
\mpide\libraries\TFT\PICadillo35t.cpp:360:9: error: 'DCH3SSA' was not declared in this scope
\mpide\libraries\TFT\PICadillo35t.cpp:361:9: error: 'DCH3DSA' was not declared in this scope
\mpide\libraries\TFT\PICadillo35t.cpp:362:9: error: 'DCH3SSIZ' was not declared in this scope
\mpide\libraries\TFT\PICadillo35t.cpp:363:9: error: 'DCH3DSIZ' was not declared in this scope
\mpide\libraries\TFT\PICadillo35t.cpp:364:9: error: 'DCH3CSIZ' was not declared in this scope
\mpide\libraries\TFT\PICadillo35t.cpp:365:9: error: 'DCH3ECONbits' was not declared in this scope
\mpide\libraries\TFT\PICadillo35t.cpp:369:9: error: 'DCH3CONbits' was not declared in this scope
\mpide\libraries\TFT\PICadillo35t.cpp:372:9: error: 'DMACONbits' was not declared in this scope
\mpide\libraries\TFT\PICadillo35t.cpp: In member function 'virtual void PICadillo35t::closeWindow()':
\mpide\libraries\TFT\PICadillo35t.cpp:386:9: error: 'DCH3CONbits' was not declared in this scope
ST7735_Adafruit_1.8inch_TFT - Kittens (after including SPI.h manually)

Code: Select all

Kittens.cpp:69:27: error: cannot declare variable 'fb' to be of abstract type 'Framebuffer332'
\mpide\libraries\TFT/Framebuffer332.h:6:43: note:   because the following virtual functions are pure within 'Framebuffer332':
\mpide\libraries\TFT/Framebuffer.h:91:29: note: 	virtual void Framebuffer::bufferWrite(uint32_t, uint8_t)
Kittens.cpp: In function 'void setup()':
Kittens.cpp:78:5: error: 'class Framebuffer332' has no member named 'setAntiAlias'
Kittens (after removing the =0 after the virtual void inline bufferWrite)

Code: Select all

Kittens.cpp: In function 'void setup()':
Kittens.cpp:78:5: error: 'class Framebuffer332' has no member named 'setAntiAlias'
Primitives (after adding SPI.h manually)

Code: Select all

\mpide\libraries\TFT\PICadillo35t.cpp: In member function 'virtual void PICadillo35t::windowData(uint16_t*, uint32_t)':
\mpide\libraries\TFT\PICadillo35t.cpp:349:16: error: 'DCH3CONbits' was not declared in this scope
\mpide\libraries\TFT\PICadillo35t.cpp:359:9: error: 'DCH3INTbits' was not declared in this scope
\mpide\libraries\TFT\PICadillo35t.cpp:360:9: error: 'DCH3SSA' was not declared in this scope
\mpide\libraries\TFT\PICadillo35t.cpp:361:9: error: 'DCH3DSA' was not declared in this scope
\mpide\libraries\TFT\PICadillo35t.cpp:362:9: error: 'DCH3SSIZ' was not declared in this scope
\mpide\libraries\TFT\PICadillo35t.cpp:363:9: error: 'DCH3DSIZ' was not declared in this scope
\mpide\libraries\TFT\PICadillo35t.cpp:364:9: error: 'DCH3CSIZ' was not declared in this scope
\mpide\libraries\TFT\PICadillo35t.cpp:365:9: error: 'DCH3ECONbits' was not declared in this scope
\mpide\libraries\TFT\PICadillo35t.cpp:369:9: error: 'DCH3CONbits' was not declared in this scope
\mpide\libraries\TFT\PICadillo35t.cpp:372:9: error: 'DMACONbits' was not declared in this scope
\mpide\libraries\TFT\PICadillo35t.cpp: In member function 'virtual void PICadillo35t::closeWindow()':
\mpide\libraries\TFT\PICadillo35t.cpp:386:9: error: 'DCH3CONbits' was not declared in this scope
Sprites (after adding SPI.h manually)

Code: Select all

C:\Users\HMkX2\Documents\mpide\libraries\TFT\PICadillo35t.cpp: In member function 'virtual void PICadillo35t::windowData(uint16_t*, uint32_t)':
C:\Users\HMkX2\Documents\mpide\libraries\TFT\PICadillo35t.cpp:349:16: error: 'DCH3CONbits' was not declared in this scope
C:\Users\HMkX2\Documents\mpide\libraries\TFT\PICadillo35t.cpp:359:9: error: 'DCH3INTbits' was not declared in this scope
C:\Users\HMkX2\Documents\mpide\libraries\TFT\PICadillo35t.cpp:360:9: error: 'DCH3SSA' was not declared in this scope
C:\Users\HMkX2\Documents\mpide\libraries\TFT\PICadillo35t.cpp:361:9: error: 'DCH3DSA' was not declared in this scope
C:\Users\HMkX2\Documents\mpide\libraries\TFT\PICadillo35t.cpp:362:9: error: 'DCH3SSIZ' was not declared in this scope
C:\Users\HMkX2\Documents\mpide\libraries\TFT\PICadillo35t.cpp:363:9: error: 'DCH3DSIZ' was not declared in this scope
C:\Users\HMkX2\Documents\mpide\libraries\TFT\PICadillo35t.cpp:364:9: error: 'DCH3CSIZ' was not declared in this scope
C:\Users\HMkX2\Documents\mpide\libraries\TFT\PICadillo35t.cpp:365:9: error: 'DCH3ECONbits' was not declared in this scope
C:\Users\HMkX2\Documents\mpide\libraries\TFT\PICadillo35t.cpp:369:9: error: 'DCH3CONbits' was not declared in this scope
C:\Users\HMkX2\Documents\mpide\libraries\TFT\PICadillo35t.cpp:372:9: error: 'DMACONbits' was not declared in this scope
C:\Users\HMkX2\Documents\mpide\libraries\TFT\PICadillo35t.cpp: In member function 'virtual void PICadillo35t::closeWindow()':
C:\Users\HMkX2\Documents\mpide\libraries\TFT\PICadillo35t.cpp:386:9: error: 'DCH3CONbits' was not declared in this scope

https://github.com/MajenkoLibraries/DisplayCore/ <- HAS NO EXAMPLES TO TEST!

All in all, I am completely lost. No examples compile or work.
Can anyone help dig me out of this mire?

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

Re: 1.8" TFT shield with joystick and SD card on chipKIT

Post by majenko » Wed May 06, 2015 1:39 pm

I just tried DisplayCore and found I'd cocked that driver up a bit while converting from #define declarations to "static const" ones. I've just fixed it and pushed a new version to the repo, along with a small example.

Also, if you're in the alpha of UECIDE, you should just install it direct from the Plugin Manager. In fact, if you #include <ST7735.h> it should try and install it for you automatically.
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".

HunterR
Posts: 14
Joined: Fri Feb 27, 2015 7:56 am

Re: 1.8" TFT shield with joystick and SD card on chipKIT

Post by HunterR » Wed May 06, 2015 3:11 pm

Thank you a bunch, Majenko. :)

I can confirm the "Millis" sample compiles and runs on a Uno32 w/ "Adafruit 1.8" Color TFT Shield w/microSD and Joystick" (802) on UECIDE Version 0.8.8alpha11.

However, I noticed the "Slideshow" example for the BMPFile library had some issues compiling -- not merely "wrong TFT display #include used", but missing font #includes etc. As a bit of gratitude for your help, I've attached a working "Slideshow_ST7735" example you might possibly include for the Adafruit shield. The BMPs are resized and the proper #includes are provided. I tested it and it seems to work fine. I hope it helps you a little!

I initially thought it was because I was using the "0150 test" core version of MPIDE, so I had re-downloaded the "023 stable" core MPIDE and "stable" UECIDE and attempted using the "deprecated" version of TFT.h from Github. Unfortunately, those attempts only succeeded in wasting Digilent's and your bandwidth. :(

I should clarify I am using a Seedunio SPI 6-pin header shield with the "Mega hack" performed by unexpectedly in order to access/reroute the Hardware SPI pins from 6-pin header to the Adafruit shield pin 10-13.
(unless ChipKit Uno32 Pins 10-13 are redundant copies of the 6-pin header -- unlike a AVR Mega, where they are independent)
Attachments
Slideshow_ST7735.zip
Slideshow example for BMPFile library on ChipKit Uno32 [REVISION 1]
(351.67 KiB) Downloaded 33 times

Post Reply