Skip to content

Display output from Arduino Firmware Uploader #2220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 tasks done
per1234 opened this issue Sep 6, 2023 · 5 comments
Open
3 tasks done

Display output from Arduino Firmware Uploader #2220

per1234 opened this issue Sep 6, 2023 · 5 comments
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@per1234
Copy link
Contributor

per1234 commented Sep 6, 2023

Describe the request

Print the output from the arduino-fwuploader invocations to the IDE's "Output" panel.

🙂 It will be easier for the user to troubleshoot problems that might occur during the process.
🙂 Target-specific usage advice will be visible to the user.

Describe the current behavior

Arduino IDE's "Firmware Updater" and "Upload SSL Root Certificates" features allow the user to update the supplemental modules found on some Arduino boards. These features use the Arduino Firmware Uploader command line tool.

As with any other complex technical operation, the process might fail for a variety of reasons. For example:

Currently, the only feedback provided to the user when this happens is a generic message with advice that is not always helpful:

⚠ Installation failed. Please try again.

Even when the process is successful, it might be that the target-specific plugins print helpful usage advice. For example, this important message printed by Arduino Firmware Updater when targeting the UNO R4 WiFi board:

Upload completed! To complete the update process please disconnect and then reconnect the board.

🙁 The user doesn't receive any information about the cause of a failed operation in the Arduino IDE GUI. They must sift through the logs generated by the IDE to find any such information.
🙁 There is no way for important target-specific advice to be displayed to the user in the Arduino IDE GUI.

Arduino IDE version

73ddbef

Operating system

All

Operating system version

Any

Additional context

For the sake of transparency, I suggest also printing the arduino-fwuploader command to the output, as is done by Arduino IDE during the compilation and upload processes when verbose output is enabled. This information can be useful for troubleshooting and also helps advanced users to develop workflows using Arduino Firmware Uploader directly.

Additional Requests

Related

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest nightly build
  • My request contains all necessary details
@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Sep 6, 2023
@dankeboy36
Copy link
Contributor

Great idea!

Print the output

Do you prefer IDE to print the output at the end of the command, or does it want to provide the terminal feeling? For example, when there is some data on the process's stdout/stderr, should IDE update the Output?

If the latter, there is an overlay when the operation is running, and the dialog is visible. Is IDE happy updating the Output with the overlay, or is there a requirement to change the UX?

@per1234
Copy link
Contributor Author

per1234 commented Sep 10, 2023

Do you prefer IDE to print the output at the end of the command, or does it want to provide the terminal feeling? For example, when there is some data on the process's stdout/stderr, should IDE update the Output?

Streaming the Arduino Firmware Uploader output (as is done with the verbose compilation and upload output) would be ideal because it would provide the user with some indication of progress of the operation. But if that makes the feature significantly more difficult to implement then I think it would be fine to print all the collected output after the arduino-fwuploader command exits.

there is an overlay when the operation is running, and the dialog is visible. Is IDE happy updating the Output with the overlay, or is there a requirement to change the UX?

The idea behind this proposal was to leverage the existing user interface of Arduino IDE rather than having to find a way to communicate the information within the "Firmware Update" and "Upload SSL Root Certificates" dialogs.

I understand that it is maybe slightly unintuitive for the output to be printed to the underlying IDE window even though the operation is being performed by the user in a modal dialog. However, I don't think it will be too bad because the user is already accustomed to looking at the Output view for logs from various processes, including Library Manager and Boards Manager.

@kittaakos
Copy link
Contributor

Here is the feature in action. I see tons of stdout (% when flashing), it could be nicer. The stderr variant is more helpful. If IDE2 needs it, I can finalize the feature.

stdout:

2220.mp4

stderr:

2220_error.mp4

@per1234
Copy link
Contributor Author

per1234 commented Sep 14, 2023

I see tons of stdout (% when flashing)

This is due to #1473

it could be nicer

Definitely, but I think sub-ideal output is still better than none at all.

The stderr variant is more helpful.

Just to make sure the requirements are clear, we need both stdout (most importantly because this is where any user instructions such as the need to power cycle the UNO R4 WiFi will be printed) and stderr (because this will be needed for troubleshooting failed attempts).

@kittaakos
Copy link
Contributor

This is due to

sub-ideal output is still better than none at all.

we need both

OK, thanks! I wanted to make sure we are all aware of the new UX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

3 participants