Error msg. when uploading sketch

Just received Nano RP2040 Connect.

Installed board and selected it. Trying simple blink sketch - compiles OK but get an error while uploading the sketch.

And the error is ???????

.....................
An error occurred while uploading the sketch

When you see that message do you also see a "Copy error message" button in the IDE ? If so, then unless that is what you have done already, click the button and paste the clipboard here in code tags

Didn't notice that! Here you are:

Arduino: 1.8.15 (Windows Store 1.8.49.0) (Windows 10), Board: "Arduino Nano RP2040 Connect"

Sketch uses 78840 bytes (0%) of program storage space. Maximum is 16777216 bytes.

Global variables use 53288 bytes (19%) of dynamic memory, leaving 217048 bytes for local variables. Maximum is 270336 bytes.

.....................
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 order to gather more information that might help us to troubleshoot your problem, I'm going to ask you to post the full output from the upload when in verbose mode.

Please do this:

  1. Select File > Preferences from the Arduino IDE's menus.
  2. Uncheck the checkbox next to Show verbose output during: [ ] compilation
  3. Check the checkbox next to Show verbose output during: [ ] upload.
  4. Click the OK button.
  5. Attempt an upload, as you did before.
  6. After the upload fails, you'll see a button on the right side of the orange bar Copy error messages. Click that button. This copies the full output to the clipboard.
  7. Open a forum reply here by clicking the Reply button.
  8. 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
  9. Press Ctrl+V. This will paste the error output from the upload into the code block.
  10. Move the cursor outside of the code tags before you add any additional text to your reply.
  11. Click the Reply button to post the output.
Arduino: 1.8.15 (Windows Store 1.8.49.0) (Windows 10), Board: "Arduino Nano RP2040 Connect"

Sketch uses 78840 bytes (0%) of program storage space. Maximum is 16777216 bytes.

Global variables use 53288 bytes (19%) of dynamic memory, leaving 217048 bytes for local variables. Maximum is 270336 bytes.

C:\Users\LF Heller\Documents\ArduinoData\packages\arduino\tools\rp2040tools\1.0.2/rp2040load -v -D C:\Users\LF Heller\AppData\Local\Temp\arduino_build_198856/Blink.ino.elf 

rp2040load 1.0.1 - compiled with go1.15.8
.....................
An error occurred while uploading the sketch



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

Found the problem! I had forgotten to set the port - COM5.

Sketch uploads now and flashes the LED.

Thanks for your help.

1 Like

I'm having the same problem here with my RP2040 connect, just got it.

However, I do have the correct port selected. When I press get board info, all the information on the board is there, except I cannot send a sketch to the board.

What happens is this. The board is doing its factory blinking upon connecting to my Windows computer, then I use an example sketch, and then i press upload, it compiles and then when it gets time to upload to the board, it "ejects" itself from the windows (the usb sound disconnect occurs) and then reconnects as a "drive" (a window comes up and I see two files on the board) and the IDE says there is an error happening. At this time only the green light is on the board is on. After resetting the board by pressing the button, it goes back to the factory blinking program.

Why does it eject the usb when it start writing?

Error Message:

Arduino: 1.8.14 (Windows 10), Board: "Arduino Nano RP2040 Connect"

Sketch uses 80948 bytes (0%) of program storage space. Maximum is 16777216 bytes.

Global variables use 54360 bytes (20%) of dynamic memory, leaving 215976 bytes for local variables. Maximum is 270336 bytes.

Forcing reset using 1200bps open/close on port COM5

C:\Users\a\AppData\Local\Arduino15\packages\arduino\tools\rp2040tools\1.0.2/rp2040load -v -D C:\Users\a\AppData\Local\Temp\arduino_build_40111/FirmwareUpdater.ino.elf

rp2040load 1.0.1 - compiled with go1.15.8
.....................
An error occurred while uploading the sketch

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

That is normal. The device has two modes (one for normal run and one for programming). You can switch between the modes manually (One click for normal, double click mode for programming). Try double click on your board. You should now see a mast storage device in your PC and there are two files in it. Please confirm that you see the drive. Try uploading again while your Arduino is in that mode.

1 Like

thanks for your reply. Turns out, the Windows computer I had installed the IDE, has some built-in nannies that prevent certain installs without the correct permissions, even though I ran the post_install.bat file, I was still having trouble. I installed it on a different Windows compute which had me as admin, and it is now working fine. It also works well for the IDE online. Problem solved, make sure you are admin when installing IDE and other libraries etc.

2 Likes

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