An error occurred while uploading the sketch suddenly on all sketches

Hello, forgive me I am new to these forums and Arduino boards in general. I am trying to make a GPS tracker using an Nano 33 iot, a GT-U7 and a SIM800L. I successfully got the GT-U7 to send coordinates to the serial monitor. I then attempted to test the SIM800L to see if it was working correctly. After uploading the code for the GT-U7 I then uploaded a different code to test the SIM800L. I keep getting a "An error occurred while uploading your sketch". I then tried to re-upload the code that I did have working and now get the same error message. I tried some remedies I found on this forum to no avail. I can post the sketches and pins I am using and/or the full error messages if needed. Any help would be greatly appreciated. Thank you.

We can start with the full output. That should give us an idea of whether we need your code or not.

Please do this:

  1. If you don't still have the IDE or web editor open with the error present, repeat the process that generated it.
  2. You now need to copy the full and exact text of the output. The procedure for doing this is different depending on which Arduino development software you are using:
    • Arduino IDE 1.x: Click the Copy error messages button on the right side of the orange bar in the IDE.
    • Arduino IDE 2.x: Right click on the black "Output" pane at the bottom of the IDE window and then select Copy All from the context menu.
    • Arduino Web Editor: Click the icon that looks like two pieces of paper at the top right corner of the black console window Web Editor.
  3. Open a forum reply here by clicking the Reply button.
  4. Click the </> 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.
    Code block
  5. Press Ctrl+V. This will paste the compilation output into the code block.
  6. Move the cursor outside of the code block markup before you add any additional text to your reply.
  7. Click the Reply button to post the output.
Arduino: 1.8.15 (Windows 10), Board: "Arduino NANO 33 IoT"

WARNING: library TinyGPSPLUS claims to run on esp32 architecture(s) and may be incompatible with your current board which runs on samd architecture(s).

Sketch uses 22000 bytes (8%) of program storage space. Maximum is 262144 bytes.

Global variables use 2968 bytes (9%) of dynamic memory, leaving 29800 bytes for local variables. Maximum is 32768 bytes.

Forcing reset using 1200bps open/close on port COM5

PORTS {COM5, } / {COM5, } => {}

PORTS {COM5, } / {COM5, } => {}

PORTS {COM5, } / {COM5, } => {}

PORTS {COM5, } / {COM5, } => {}

PORTS {COM5, } / {COM5, } => {}

PORTS {COM5, } / {COM5, } => {}

PORTS {COM5, } / {COM5, } => {}

PORTS {COM5, } / {COM5, } => {}

PORTS {COM5, } / {COM5, } => {}

PORTS {COM5, } / {COM5, } => {}

PORTS {COM5, } / {COM5, } => {}

PORTS {COM5, } / {COM5, } => {}

PORTS {COM5, } / {COM5, } => {}

PORTS {COM5, } / {COM5, } => {}

PORTS {COM5, } / {COM5, } => {}

PORTS {COM5, } / {COM5, } => {}

PORTS {COM5, } / {COM5, } => {}

PORTS {COM5, } / {COM5, } => {}

PORTS {COM5, } / {COM5, } => {}

PORTS {COM5, } / {COM5, } => {}

Uploading using selected port: COM5

C:\Users\mrm09\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0-arduino3/bossac.exe -i -d --port=COM5 -U true -i -e -w -v C:\Users\mrm09\AppData\Local\Temp\arduino_build_897936/Test_Three.ino.bin -R 

An error occurred while uploading the sketch



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

I'm not familiar with the Nano33 IoT.

It looks like COM5 is no longer the Nano33 IoT; if there is there another port in the IDE (usually it will not be COM1 or COM2) under tools->port, try that.

Have you tried resetting the board when the display shows PORTS {COM5, } / {COM5, } => {}?

Newbie question, how would I do that?

Press and release the reset button? If that doesn't help, maybe a double tap on the reset button.

That worked, thank you.

1 Like

Great, thanks for the feedback.

There is a solution checkbox under each reply. Tick the one of the most useful reply so others will know that the problem has a solution.

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