Arduino CLI And IDE now Released - Teensy Supported!

Glad it is working. Sounds like something cached where the key was or the like.

Sounds like a nice machine.
 
Yes, IDE seems to be working - except odd other in recent postings on uploads ... not new - had worked around with TyComm and local.txt - not used yet.

Machine seems nice - builds take about half the time - more faster cores with more cache and double speed on the SSD's.
 
Quick FYI - Arduino released a new version today 2.1.1, which I have downloaded and installed.

So far I have only tried it on:
Screenshot.jpg
Which appears to work. At least an example for the matrix led worked as well as a Wifi example.
 
Quick FYI - Arduino released a new version today 2.1.1, which I have downloaded and installed.
...

Installed 2.1.1 here and it works on T 4.0 and 4.1 ... just opened and built and uploaded. Two copies of USB-SerialPrint-Speed Test and both running in separate IDE windows SerMon at 500Klines/sec

Going to edit my multi Teensy issue ... it worked once to program 4.1 then 4.0 with both connected for above sketch. Then opened prior sketch and it gets confused and RED LEDS 4.1 when code for upload to 4.0. ... maybe a clue ???
 
That is strange....
...

resolved ... did a restart and running from saved shortcut opened 2.1.0 and then update completed.

Code:
 Directory of C:\Users\Tim\AppData\Local\Programs

06/30/2023  06:46 PM    <DIR>          [B]Arduino IDE[/B]
06/26/2023  06:34 PM    <DIR>          [B]arduino-ide[/B]

The IDE changed the name of the install folder without removing the old install. So shortcut ran the FOUR day old 2.1.0.

<edit> updated prior computer to 2.1. and old dir had the name used above by the new install ... not sure why first install used the '-' instead of ' ' version
 
Last edited:
Good news. I've been working on arduino-cli support recently. So far only an experimental Linux x86_64 version is available. Here is the package index URL.

https://www.pjrc.com/teensy/td_156/package_teensy_index.json
Code:
https://www.pjrc.com/teensy/td_156/package_teensy_index.json

This has only been tested with arduino-cli "Version: nightly-20220120 Commit: 5beeba4 Date: 2022-01-20T01:32:18Z". It's unlikely to work with any earlier versions.

One major known limitation is the upload command (eg, running something like "/tmp/arduino-cli upload -b teensy:avr:teensy36 --port usb16/16-1/16-1.2 ~/teensy/sketch/Blink") will run GUI-based Teensy Loader to perform the actual upload. I plan to support headless upload when Arduino commits this feature:

https://github.com/arduino/arduino-cli/pull/1640

If you try this now, please know the upload is GUI only until we get an updated arduino-cli with #1640 merged.

Please reply on this forum thread (not Arduino's issue tracker) if you run this. I could really use some feedback on whether it works for you?!
I'm a bit confused as to whether the arduino-cli with Teensy third party core is supposed to be working yet or still in development.

I followed the instructions here and here and got this far but then it says "Unable find Teensy Loader. (p) Is the Teensy Loader application running?"

Bash:
pi@raspberrypi:~ $ arduino-cli core list
ID         Installed Latest Name
teensy:avr 1.59.0    1.59.0 Teensy (for Arduino IDE 2.0.4 or later)
pi@raspberrypi:~ $ arduino-cli board list
Port           Protocol Type         Board Name FQBN                Core
usb1/1-1/1-1.2 teensy   Teensy Ports Teensy 4.0 teensy:avr:teensy40 teensy:avr
pi@raspberrypi:~ $ arduino-cli compile --fqbn teensy:avr:teensy40 MyFirstSketch
Memory Usage on Teensy 4.0:
  FLASH: code:8084, data:3016, headers:8352   free for files:2012164
   RAM1: variables:3456, code:6304, padding:26464   free for local variables:488064
   RAM2: variables:12416  free for malloc/new:511872
pi@raspberrypi:~ $ arduino-cli upload -p usb1/1-1/1-1.2 --fqbn teensy:avr:teensy40 MyFirstSketch
Opening Teensy Loader...
Unable find Teensy Loader.  (p)  Is the Teensy Loader application running?
quitFailed uploading: uploading error: exit status 1

Is that what you mean by "the upload command will run GUI-based Teensy Loader to perform the actual upload."? Or did I miss a step?

I'm running arduino-cli on a Raspberry Pi headless with the Lite OS so I don't have a GUI. Therefore I don't have the Arduino IDE installed or Teensyduino. What am I missing? Can I get arduino-cli working with this setup?

thanks.
 
Is that what you mean by "the upload command will run GUI-based Teensy Loader to perform the actual upload."? Or did I miss a step?

I'm running arduino-cli on a Raspberry Pi headless with the Lite OS so I don't have a GUI. Therefore I don't have the Arduino IDE installed or Teensyduino. What am I missing? Can I get arduino-cli working with this setup?
Yes, AFAIK - the teensy tool used to upload will not run in a non-gui environment.

In many cases you can still do it, by using a different tool to do the actual upload to the teensy.
Near the end of post #3 of this thread I showed a few ways I have done it in the past.

You can build and use the teensy loader CLI: https://www.pjrc.com/teensy/loader_cli.html
At one point I was able to edit the platform.txt file in the Teensy package and point to this teensy loader cli instead.
Otherwise I did it as a two step process.
However these other tools, I don't believe have support for programming the teensy if it is a locked version.

Install enough of a GUI on the RPI, to support the teensy loader, and VNC into it.

Or sometimes simpler, to simply build it on your main machine, and copy the resulting binary down to the RPI, and then use one of the tools
to program the teensy. A long time ago I had a setup, where I hacked up the boards.txt/platform.txt on my windows machine to add an option
to instead of program the teesy, it would send the file to some directory on the RPI, and had a script running, that when a new file appeared,
it would program the teensy... But this was a long time ago and I don't think I have any of this anymore.

I have not played with it for a few months now, but on an RPI5 with SSD, I build the Arduino IDE 2, and could program Teensy boards, but I
had the GUI installed. But I believe I also tried running it then headless through a VNC.

Good luck
 
Yes, AFAIK - the teensy tool used to upload will not run in a non-gui environment.

In many cases you can still do it, by using a different tool to do the actual upload to the teensy.
Near the end of post #3 of this thread I showed a few ways I have done it in the past.

You can build and use the teensy loader CLI: https://www.pjrc.com/teensy/loader_cli.html
At one point I was able to edit the platform.txt file in the Teensy package and point to this teensy loader cli instead.
Otherwise I did it as a two step process.
However these other tools, I don't believe have support for programming the teensy if it is a locked version.

Install enough of a GUI on the RPI, to support the teensy loader, and VNC into it.

Or sometimes simpler, to simply build it on your main machine, and copy the resulting binary down to the RPI, and then use one of the tools
to program the teensy. A long time ago I had a setup, where I hacked up the boards.txt/platform.txt on my windows machine to add an option
to instead of program the teesy, it would send the file to some directory on the RPI, and had a script running, that when a new file appeared,
it would program the teensy... But this was a long time ago and I don't think I have any of this anymore.

I have not played with it for a few months now, but on an RPI5 with SSD, I build the Arduino IDE 2, and could program Teensy boards, but I
had the GUI installed. But I believe I also tried running it then headless through a VNC.

Good luck
Thanks very much KurtE. I will try one of your suggestions of using a different tool for the upload and maybe do the editing and compiling on my MacBook. Compiling was very slow on the Raspberry Pi. Will I be able to reboot autonomously? I don't have access to the reset button so it has to load and restart automatically.
 
Back
Top