Nano 33 iot upload issue

When i try to upload a sketch to my Arduino Nano 33 iot I am not able to upload. When i click the upload button it only verifies and nothing changes in the serial monitor or anything. I have tried with different pc and tried reinstalling the create agent. I am new to arduino cloud and i dont know if im missing something obvious or anything. This all used to work a week ago and i have no clue what to do.
It stops like this after i click the upload button:

Hi @a-ruino. I apologize for the inconvenience that is caused by this bug. This has been reported to the Arduino Cloud developers and they are already working on a fix. I'll post an update here if I receive any news from them about a resolution.

The bug only affects uploads via the USB port. If you have an "Entry" Arduino Cloud plan, or higher then you can also upload sketches to IoT Devices "over-the-air" (OTA), and these uploads should work fine.

I'll provide instructions you can follow to do that:

  1. Select the over-the-air port from the Cloud Editor toolbar:
  2. Click the upload button.

In case you are interested in understanding the conditions under which the bug occurs, as well as potential workarounds, I'll provide the boring details below. If you aren't curious then you are welcome to skip reading the rest of this post.

The bug occurs when the compilation produces output on the "standard error" stream (AKA "stderr").

So first we must consider what conditions can produce that type of output, and if that is relevant, what could be done to avoid those conditions:

Compilation Errors

The most common source of such stderr output is error messages.

This source of stderr output is irrelevant to the bug because the upload could not be performed anyway because you can only upload if the compilation was successful.

Compilation Warnings

We could also get stderr output from compiler warnings about non-fatal possible problems with the code.

However, Cloud Editor configures the compiler to not produce any warnings so this is not a factor.

#pragma message

Another source of stderr output is #pragma message directives. These are used to print informational messages in the compiler output. We can reproduce the bug with a simple sketch like this:

#pragma message "Hello, world!"
void setup() {}
void loop() {}

In the case where the upload is skipped due to the output from a #pragma message directive, the workaround would be to comment out those directives in the code. This is straightforward if the #pragma message directive is in your sketch. It is a bit more complicated if the #pragma message directive is in a library, but not too difficult once you know how to do it. If you do run into such a situation, I'd be happy to provide instructions for modifying the library source code.

Linker Warnings

Another source of stderr output is warnings that come from other pieces of the compilation toolchain, such as the GNU linker ld. Unfortunately ld produces some warnings during some compilations for the Nano 33 IoT board:

/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes
/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes
/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes
/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes
/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes

If the compilation produces these warnings then the bug causes Cloud Editor to skip the upload operation.

I don't know what specific conditions cause these warnings to be produced. Unfortunately they do seem to be produced by the combination of the "ArduinoIoTCloud" and "Arduino_ConnectionHandler" libraries used by Arduino Cloud IoT Thing sketches (even though the Cloud Editor stderr handling bug is not specific to Thing sketches).

My understanding is that the warnings don't indicate any real problem, so you don't need to be concerned about the warning itself, as explained here:

https://forums.adafruit.com/viewtopic.php?t=189483#p917530

As for a workaround, I'm not sure what could be done to prevent ld from producing these warnings. Since they don't occur for all Arduino sketch compilations, perhaps it could be accomplished by adding some innocuous code to the sketch, or making a simple modification to a library. Maybe one of the other forum helpers will have an idea about that.

Hello again @a-ruino. The bug that caused uploads to USB ports to be skipped when the compilation produced stderr output has now been fixed.

I apologize for any inconvenience this has caused.

Please give it a try and let us know if you still have any problems.

I must make a correction for this statement. The bug has been fixed for non-IoT sketches, but has not yet been deployed for Arduino Cloud IoT Thing sketches. I'll post another update here once the fix is also made for IoT sketches.

Hi @a-ruino. The bug that caused uploads to USB ports to be skipped when the compilation produced stderr output has now been fixed for IoT Thing sketches.

So you should now be able to upload IoT sketches as well as non-IoT sketches without encountering that problem.

Please give it a try and let us know if you still have any problems.

Thank you so much for the replies. It works perfectly now thanks. I apreciate the detailed description of the issue.

You are welcome. I'm glad it is working now. Thanks for taking the time to post an update!

Regards,
Per

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