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

Thread: Arduino 1.0.6/Teensyduino 1.24 compatibility with btmcmhan's t3spi library

  1. #1

    Arduino 1.0.6/Teensyduino 1.24 compatibility with btmcmhan's t3spi library

    Hi,

    I've been using @btmcmahan Teensy SPI master/slave library for a while (with arduino 1.0.5 and teensyduino 1.20).
    https://github.com/btmcmahan/Teensy-...Master---Slave
    However, since I've needed to use the ili9341 lcd, I've updated arduino to 1.0.6 with teensyduino 1.24 to use the optimised spi library. Now the programs can't compile (including all the sample programs). I get a heap of errors though a lot of them seem to repeat. Below are the first few lines of compile output.

    Code:
    In file included from SPI_Slave_RX_1_0.ino:2:0:
    C:\Users\23047\Dropbox\Arduino\piDuino\hardware\teensy\cores\teensy3/avr_emulation.h: In member function 'SPCRemulation& SPCRemulation::operator=(int)':
    C:\Users\23047\Dropbox\Arduino\piDuino\libraries\t3spi/t3spi.h:29:18: error: expected unqualified-id before numeric constant
     #define CTAR0    0
                      ^
    C:\Users\23047\Dropbox\Arduino\piDuino\hardware\teensy\cores\teensy3/kinetis.h:2194:36: note: in expansion of macro 'CTAR0'
     #define SPI0_CTAR0  (KINETISK_SPI0.CTAR0) // DSPI Clock and Transfer Attributes Register, In Master Mode
                                        ^
    C:\Users\23047\Dropbox\Arduino\piDuino\hardware\teensy\cores\teensy3/avr_emulation.h:822:4: note: in expansion of macro 'SPI0_CTAR0'
        SPI0_CTAR0 = SPI_CTAR_FMSZ(7) | SPI_CTAR_PBR(1) | SPI_CTAR_BR(1) | SPI_CTAR_CSSCK(1);
        ^
    C:\Users\23047\Dropbox\Arduino\piDuino\libraries\t3spi/t3spi.h:29:18: error: expected ')' before numeric constant
     #define CTAR0    0
                      ^
    C:\Users\23047\Dropbox\Arduino\piDuino\hardware\teensy\cores\teensy3/kinetis.h:2194:36: note: in expansion of macro 'CTAR0'
     #define SPI0_CTAR0  (KINETISK_SPI0.CTAR0) // DSPI Clock and Transfer Attributes Register, In Master Mode
                                        ^
    C:\Users\23047\Dropbox\Arduino\piDuino\hardware\teensy\cores\teensy3/avr_emulation.h:822:4: note: in expansion of macro 'SPI0_CTAR0'
        SPI0_CTAR0 = SPI_CTAR_FMSZ(7) | SPI_CTAR_PBR(1) | SPI_CTAR_BR(1) | SPI_CTAR_CSSCK(1);
        ^
    For full compile output see attached errors.txt

    Could someone please explain what I need to do to update the library to make it work?

    Thanks,
    Brian

  2. #2
    Senior Member
    Join Date
    Nov 2013
    Posts
    720
    Please update to Arduino==1.6.3 or Arduino=>1.6.5 (basically, dodge 1.6.4, arduino muts are releasing too fast and if they have moved beyond 1.6.5 already than 1.6.5 is probably what I am trying to recommend over 1.6.4 but I am not really trying to recommend other than 1.6.3 and 1.6.5 (*unchecked*) at this point in time.)

    After this update please update to Teensyduino latest full release (not asking you to go BETA here) and then try everything again - it will be preferable to fix your problems for the latest (reliable) releases as opposed older releases (even a minute older) for any intents or purposes.

    For the absolute best chance of the best help always obey the generic forum rule...

  3. #3
    Update:
    It seems like someone has already found the fixes, just that the main repo hasn't been updated.
    https://github.com/btmcmahan/Teensy-...--Slave/pull/5

    Thanks

Posting Permissions

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