Quick FYI - Arduino released a new version today 2.1.1, which I have downloaded and installed.
...
Installed 2.1.1 here ...
ODD - IDE restart showing 2.1.0 and asking to UPDATE to 2.1.1 ???
That is strange....
...
Will have to exit it again and see what comes up.
That is strange....
...
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]
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.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?!
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
Yes, AFAIK - the teensy tool used to upload will not run in a non-gui environment.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 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.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