In AIDE 2.1 How are the 4 Upload widgets different ?

Whats the difference between the functionality behind the following GUI Widgets

  1. Tool bar Upload Button (the right arrow)
  2. The MenuBar button Sketch->Upload
  3. The MenuBar button Sketch->Configure and Upload
  4. The MenuBar button Sketch->Upload using Programmer

Dont they all just do a build update, and then upload ? Do any of them just do as their names suggest, ie just upload ?

Hi @marcusobrien

The functionality of these two are identical.

The common method for uploading a sketch to an Arduino board is via a serial port. But Arduino IDE is designed to support any arbitrary communication channel between the PC and an Arduino board. It may sometimes be necessary to integrate user provided information into the command used to upload a sketch to an Arduino board. An example would be a password used to authenticate the upload done via a wireless network port in order to protect the target device from unwanted firmware updates by an attacker.

This capability is provided by the "user provided fields" system.

The Arduino IDE collects the user input for uploads that have "user provided fields" via a dialog:

image

On the first upload to a board configured for "user provided fields", this dialog appears even when a standard upload is performed. For the convenience of the user, the values set via that dialog are cached and reused for all subsequent uploads of that sketch+board combination for the duration of the IDE session. It might be that the user later wants to set different "user provided fields" values. They can trigger the appearance of this dialog once again by selecting Sketch > Configure and Upload from the Arduino IDE menus instead of using the standard procedure of clicking the upload button or selecting Sketch > Upload from the Arduino IDE menus.

The sketch is uploaded to the board via the ISP programmer the user has selected from the Tools > Programmer menu.

No. I already explained how you can accomplish that in my reply on your GitHub issue:

https://github.com/arduino/arduino-ide/issues/2103#issuecomment-1595998907

You can use Arduino CLI. Unlike Arduino IDE, since Arduino CLI is a tool for advanced users, the arduino-cli upload command does not do a compile, instead requiring that the used has previously generated the binary via an arduino-cli compile command.

Alternatively, you can use the upload tool of your board (e.g., esptool) directly to upload the binary.

Because their command line interface enables use in scripts and automated applications, these tools will be much more appropriate than Arduino IDE in the use case of deploying a binary to multiple of the same model board.

Thanks for the information.

I think for me using VSCode might be more efficient, or at least using AIDE with the command line to upload (like you suggested). I was hoping to use an Upload widget in the IDE to perform an upload of the binary already built, but all upload widgets rebuild something before they upload, and this can take 2 minutes, even on my PC which is a very long time for a PC with 32 Threads and running at over 5GHz (7590x), with 64GB DDR5 at 6000MT/s, and the SSD is a PCIe Gen 4 NVMe M.2 SSD.

My project has 5 external libs and I am mostly changing lib files while developing, not the .ino sketch file so the IDE isn't really good at detecting if something needs rebuilding or not.

I can at least grab the command line for upload via CLI by using verbose mode and performing upload via the AIDE.

Anyway Thanks again.

Unexpectedly long compilation durations are sometimes found to be caused by the many individual operations that are performed during the compilation operation each triggering an "on access"/"real time" file scan by security software.

As an experiment, you can try :warning: TEMPORARILY :warning: disabling the security software/antivirus on your computer for a single compilation to see if the problem goes away:

  1. Disable the security software/antivirus software.
  2. Compile the sketch, just as you did before.
  3. Wait for the compilation to finish.
  4. Immediately enable the security software/antivirus software again.

If the problem doesn't occur with the security software disabled, you will need to adjust the settings of your antivirus to put the appropriate file, folder, or process on the "allow list" so it doesn't interfere with compilation.

:warning: Please be cautious about working without an antivirus. This is only about temporarily disabling it for a quick test. If you don't feel comfortable doing that, fine. You can try going straight to configuring the antivirus to not interfere with the Arduino software.

If you modify the library, then must be rebuilt. So if Arduino IDE is rebuilding the library after you modify it then I would say that is it being good at detecting that the library should be rebuilt.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.