Makefile missing - teensy 4.1

Sorry to be so clueless here, clearly the Arduino IDE underpinnings are changing
faster than you can document them. The teensy loader instructions say to find the makefile at
{Arduino}/hardware/teensy/avr/cores/teensy4/Makefile.
but there is no such folder I can find.

The IDE seems to be the same abandoned hackware from the last century as last time I opened it, but with lots of new hacks,
none of them actually documented, and the documentation all talks about stuff that no longer works that way.
Is this a common complaint?

Frankly I prefer no IDE, if I can just run make and install my code I will be happy, but the device libraries seem to be all
tangled up with IDE stuff. Can you please tell me what I should do? I really like the board design, it has all the features
I want, but this software is hard to swallow.
 
After hurling so many insults in so many different directions, you are lucky to get any response at all to your post. But, I'll take pity on your hubristic self & attempt to throw some crumbs your way. This may be regretted later, but I'm doing so while keeping in mind that one of the hallmarks of this particular forum is the immense amount of help that is provided to others, as well as the very high quality of that help. I, for one, really appreciated that kind of help when I first started my Teensy endeavors, so now I try to provide similar help if/when I'm able.

First off, start by reminding yourself that the Arduino environment was developed to make it easy on those who are, first and foremost, not programmers, and quite possibly, folks who are not even technical in any way. Many details are taken care of "under the covers" by the IDE so that a non-programmer can just "get to coding". I do not say this in any way to defend the IDE and/or its design, it's just a statement of the way it is. Not everyone appreciates what the IDE does and/or how it does it, but you should remind yourself that it does so with a specific purpose. It may be imperfect in many ways, but it mostly does actually do what it is intended to do.

As to the Makefile that you seem to be in search of, on my system, it is located at C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4\Makefile, just as you noted in your post (assuming that you understand that the {Arduino} designation is shorthand for the location where the Arduino IDE was installed, in case one chooses to install it somewhere other than the default location).

You asked what you should do, so here's my simple & straightforward suggestion: you would be well served to temporarily swallow your distaste & to use the Arduino IDE to create a simple sketch. Prove to yourself that you can successfully upload to your target Teensy (verifying that you have everything installed & setup correctly, & that you completely understand exactly what the tools & support are accomplishing. And more importantly, make sure you understand how it is being accomplished, etc.). Only then should you even think about going down the path of "no IDE" development.

Best of luck & hopefully you'll have some fun along the way.

Mark J Culross
KD5RXT
 
I found the github group including the cores project, and I would guess this is the Makefile the documentation refers to!
As to the Makefile that you seem to be in search of, on my system, it is located at C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4\Makefile, just as you noted in your post (assuming that you understand that the {Arduino} designation is shorthand for the location where the Arduino IDE was installed, in case one chooses to install it somewhere other than the default location).

I installed the latest release of the IDE, and it has no such directory. I would try to find a legacy version, but I don't
know what version would be good to look for.

I have no interest in sketchy software, sorry if you think that's an insult. It's not, it's just what I see in front of me.
If you want me to pretend it's something else, let me know what kind of rose colored words to use.
 
I found the github group including the cores project, and I would guess this is the Makefile the documentation refers to!


I installed the latest release of the IDE, and it has no such directory. I would try to find a legacy version, but I don't
know what version would be good to look for.

I have no interest in sketchy software, sorry if you think that's an insult. It's not, it's just what I see in front of me.
If you want me to pretend it's something else, let me know what kind of rose colored words to use.

The makefile is not part of the IDE, it’s part of the Teensy-specific board support, which apparently you had not installed. It helps if you read and follow the instructions. You’d be amazed at the things others have done with the tools that you so blithely disparage as “sketchy” (and I’m sure there was no pun intended!).
 
The makefile is not part of the IDE, it’s part of the Teensy-specific board support, which apparently you had not installed. It helps if you read and follow the instructions. You’d be amazed at the things others have done with the tools that you so blithely disparage as “sketchy” (and I’m sure there was no pun intended!).
I read the instructions and followed them. It looks to me as if they are either incomplete or that the
new IDE update has borked them. No such files appeared after I followed the instructions.

The IDE install instructions also fail utterly on Ubuntu. Apparently the last Ubuntu package was years ago, it also does not
support these instructions (nor the other version of the instructions, nor the other version). I'm not surprised or mad about it:
Paul has done a ton of useful work to help with getting around the trouble, but the breadcrumbs he left behind are
outdated. You still didn't tell me anything useful, for all your condescension. You could have said something like "Oh, here are
the repos that have the actual code in them that you are looking for", but I don't really care why you didn't.
 
Just in case you ever want to try again, to get the makefile, you must (a) install the Arduino IDE and (b) install the Teensy board package. If you only do (a), you won't find it.
 
Sorry, maybe I am missing something in your .... Messages.

Have you tried:
a) Install Arduino IDE 2.x - you can download from: https://www.arduino.cc/en/software/

b) Install Teensy board to Arduino IDE 2.x - instructions are up at: https://www.pjrc.com/teensy/td_download.html
Actually Paul today is releasing a new release, as described in todays post:

c) Go to whare Arduino Installs the boards, known as the Arduino15 directory. On my Windows machine it is at:
Code:
C:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.60.0\

If you look down from there in the:
Code:
cores\teensy4
You will find a MAKEFILE.

EDIT: on Linux I believe the Arduino15 directory is located at: ~/.arduino15

I don't have my Ubuntu machine hooked up right now, but I did verify that location on my Arduino Uno Q, that I have
plugged in right now.

The IDE install instructions also fail utterly on Ubuntu.
That would surprise me, as I believe that Paul mainly does his development using some form of Linux, I am assuming UBUNTU.

EDIT2
Other options include:
1) Arduino 1.8.x you can download Arduino from the same web page. You download the Teensyduino app, from the same location in b) above.
You run Teensyduino, and point it at the location you installed Arduino 1.8.x and the Teensy directories will be under that location...

2) Arduino-cli - download pointer up at: https://www.arduino.cc/en/software/#arduino-cli - You can use a command line to compile for different boards and the like. It does not use makefiles, but you can configure using an .yaml file
Like building a sketch for the Q (in app lab) it sets up a yaml file that for one of mine looks like:
Code:
profiles:
  default:
    fqbn: arduino:zephyr:unoq
    platforms:
      - platform: arduino:zephyr
    libraries:
      - MsgPack (0.4.2)
      - DebugLog (0.8.4)
      - ArxContainer (0.7.0)
      - ArxTypeTraits (0.3.1)
      - ArduinoGraphics (1.1.4)
      - dependency: Arduino_HS300x (1.0.0)
      - dependency: Arduino_LPS22HB (1.0.2)
      - dependency: Arduino_LSM6DSOX (1.1.2)
      - dependency: Arduino_LTR381RGB (1.0.0)
      - Arduino_Modulino (0.7.0)
      - dependency: STM32duino VL53L4CD (1.0.5)
      - dependency: STM32duino VL53L4ED (1.0.1)
      - SparkFun Qwiic Button and Qwiic Switch Library (2.0.6)

default_profile: default
 
Last edited:
I installed the latest release of the IDE, and it has no such directory.

You need to use Arduino IDE 1.8.19 to work with those instructions.

Boards Manager can't be used to install Teensy in Arduino 1.8.x. You need to download and run the special installer, which adds all the files. You can get the installer at this page. Scroll down to "Arduino 1.8.x Software Development (Download and Run Installer)".

The Makefile has several defines for path to the compiler, libraries and tools which will only work with the way Arduino IDE 1.8.x install arranges files. Arduino IDE 2.x.x changed everything. In theory you could edit these defines for the relative locations where the files are with newer Arduino IDE. But those paths have package version numbers with the new IDE, so anything you put in the makefile is likely to break when/if the packages are updated to different versions which change the path that has version number as one if its folders.

To get a (hopefully) smooth out-of-the-box Makefile experience, you need to use Arduino IDE 1.8.19 and run the installer which puts the Makefile and all the other stuff those Makefile defines reference at the correct places.
 
Last edited:
You need to use Arduino IDE 1.8.19 to work with those instructions.

Boards Manager can't be used to install Teensy in Arduino 1.8.x. You need to download and run the special installer, which adds all the files. You can get the installer at this page. Scroll down to "Arduino 1.8.x Software Development (Download and Run Installer)".

The Makefile has several defines for path to the compiler, libraries and tools which will only work with the way Arduino IDE 1.8.x install arranges files. Arduino IDE 2.x.x changed everything. In theory you could edit these defines for the relative locations where the files are with newer Arduino IDE. But those paths have package version numbers with the new IDE, so anything you put in the makefile is likely to break when/if the packages are updated to different versions which change the path that has version number as one if its folders.

To get a (hopefully) smooth out-of-the-box Makefile experience, you need to use Arduino IDE 1.8.19 and run the installer which puts the Makefile and all the other stuff those Makefile defines reference at the correct places.
Hi Paul,
Thank you! I knew I wasn't hallucinating that badly. I will go ahead from where I am, I cloned the relevant
repos from your github group which is an amazing collection of obviously hard work.
I particularly appreciated the description on one Ethernet repo saying people should not use that code!
It really makes me happy to see clear signposts like that.
By using the "cores" repo and the default arm-none-eabi toolchain from the package, I was able to already
get a gmake based build system to work.
It seems I was right about the documentation (on the website) not quite keeping up with the shifting
quicksands of the IDE - that's the second biggest reason I don't like IDEs, but the list is two long to type
in so I will just say thank you for all this amazing stuff you put out, I wish I found it before I posted the thread.
I guess the right fix for this might be to update the instructions for now, but I can see it's hard to keep up
with this sort of thing.
-John
 
Can you give me a link to the specific page with out-of-date instructions you found?

To quote:
---------------------------

Teensyduino, Version 1.60​

Arduino 2.x.x Software Development (Install by Boards Manager)​

First download the Arduino 2.x.x IDE from Arduino's website. All versions 2.0.4 and later are supported. Versions 2.3.0 or later are recommended, due to improvements in Boards Manager.

-----------------------------------------------

So I did that first. After that, nothing about how to find the Makefile was true, and your explanation above
is quite clear. Maybe adding a note about how this version of the Boards Manager doesn't work well with
a Makefile based build environment, see below and don't do this first after all, would make this more clear.
 
@jrl_synchro: Go back & reread <post #6> & <post #7>, which both clearly indicate that installing only the IDE is insufficient. It certainly seems like you have not completely followed the instructions given by the webpage that you quoted, nor those in the two posts referenced above. Once you do fully as instructed, you will successfully find your Makefile. Until then, you'll continue to be unable to find the Makefile.

Hope that helps . . .

Mark J Culross
KD5RXT

P.S. You have mentioned in several of your posts that you are pulling things from repos. That is absolutely unnecessary. Installing the Teensy support per the instructions (thru the Boards Managers for IDE 2.3.x or by installing TeensyDuino for IDE 1.8.x) automatically installs the latest (verified versions) of everything. Hopefully that will save you any additional anguish. MJC
 
Last edited:

To quote:
---------------------------

Teensyduino, Version 1.60​

Arduino 2.x.x Software Development (Install by Boards Manager)​

First download the Arduino 2.x.x IDE from Arduino's website. All versions 2.0.4 and later are supported. Versions 2.3.0 or later are recommended, due to improvements in Boards Manager.

-----------------------------------------------

So I did that first. After that, nothing about how to find the Makefile was true, and your explanation above
is quite clear. Maybe adding a note about how this version of the Boards Manager doesn't work well with
a Makefile based build environment, see below and don't do this first after all, would make this more clear.

No, I will not clutter the instructions for Arduino IDE 2.x.x Boards Manager, used by the vast majority of people, with Makefile instructions needed by only a small minority.

But I will do 3 other things. Hopefully these will help.

1: Added an "installers" anchor tag on the download page installers for Arduino 1.8.x, so links can go right to that section.

2: Updated the Makefile on github with expanded comments about how to install the files. The new comment has the link directly to the installers and a specific warning about Arduino IDE 2.x.x giving an incompatible folder structure.

Code:
#************************************************************************
# Location of Teensyduino utilities, Toolchain, and Arduino Libraries.
#
# To get all files needed, install Arduino IDE 1.8.19 and then run the
# Teensyduno installer, available here:
#   https://www.pjrc.com/teensy/td_download.html#installer
#
# Newer Arduino IDE 2.x.x has a completely different folder structure
# which can be made to work, but the defines below assume the folders
# used by Arduino IDE 1.8.19.  You do not need to actually run Arduino.
# Simply installing without running gives you all the files and tools
# in the folder structure compatible with this Makefile.
#
# To use this makefile without Arduino, copy the resources from these
# locations and edit the pathnames.  The rest of Arduino is not needed.
#************************************************************************

3: Updated the Software info on Teensy 4.0 and Teensy 4.1 pages with the link directly to the installer section and specifically mention Arduino IDE 1.8.19 with a link.

Before:
1771538124048.png


After:
1771538880685.png
 
No, I will not clutter the instructions for Arduino IDE 2.x.x Boards Manager, used by the vast majority of people, with Makefile instructions needed by only a small minority.

But I will do 3 other things. Hopefully these will help.

1: Added an "installers" anchor tag on the download page installers for Arduino 1.8.x, so links can go right to that section.

2: Updated the Makefile on github with expanded comments about how to install the files. The new comment has the link directly to the installers and a specific warning about Arduino IDE 2.x.x giving an incompatible folder structure.

Code:
#************************************************************************
# Location of Teensyduino utilities, Toolchain, and Arduino Libraries.
#
# To get all files needed, install Arduino IDE 1.8.19 and then run the
# Teensyduno installer, available here:
#   https://www.pjrc.com/teensy/td_download.html#installer
#
# Newer Arduino IDE 2.x.x has a completely different folder structure
# which can be made to work, but the defines below assume the folders
# used by Arduino IDE 1.8.19.  You do not need to actually run Arduino.
# Simply installing without running gives you all the files and tools
# in the folder structure compatible with this Makefile.
#
# To use this makefile without Arduino, copy the resources from these
# locations and edit the pathnames.  The rest of Arduino is not needed.
#************************************************************************

3: Updated the Software info on Teensy 4.0 and Teensy 4.1 pages with the link directly to the installer section and specifically mention Arduino IDE 1.8.19 with a link.

Before:
View attachment 38856

After:
View attachment 38857
Thanks very much for this follow-up. I can see the point that most IDE users will not be interested.
The Makefile comment is very much to the point and I appreciate the way you have responded.

Something like this has bitten me before, where I went and got the latest camera driver interface
and it turned out to be two or three revs ahead of the rest of the system and I had to back-fit a lot of code.

To me it seems that these changes almost do it, and I completely accept your judgement about the impact on
the main page about how to get the latest IDE installed. I still would have probably first done the "do this first"
thing because that's what it says, but with the link that says "Makefiles" I likely would have followed that.

I am a system safety engineer. I try to be in control of what bits get into my control software, because it runs
equipment that can cause damage or harm if it malfunctions. Using a library at all makes me have to read all the
sources for it, and using an IDE: what can I do? How can I know what it did? I hope anyone that was upset by
something I said will either forgive me for it or get over it, and I will try to be as helpful as you were here.
-John
 
Back
Top