VERBOSE output required to upload?

Hi All,

I am doing some tests with a new out of box Arduino R4 wifi.

I am trying to blink an external LED on pin 5.

I am running Arduino 2.3.6 on a mac (14.7.1) using R4 board version 1.4.1 (newest at time of writing).

i can only get code to upload if i have :

Show verbose output during UPLOAD checked.

If i turn it off (uncheck in settings) the code does not upload even though the IDE says it has and the LED on board have flashed like code is arriving.

With board version 1.3.1 I need to check verbose for both upload and compile??

EDIT -- if i hit reset on the board, the NEW code is present. Without the verbose settings -- the IDE does not seems to automatically reset the board at end of upload sequence. With the settings, full upload sequence is generally ok -- with occasional glitches and manual reset required.

Is it expected that users will reset immediately after upload to get things to work?

Am i doing something wrong?

Or, Is this a known issue?

Any thoughts on why this is happening?

Feels like a weird and subtle quirk that makes me not want these anywhere near my classroom.

s

Hi @hex705. I'm going to ask you to provide the full output from a non-verbose upload.


:red_exclamation_mark: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Prepare to perform the blink test, as you did before.
  2. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  3. Uncheck the box next to Show verbose output during: compile in the "Preferences" dialog.
  4. Uncheck the box next to Show verbose output during: upload.
  5. Click the "OK" button.
    The "Preferences" dialog will close.
  6. Attempt an upload, as you did before.
  7. Wait for the upload to finish.
  8. Verify that the uploaded program is not running on the board.
  9. Right click on the black "Output" panel at the bottom of the Arduino IDE window.
    A context menu will open.
  10. Select Copy All from the menu.
  11. Open a reply here on this forum topic by clicking the "Reply" button.
  12. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
  13. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the upload output into the code block.
  14. Move the cursor outside of the code block markup before you add any additional text to your reply.
  15. Click the "Reply" button to publish the post.

hope this is what you need. -- sorry made an edit while you replied.

Sketch uses 52384 bytes (19%) of program storage space. Maximum is 262144 bytes.
Global variables use 6756 bytes (20%) of dynamic memory, leaving 26012 bytes for local variables. Maximum is 32768 bytes.
Erase flash

Done in 0.001 seconds
Write 52392 bytes to flash (13 pages)

[                              ] 0% (0/13 pages)
[==                            ] 7% (1/13 pages)
[====                          ] 15% (2/13 pages)
[======                        ] 23% (3/13 pages)
[=========                     ] 30% (4/13 pages)
[===========                   ] 38% (5/13 pages)
[=============                 ] 46% (6/13 pages)
[================              ] 53% (7/13 pages)
[==================            ] 61% (8/13 pages)
[====================          ] 69% (9/13 pages)
[=======================       ] 76% (10/13 pages)
[=========================     ] 84% (11/13 pages)
[===========================   ] 92% (12/13 pages)
[==============================] 100% (13/13 pages)
Done in 3.079 seconds

I want to clarify -- as I continue to explore the issue it seems that upload is Ok - but reset fails.

without verbose reset has to be manual.

i added an edit above but it may get lost and may have been incorrect way of updating.
(also original title is now misleading -- apologies)

No. The uploaded program should run automatically after an upload.

I just verified this is the case with my board.

Not that I am aware of.

Please provide the sketch you are uploading. It is possible that my inability to reproduce the fault is caused by a difference between the sketch I am using and the one you are using.

here is the code I was using ...

note it works fine with my minima (or seems to so far)

// simple LED blink 
// state changes happen within each loop 

// led PINs
int ledPin = 5;

// led states
boolean ON = 1;
boolean OFF = 0;

void setup() {
  // put your setup code here, to run once:
  
  // set pinModes
  pinMode(ledPin, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:

  // write ledPin to ON ( HIGH, 1, 5V);
  digitalWrite(ledPin, ON);// ON == 1 == HIGH, [electrical 5V] 
  Serial.println("high");

  delay(1500);
  
  // write ledPin to OFF (LOW, 0, GND);
  digitalWrite(ledPin, OFF);// OFF == 0 == LOW, [electrical 0V(GND)] 

  Serial.println("low");
  delay(1500);
}

Hi @hex705
I have not investigated the relation between upload and the verbose IDE settings, but I can confirm your observation that many boards require a manual reset after loading the firmware. For example, this is true for RP2040 boards with the Earle Philhower package, as well as for boards based on WinnerMicro chips.

thanks for sharing -- this !

nice to know I am not entirely alone!

Unfortunately I am still not able to reproduce the fault even when using your sketch.

The UNO R4 WiFi board has a supplemental "bridge" module. This module provides the Wi-Fi and BLE communication capabilities for the board. Uploads to the UNO R4 WiFi are done through this module. The "bridge" module runs a custom firmware created by Arduino.
It is possible the behavior you are experiencing is caused by having an outdated version of the firmware installed on the module.

It is a good idea to make sure you have the latest version of the firmware installed regardless, so I think it is worth updating it. I'll provide instructions you can follow to do that:

  1. Start Arduino IDE.
  2. Connect the UNO R4 WiFi board to the computer with a USB cable.
  3. If you see a "Serial Monitor" tab in the bottom panel of the Arduino IDE window, click the X icon on the tab to close Serial Monitor:
  4. Select Tools > Firmware Updater from the Arduino IDE menus.
    The "Firmware Updater" dialog will open.
  5. Select the UNO R4 WiFi board from the "Select a board..." menu in the "Firmware Updater" dialog.
  6. Click the "CHECK UPDATES" button in the dialog.
    An "INSTALL" button will appear in the dialog.
  7. Click the "INSTALL" button
    An "Installing firmware." message will appear at the bottom of the dialog.
  8. Wait until the "Firmware successfully installed." message appears at the bottom of the dialog.
  9. Disconnect the USB cable of the UNO R4 WiFi board from your computer.
    :red_exclamation_mark: It is essential to perform this step.
  10. Connect the UNO R4 WiFi board to your computer with the USB cable again.
  11. Click the X icon at the top right corner of the dialog.
    The dialog will close.

Now try uploading the sketch to the board once again in non-verbose mode. Hopefully this time the program will start running automatically after the upload finishes.

Hi Again,

Thanks for all your help so far @ ptillisch

I attempted the procedure you suggested. However, like up-loading code, the process seems to start, the firmware upload process begins, the onboard LEDs flash like serial communication is happening -- after a few seconds the built-in LED starts to pulse at a steady rate and IDE never says complete (waited >10 minutes) - no change in state.

Upside, I can still upload code with manual reset! So, its not bricked.

Downside, manual reset still required.

FWIW -- tested on a second (new) WIFI board -- same issue. I have used 3 different cables. Code source doesn't appear to change outcome.

When i use verbose, I get a reset() call at end of upload and it works as I would expect.

Here is the last bit of console output -- with verbose settings on -- you can see the explicit reset call.

[===========================   ] 92% (13/14 pages)write(addr=0x34,size=0x1000)
writeBuffer(scr_addr=0x34, dst_addr=0xd000, size=0x1000)

[==============================] 100% (14/14 pages)
Done in 3.490 seconds
reset()

Any additional thoughts appreciated. Otherwise I will work around it.