Arduino CLI And IDE now Released - Teensy Supported!

The Preferences dialog in IDE 2.0.0 does not contain the same link.

Arduino IDE 2.x has a completely separate settings store and system from Arduino IDE 1.x. It does not use preferences.txt in any way.

Does anyone know where/how to specify/modify "build.path" for IDE 2.0.0?

I'm not aware or any way to set this short of modifying the Arduino IDE source code.

I can suggest a couple of alternatives:

You can use Sketch > Export Compiled Binary to save the binaries to the build subfolder of the sketch folder.

You can use Arduino CLI directly from the command line or a script, specifying your custom build path via the --build-path flag:

https://arduino.github.io/arduino-cli/latest/commands/arduino-cli_compile/#options



Even though it probably won't be of use for this specific goal of setting the build path, I'll share the information about the Arduino IDE 2.x advanced settings:

Two types of advanced settings are used by Arduino IDE:

Application settings

The advanced application preferences can be modified via a convenient GUI interface in the IDE:

https://github.com/arduino/arduino-ide/blob/main/docs/advanced-usage.md#advanced-settings

Arduino CLI configuration

Some of the settings controlled via the primary Arduino IDE "Preferences" dialog and advanced settings such as "Sketchbook location" and "Additional Boards Manager URLs" are actually Arduino CLI configurations. However, there are some additional Arduino CLI configuration options that can only set via the Arduino CLI configuration file.

When used by Arduino IDE, Arduino CLI uses a configuration file stored in the Arduino IDE's configuration folder, which is a different location than the default when you are using Arduino CLI directly from the command line:

Windows:

Code:
C:\Users\<username>\.arduinoIDE\arduino-cli.yaml

Linux:

Code:
~/.arduinoIDE/arduino-cli.yaml


macOS:

Code:
~/.arduinoIDE/arduino-cli.yaml

The documentation for the Arduino CLI configuration file is here:

https://arduino.github.io/arduino-cli/latest/configuration/
 
I am so sorry to barge in but does anyone know how to get rid of all the junk on the Arduino IDE 2. My god the whole screen is covered with bs like the huge black output box on the bottom and the board manager on the left. How annoying as all that is left of the screen is a little box showing actual coding. How on earth does the Arduino team think this is an advancement I will never know. If I can't get of of these boxes I will uninstall IDE 2 and never use it.
Cappy IDE 2.jpg

Regards,
Marathonman
 
Left hand side, you control what is there or not. If you click on board manager icon, it will show it, if you click on it again it will then not show it.

The part at the bottom

Click on the bottom right:
Screenshot.png

Edit: After that it should look more like:
Screenshot.png
Note: I am using the Dark(Theia) theme
 
You can use Sketch > Export Compiled Binary to save the binaries to the build subfolder of the sketch folder.

Thanks very much. IMO it's useful to be able to specify a fixed build path for all sketches, both for easier access to the files and to avoid creation of a different temp folder for every sketch.

You can use Arduino CLI directly from the command line or a script, specifying your custom build path via the --build-path flag:

Thanks, I'll work on learning to build sketches from the command line.

One more question. Is there any way to switch from one sketch to another one in the same instance of the IDE? That's almost always what I want to do, as opposed to having multiple instances of the IDE.
 
does anyone know how to get rid of all the junk on the Arduino IDE 2
We have received multiple reports that the bottom panel toggle control is unintuitive. This is tracked by the IDE developers here:

https://github.com/arduino/arduino-ide/issues/600

There wasn't any feedback about the side panel toggle being unintuitive during the pre-release phase so we haven't given any consideration to how this could be improved. Although the problem with the bottom panel toggle icon is obvious to me, I don't have the same insight into the UX problem presented by the side panel. My perspective might be a bit tainted by my familiarity with VS Code, which has an identical side panel UI, but I actually started using what became Arduino IDE 2.x more than 6 months before I ever touched VS Code, so I have had a new user experience with this UI, even if that experience is a bit fogged by the 2.5 years that have passed.

That said, you are the second person today to bring this up, so I am paying close attention to this feedback.

I would be interested in any suggestions about how this UI could be made more intuitive or how the usage of it could be communicated to the users.
 
There wasn't any feedback about the side panel toggle being unintuitive during the pre-release phase so we haven't given any consideration to how this could be improved.

That said, you are the second person today to bring this up, so I am paying close attention to this feedback.

I would be interested in any suggestions about how this UI could be made more intuitive or how the usage of it could be communicated to the users.

I think it would be more intuitive to have a minimize icon at the top of the bottom panel rather than an icon at the bottom of the main window. I would also like to second a suggestion that was made on the Arduino User Forum to eliminate the minimum height of the bottom panel, which seems unnecessary. I think I would prefer to reduce its size than to have to toggle it off and on every time I want to edit then build. An option I like in the Embarcadero IDE is to hide the build window automatically after a successful build.
 
I think it would be more intuitive to have a minimize icon at the top of the bottom panel rather than an icon at the bottom of the main window. I would also like to second a suggestion that was made on the Arduino User Forum to eliminate the minimum height of the bottom panel, which seems unnecessary. I think I would prefer to reduce its size than to have to toggle it off and on every time I want to edit then build. An option I like in the Embarcadero IDE is to hide the build window automatically after a successful build.

I totally agree.
 
Hi Paul,

The problem with the arduino-cli upload came back after I had to re-build everything on the Raspberry PI 4 after a serious problem. I'm now using the Rapberry Pi OpenPlotter 64-bit; I was using the 32-bit version before.

The arduino-cli version is 0.27.1
I have followed your instructions about rules.d
pi@openplotter:/etc/udev/rules.d $ ls
49-teensy.rules 99-com.rules
pi@openplotter:/etc/udev/rules.d $ more 49-teensy.rules
USBSYSTEM=="usb_device", SYSFS{idVendor}=="16c0", SYSFS{idProduct}=="0478", MODE
="0666"

The error that I get is
arduino-cli upload -b teensy:avr:teensy41 -p usb1/1-1/1-1.4 -v
"/home/pi/.arduino15/packages/teensy/tools/teensy-tools/1.57.0/teensy_post_compile" "-file=Nmea_Controller.ino" "-path=/tmp/arduino-sketch-CB8FFE89FA18F3BAFD03419971A48628" "-tools=/home/pi/.arduino15/packages/teensy/tools/teensy-tools/1.57.0" "-board=TEENSY41" -reboot "-port=usb1/1-1/1-1.4" "-portlabel={serial.port.label}" "-portprotocol={serial.port.protocol}"
Teensy did not respond to a USB-based request to enter program mode.
Please press the PROGRAM MODE BUTTON on your Teensy to upload your sketch.
Error during Upload: Failed uploading: uploading error: exit status 1

The arduino-cli board list returns:
pi@openplotter:~/Arduino/Nmea_Controller $ arduino-cli board list
Port Protocol Type Board Name FQBN Core
/dev/ttyAMA0 serial Serial Port Unknown
usb1/1-1/1-1.4 teensy Teensy Ports Teensy 4.1 teensy:avr:teensy41 teensy:avr

If I connect the Teensy on my Windows PC, I can reprogram it.
Any idea of what could be the problem?
 
have a minimize icon at the top of the bottom panel rather than an icon at the bottom of the main window.

I also suggested this in the issue report thread. This is how it works in VS Code.

eliminate the minimum height of the bottom panel

This is tracked by the Arduino IDE developers here:

https://github.com/arduino/arduino-ide/issues/308

hide the build window automatically after a successful build.

This is tracked by the Arduino IDE developers here:

https://github.com/arduino/arduino-ide/issues/288

If you have a GitHub account, you can subscribe to the issues of interest to get notification of any new developments.
 
Thanks @PerT

Another possibility is to add something like view menu.

UI wise another thing I wish at times was there was some visual indication of the state of a couple of the buttons. Example: the Autoscroll button, sometimes I click it a few times as unclear if scrolling is working properly. Maybe when it keeps the last line visible, won't be as much of an issue.

Now looking more at library updates as follow on to Arduino forum thread:

Example just now:
Code:
Downloading TeensyTimerTool@1.1.0
TeensyTimerTool@1.1.0
Installing TeensyTimerTool@1.1.0
Replacing TeensyTimerTool@1.0.0 with TeensyTimerTool@1.1.0
Failed to install library: TeensyTimerTool:1.1.0.
Error: 13 INTERNAL: Library install failed: moving extracted archive to destination dir: rename C:\Users\kurte\Documents\Arduino\libraries\package-498706162\TeensyTimerTool-1.1.0 c:\Users\kurte\Documents\Arduino\libraries\TeensyTimerTool: Access is denied.

Note it is not there after the update. Not sure what it was before. It very likely might have been a junction to my github directory (d:\github\TeensyTimerTool)

Code:
C:\Users\kurte\Documents\Arduino\libraries>dir Teensy*
 Volume in drive C is OS
 Volume Serial Number is 7E8D-E873

 Directory of C:\Users\kurte\Documents\Arduino\libraries

07/28/2022  10:12 AM    <DIR>          Teensy-3.0-SPI-Master---Slave
07/28/2022  10:12 AM    <DIR>          Teensy-ILI9341-8-bit-Parallel-Library
07/28/2022  10:12 AM    <DIR>          Teensy-reSID
07/28/2022  10:12 AM    <DIR>          Teensy64
07/28/2022  10:12 AM    <DIR>          TeensyDebug
09/05/2022  05:10 PM    <JUNCTION>     TeensyEXT4 [d:\github\TeensyEXT4]
07/28/2022  10:12 AM    <DIR>          TeensyMAC-master
07/28/2022  10:12 AM    <DIR>          TeensyTransfer
07/28/2022  10:12 AM    <DIR>          Teensyview_FlexIO
07/28/2022  10:12 AM    <DIR>          teensy_ssd1351
               0 File(s)              0 bytes
              10 Dir(s)  170,957,647,872 bytes free

I tried update second time and it worked.

So, I am guessing the Update Engine does not check for things like junctions and also probably not for github projects. Will check for open Issues on this....

Also wondering about why it keeps asking me to update Adafruit_BusIO, like:
Screenshot.png
when:

Code:
C:\Users\kurte\Documents\Arduino\libraries\Adafruit_BusIO>more library.properties
name=Adafruit BusIO
version=1.13.2
author=Adafruit
maintainer=Adafruit <info@adafruit.com>
sentence=This is a library for abstracting away UART, I2C and SPI interfacing
paragraph=This is a library for abstracting away UART, I2C and SPI interfacing
category=Signal Input/Output
url=https://github.com/adafruit/Adafruit_BusIO
architectures=*

And when try to update:
Code:
Already installed Adafruit BusIO@1.13.2
Will continue back on Arduino forum and look later for appropriate open issues and/or create some

Note: now running nightly build: 0916
Which asked me if I want to install to 2.0.0, which I have installed.
 
Left hand side, you control what is there or not. If you click on board manager icon, it will show it, if you click on it again it will then not show it.

The part at the bottom

Click on the bottom right:
View attachment 29393

Edit: After that it should look more like:
View attachment 29394
Note: I am using the Dark(Theia) theme

Thank you so much!

And I agree with " hide the build window automatically after a successful build." Most definitely.
Regards,
Marathonman
 
Did anyone try to integrate the tyTools/tyCommander in the IDE2?

Did not look at that here. Just altered my setup (removed TEMP from virtual RamDrive) to allow IDE 2 to run at all.

Notes made that TSET on Windows CLI still works using IDE 1.8.19 or IDE 2.0 installed toolchain PJRC supplies. But that only finds the tools in the Arduino15 build paths, not using the IDE 2.0 build process as it does 'under the covers'.
This/related posts on this thread? Arduino-CLI-And-IDE-now-Released-Teensy-Supported!

Also from Beta testing I have Lockable T_4.x's that TyCommander wouldn't know to upload .eHex files so have been using --delegate where TyComm asks for board and triggers Teensy.exe loader:
"%TyTools%\TyCommanderC.exe" upload --autostart --wait --delegate "%temp1%\%sketchname%.hex" )
-Have not tried the --delegate add under IDE 1.8.19 either as the IDE is usually avoided, unless using for PJRC testing ... like the IDE 2.0 so far so that 'locked' can get fed .eHex files.

Using that from SublimeText CLI builds (see above note from @PerT there is no IDE 2.0 analog to the CLI arduino-builder) it could use the edited:
C:\Users\Tim\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.58.0-beta2\platform.txt and boards.txt
And perhaps edit those to feed TyComm, though that path changes on each update to TeensyDuino used by IDE, versus IDE 1.8.19 that installs 'in place' so update would lose edits.

Might be nice if you experiment to get use of TyComm SerMon - Might try it here in some days.
 
Might be nice if you experiment to get use of TyComm SerMon - Might try it here in some days.
Got it going, I simply copied the TY stuff from a platform.txt from an old installation to the new platform.txt in the folder you gave. Need to close the IDE, delete the folder "arduino-ide" in "<user>\AppData\Roaming" to have the IDE reload the changed platform.txt (as per https://github.com/arduino/arduino-ide/issues/1030). Then TyCommander works as expected.

Could be done by a simple script...
 
Example: the Autoscroll button, sometimes I click it a few times as unclear if scrolling is working properly.

I reported this bug here:

https://github.com/arduino/arduino-ide/issues/1053

However, management decided that the "Dark (Theia)" and "Light (Theia)" themes are going to be removed and that we can not invest any further resources into supporting them:

https://github.com/arduino/arduino-ide/issues/1283

I recommend using the "Dark (Arduino)" theme as an alternative to "Dark (Theia)". "Dark (Arduino)" is supported and any reports of problems or suggestions for enhancements are welcome for that theme.

Maybe when it keeps the last line visible, won't be as much of an issue.

Now fixed thanks to a community contribution!

https://github.com/arduino/arduino-ide/pull/1446

So, I am guessing the Update Engine does not check for things like junctions and also probably not for github projects. Will check for open Issues on this....


Thanks for your report!

https://github.com/arduino/arduino-cli/issues/1881

Also wondering about why it keeps asking me to update Adafruit_BusIO, like:

We determined over on the Arduino forum that it was caused by this bug:

https://github.com/arduino/arduino-cli/issues/1871

I believe Cristian Maglie already prepared a fix for that:

https://github.com/arduino/arduino-cli/pull/1878
 
However, management decided that the "Dark (Theia)" and "Light (Theia)" themes are going to be removed and that we can not invest any further resources into supporting them:

https://github.com/arduino/arduino-ide/issues/1283

I recommend using the "Dark (Arduino)" theme as an alternative to "Dark (Theia)". "Dark (Arduino)" is supported and any reports of problems or suggestions for enhancements are welcome for that theme.
Understood. Personally I like the Theia dark better... Recently, when I was setting up the new machine, I was trying to figure out if I could get the same or similar color scheme in sublime text...
I did not find one that close, but ended up with: Default Dark theme with Monokai color...

But for now will switch to the Arduino Dark


Now fixed thanks to a community contribution!

https://github.com/arduino/arduino-ide/pull/1446
Downloaded daily and appears to be working! :D (I tried yesterdays... yesterday, but it must have been packaged before the PR was integrated)

We determined over on the Arduino forum that it was caused by this bug:

https://github.com/arduino/arduino-cli/issues/1871

I believe Cristian Maglie already prepared a fix for that:

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

That will be good. My duplicate list is now down to 3, after I deleted all of the libraries with names like: arduino<some generated name stuff>

The main one I would like to keep from being overwritten is a junction to github project for SDFat. Where it want's to overwrite with the Arduino Library (Non-Teensy version of SDFat).

Wish they were different names... But maybe at least in this case it might avoid the issue if I would rename the junction.
 
PerT said:
However, management decided that the "Dark (Theia)" and "Light (Theia)" themes are going to be removed and that we can not invest any further resources into supporting them:

https://github.com/arduino/arduino-ide/issues/1283

I recommend using the "Dark (Arduino)" theme as an alternative to "Dark (Theia)". "Dark (Arduino)" is supported and any reports of problems or suggestions for enhancements are welcome for that theme.

I agree with @KurtE on this one. I much prefer the Theia dark theme. For me there is a noticable difference between the Arduino Dark and Theia Dark. Its too bad that you all don't want to support the Theia themes by default.

Is there a way for us to grab the theme and save it for use later?
 
The Dark (Theia) theme is based on the Dark+ (default dark) VS Code extension:

https://github.com/eclipse-theia/theia/blob/master/packages/monaco/data/monaco-themes/vscode/dark_theia.json

https://github.com/eclipse-theia/theia/blob/master/packages/monaco/data/monaco-themes/vscode/dark_plus.json

https://github.com/microsoft/vscode/blob/main/extensions/theme-defaults/themes/dark_plus.json

These aren't available packaged as extensions that I could find, but there are quite a few extensions based on it:

https://marketplace.visualstudio.com/search?term=dark%2B&target=VSCode&category=All%20categories&sortBy=Relevance

It should also be easy enough to package them as your own extension.

There is information on installing theme extensions and making your own custom themes here:

https://forum.arduino.cc/t/personal-themes/1024606/2

Please note that this information is all to be considered "use at your own risk". The Arduino company only provides support for the two Arduino themes and the High Contrast (Theia) theme, but there is quite a lot of information and community support available on the subject as it relates to VS Code extensions and themes, so I think the theme customization situation might be significantly improved compared to Arduino IDE 1.x which had an uncommon theme format with very little available documentation and community support.
 
I realized that when the Verify/Compile radio is hit it compiles then when I hit upload the crazy thing compiles again so all I do is hit upload because it compiles anyways. Is this suppose to happen or a bug or intentional???
 
Back
Top