Teensy 4.0 MakeFile

Status
Not open for further replies.

SpiderPig

Member
Hi, I'm new to the makefile world. I have installed WinAVR and have compiled a small test program for the teensy 2.0, following these instructions here.

I want to upload the same "blinky" program to the Teensy 4.0 but just changing the MCU to imxrt1062 doesn't cut it. It tells me the MCU is unknown. I'm not even sure if WinAVR is the correct tool for the teensy 4.0.

Has anyone got any information that could help me set this up?

Thanks.
 
There is a makefile for Teensy 4.x in :: {local install}\hardware\teensy\avr\cores\teensy4\Makefile

Found it, thanks. Not sure if this is the right way to go about it though - I made a BAT file with the following in it;

Code:
make
pause

- and dropped it into the same directory you specified. I get this as the output;

Error.png
 
Glad you got it working.

Is there any brief info you might share, which I could add (as comments in the makefile) to help other Windows users? I personally use Linux and only test the makefile on Linux... so could really use a little help to make this better for Windows users in the future.
 
Sure thing. The first problem I had was not knowing how to define the NO_ARDUINO environment variable, I ended up just deleting all the Arduino lines which left me with COMPILERPATH, which I had to set to a sub folder in the Arduino "tools" directory; "C:\Program Files (x86)\Arduino\hardware\tools\arm\bin" (this file path had to be enclosed in quotation marks in the MakeFile or it threw an unexpected token error '(x' I think it was in the x86 part of the folder name?).

The next error was in WProgram.h which said : ambiguating new declaration of 'int32_t random()'. I had to open WProgram.h and comment out '//int32_t random(void);' After that it made everything perfectly. Once I edited main.cpp to get rid of setup() and loop() and recompiled and uploaded with TeensyLoader it all worked great.

I also made two .BAT files in the same folder as the source;

Code:
make
pause

Code:
make clean
pause
 
Status
Not open for further replies.
Back
Top