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

Thread: Teensy 3.1 Arudino 1.0.5-r2 Wire/i2c_t3 undefined reference

  1. #1
    Senior Member
    Join Date
    Jan 2014
    Posts
    162

    Teensy 3.1 Arudino 1.0.5-r2 Wire/i2c_t3 undefined reference

    Using teensyArduino over Arduino 1.0.5-r2 I have successfully executed a program on the teensy 3.1 that utilizes a library (bounce) so I think my setup is correct.

    When I include "i2c_t3" or even "Wire.h" I get undefined reference to `i2c_t3::begin(...)' or to 'Wire' (and many others) both using Brians master.ino or my own.

    i2c_t3 folder, and Wire folder are present in libraries.

    What am I missing?

    thanks,

    Richard

  2. #2
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    Where exactly are these libraries located in your setup ?

    May be I am being a bit dull at the moment, but who is Brian ?
    Could you post that master.ino ( in code rage if possible ;-) ? That would take some guesswork out of the equation.

  3. #3
    Junior Member
    Join Date
    Jan 2014
    Location
    Slovenia
    Posts
    2
    Modify the i2c_t3.cpp file.

    Change the line

    #if defined(__MK20DX128__)

    to

    #if defined(__MK20DX128__) || defined(__MK20DX256__)

    and download the new Wire.h and Wire.c from http://forum.pjrc.com/threads/24656-...3-1-and-Wire-h

  4. #4
    Senior Member
    Join Date
    Jan 2014
    Posts
    162
    Solution works and is included in most recent i2c_t3 library.

  5. #5
    Hi,
    I made the i2c_t3.cpp changes listed as well as the Wire.h and Wire.cpp changes Paul posted, but the attached code still gives error: undefined reference to `i2c_t3::begin(i2c_mode, unsigned char, i2c_pins, i2c_pullup, i2c_rate)

    Is anything else required?
    Thanks...


    Quote Originally Posted by rokjarc View Post
    Modify the i2c_t3.cpp file.

    Change the line

    #if defined(__MK20DX128__)

    to

    #if defined(__MK20DX128__) || defined(__MK20DX256__)

    and download the new Wire.h and Wire.c from http://forum.pjrc.com/threads/24656-...3-1-and-Wire-h
    Attached Files Attached Files

Tags for this Thread

Posting Permissions

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