Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: RA8875 Library with Teensy 4.0

  1. #1
    Junior Member
    Join Date
    Nov 2019

    Teensy 4.0 doesn't work with RA8875 Library

    I'm thinking my question may have already been discussed and solved, but my searches on the Forum has so far been in vain. Please point me at the answer if it's already here.

    Up to now my Teensy of choice has been the 3.2. Currently I'm using it with an Adafruit RA8875 breakout board with their 5" 480X800 TFT with resistive touch screen. I've been playing with the example programs, and both the graphics and text examples work perfectly with the 3.2.

    Now I want to move to the Teensy 4.0.

    When I try to compile the "basicTextFunctions" example with the "Teensy 3.2 / 3.1" board selected, it compiles, downloads and runs fine. However, when I change ONLY the board selected to the Teensy 4.0, I get the following compile errors:
    Compiling sketch...
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/precompile_helper" "C:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr/cores/teensy4" "C:\\Users\\X\\AppData\\Local\\Temp\\arduino_build _338357" "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -x c++-header -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=148 -DARDUINO=10810 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr/cores/teensy4" "C:\\Users\\X\\AppData\\Local\\Temp\\arduino_build _338357/pch/Arduino.h" -o "C:\\Users\\X\\AppData\\Local\\Temp\\arduino_build _338357/pch/Arduino.h.gch"
    Using previously compiled file: C:\Users\X\AppData\Local\Temp\arduino_build_338357 \pch\Arduino.h.gch

    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=148 -DARDUINO=10810 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\X\\AppData\\Local\\Temp\\arduino_build _338357/pch" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teen sy4" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\ SPI" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\ RA8875" "C:\\Users\\X\\AppData\\Local\\Temp\\arduino_build _338357\\sketch\\basicTextFunctions.ino.cpp" -o "C:\\Users\\X\\AppData\\Local\\Temp\\arduino_build _338357\\sketch\\basicTextFunctions.ino.cpp.o"
    Compiling libraries...
    Compiling library "SPI"
    Using previously compiled file: C:\Users\X\AppData\Local\Temp\arduino_build_338357 \libraries\SPI\SPI.cpp.o
    Compiling library "RA8875"
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=148 -DARDUINO=10810 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\X\\AppData\\Local\\Temp\\arduino_build _338357/pch" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teen sy4" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\ SPI" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\ RA8875" "C:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\ RA8875\\RA8875.cpp" -o "C:\\Users\\X\\AppData\\Local\\Temp\\arduino_build _338357\\libraries\\RA8875\\RA8875.cpp.o"
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\RA8875 \RA8875.cpp: In member function 'void RA8875::begin(RA8875sizes, uint8_t)':

    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\RA8875 \RA8875.cpp:408:11: error: cannot convert 'volatile uint32_t* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment

    csport = portOutputRegister(digitalPinToPort(_cs));//pinMode(_cs, OUTPUT);


    Multiple libraries were found for "RA8875.h"
    Used: C:\Program
    Multiple libraries were found for "SPI.h"
    Used: C:\Program
    Using library SPI at version 1.0 in folder: C:\Program Files
    Using library RA8875 at version 0.69.65 in folder: C:\Program Files
    Error compiling for board Teensy 4.0.
    (By the way, the lines at the end: "Used: C:\Program" should have "Files (x86) ... " after it, but the line cuts off after the first space in the directory name.)

    I've gone through my drive, and I've deleted the one duplicate library directory that I found, but to no avail. I'm running Windows10-64bit and the Arduino 1.8.10 IDE with version 1.48 of Teensyduino. I have also downloaded and installed the Zip version 0.70 of the RA8875 library, but so far the compiler doesn't seem to be interested in the newer version of the library when compiling for either the 3.2 or the 4.0.

    I tried using the Adafruit_RA8875 library instead, but I get WAY MORE and different errors when I try to compile. I can however compile, download and run the "Blink" example program on the Teensy 4.0 without a problem, but not anything that tries to use the RA8875 library.

    What am I doing wrong? Did I not set something correctly for compilation or linking? Do I have a problem in my directory structure? If this is solved already, and I didn't see it, I apologize. Just point me at the answer. I didn't find any reference to the RA8875 in the Teensyduino release topic either.


    Last edited by RDDyer; 11-03-2019 at 08:12 PM. Reason: Better Title

  2. #2
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    from the giant T4 beta test thread:

  3. #3
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    From a recent forum thread:

    There are updates to run on a T4 up at:

    One of the main issues is that the main person responsible for several of the display libraries, is no longer active and so Pull Requests have piled up...

  4. #4
    Junior Member
    Join Date
    Nov 2019
    Thanks for the rapid responses. I'll check this stuff out, but I also suspect that I may have some errant files and/or directories on my system.

    I'll be in touch.

    Thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts