Teensy Compile Problem in function main

Status
Not open for further replies.

mriggins

New member
I bought a Teensy 3.2 so I could control some LED addressable strips in my pinball cabinet, following this thread:

http://www.vpforums.org/index.php?showtopic=36156



This is the TeensyStripController I'm trying to install onto the Teensy

https://github.com/DirectOutput/TeensyStripController



On 2 separate computers, I get this error while trying to compile

C:\Users\Matt\AppData\Local\Temp\arduino_build_655389/core\core.a(main.cpp.o): In function `main':

C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/main.cpp:51: undefined reference to `setup'

C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/main.cpp:53: undefined reference to `loop'

collect2.exe: error: ld returned 1 exit status

Error compiling for board Teensy 3.2 / 3.1.


The script author doesn't seem to know the issue. He says the code is ok so must be something else?

https://github.com/DirectOutput/TeensyStripController/issues/1


I've installed the Arduino 1.8.5 package and then the Teensyduino extensions. Then tried to compile the script via the Arduino software on both a Win10 box and a Win7 box both give the exact same error.

I'm at a loss. Do I have a bad Teensy?


teensyerror1.jpg
 
This error is in the build system - nothing to do with the Teensy. With a failed build it has not even looked for a Teensy.

Can you compile a simple Blink.ino or other from examples? If not something corrupted the install, if so then the problem is in the Sketch or associated library files causing conflicts with core files.
 
This error is in the build system - nothing to do with the Teensy. With a failed build it has not even looked for a Teensy.

Can you compile a simple Blink.ino or other from examples? If not something corrupted the install, if so then the problem is in the Sketch or associated library files causing conflicts with core files.

Huh. Well, the software I installed was the Arduino IDE Installer 1.8.5 from https://www.arduino.cc/en/main/software, and then the Teensyduino Installer for Windows from here https://www.pjrc.com/teensy/td_download.html

Is there another piece of software I I need to install?

I was able to successfully compile and upload the blink fast/slow examples for Teensy 3.1/3.2. I can't imagine it's the Sketch only because others have used it no problem. What associated library files could be causing a conflict? (Or am I missing some other install?)
 
Well … your Teensy is fine then ...

...
Can you compile a simple Blink.ino or other from examples? ..., if so then the problem is in the Sketch or associated library files causing conflicts with core files.

No, the fact that BLINK worked means the build system isn't the problem - that was the test.

The problem is in the other sketch and some error or conflict with what was brought in or how or where it was brought in.

There should be no issues with MAIN.cpp from the CORE code.
 
FWIW, I downloaded the code, put it in a folder named TeensyStripController on my Linux system in the Arduino directory, and I did a build of it for Teensy 3.2 using Teensy 1.42.

I suspect you have corrupted the file(s). Perhaps you eliminated a line containing */, and the compiler treated everything else as comment. Perhaps in downloading the file, it changed the spelling of the setup and loop functions. Likely, it is something obvious, but you likely would need somebody near by who is familiar with the build system to see what it is.
 
Good to know MichaelM - I didn't go that far. Cut and paste can go odd - I've gotten alternate filler chars that mess up lines … It may show in a VERBOSE copy of the output on a clean build from the console window.
 
Looks like you simply copied the wrong file.

The code in your screenshot is obviously NOT the same as TeensyStripController.ino from github.

TeensyStripController you meant to compile begins with this:

Code:
/********************************************************************************************************
 ** TeensyStrip Controller
 ** ----------------------
 ** 
 ** This Sketch turns a Teensy 3.1, 3.2 or later into a controller for WS2811/WS2812 based led strips.
 ** This strip controller was originally designed for use with the Direct Output Framework, but since 
 ** the communication protocol is simple and communication uses the virtual com port of the Teensy
 ** it should be easy to controll the strips from other applications as well.

But here is the code visible in your screenshot:

teensyerror1.jpg

Looks like you somehow copied the wrong file. You're getting this error because you're compiling completely different code than the program you intended to use.
 
Looks like you simply copied the wrong file.

The code in your screenshot is obviously NOT the same as TeensyStripController.ino from github.

TeensyStripController you meant to compile begins with this:

Code:
/********************************************************************************************************
 ** TeensyStrip Controller
 ** ----------------------
 ** 
 ** This Sketch turns a Teensy 3.1, 3.2 or later into a controller for WS2811/WS2812 based led strips.
 ** This strip controller was originally designed for use with the Direct Output Framework, but since 
 ** the communication protocol is simple and communication uses the virtual com port of the Teensy
 ** it should be easy to controll the strips from other applications as well.

But here is the code visible in your screenshot:

View attachment 14047

Looks like you somehow copied the wrong file. You're getting this error because you're compiling completely different code than the program you intended to use.

So, I think I found the issue, HOW this happened I don't know...

Somehow the code from the file I was trying to compile says TEENSYDUINO, not... TEENSYSTRIP.

I just downloaded a new zip from GitHub, same method (green button, download zip) and the file was ok and compiled ok. But I never opened a TeensyDuino file, so how that code got into the TeenyStrip file I do not know. But it compiled ok this go around so thanks for taking a look.
 
Last edited:
Status
Not open for further replies.
Back
Top