Teensy 3.0 & Teensyduino: Undefined reference to 'setup' during "Verify"

Status
Not open for further replies.

TheVaporTrail

New member
Teensy 3.0 & Teensyduino: Undefined reference to 'setup' during "Verify"

I just installed the Teensyduino additions to Arduino. As per the instructions, I clicked the "Verify" button. I get the following error:

Code:
Arduino: 1.0.5 (Mac OS X), Board: "Teensy 3.0"
main.cpp.o: In function `main':
/Users/david/Desktop/DevelopmentProjects/Arduino/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/main.cpp:21: undefined reference to `setup'
/Users/david/Desktop/DevelopmentProjects/Arduino/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/main.cpp:23: undefined reference to `loop'
collect2: error: ld returned 1 exit status

I have seen this discussed but I have not seen a resolution.

Any advice appreciated.

Thanks, David
 
You have to have a setup() and a loop() function in your sketch (even if they do nothing). If you DO have those functions in your sketch, something else is going wrong and I have no idea what it would be.
 
Short answer: I did not have a sketch loaded. The 'setup' and 'loop' are the entry points in a sketch. The problem did not occur once I loaded a sketch.

Longer answer:

The last screen of the teensduino installer (http://pjrc.com/teensy/teensyduino_installer_6.png) says for "First Usage" to "Click Verify". I thought that this was a step to verify that the installer had installed its files successfully. Therefore, I thought the problem I was having was related to the installation. This was not the case.

What I missed was that the window also says "To Run Your Sketch on the Teensy USB Board". In retrospect, I see that this means that a sketch must be loaded in the window first. Once I loaded a sketch the problem did not occur.

For me the confusion is that it is not clear what "First Usage" means in this context. Is it "First Usage" of Teensy or "First Usage" of any sketch?

Proposal:

Paul,

I would like to suggest a button or link on the last screen of the installer that says "If this is your first time using Teensyduino click here". This would bring up a window or web page that walks the user through the next few steps to verify that the Teensy is connected and working.

Thanks, David
 
Status
Not open for further replies.
Back
Top