Can’t upload code on MKRZero

Hello
Following old posts
I tried the "quickly double tap the reset button" that will put it into bootloader mode on another COM port and allow me to upload as normal

Sketch uses 39216 bytes (14%) of program storage space. Maximum is 262144 bytes.
Global variables use 3884 bytes (11%) of dynamic memory, leaving 28884 bytes for local variables. Maximum is 32768 bytes.
Atmel SMART device 0x10010005 found
Device       : ATSAMD21G18A
Chip ID      : 10010005
Version      : v2.0 [Arduino:XYZ] Dec 20 2016 15:36:46
Address      : 8192
Pages        : 3968
Page Size    : 64 bytes
Total Size   : 248KB
Planes       : 1
Lock Regions : 16
Locked       : none
Security     : false
Boot Flash   : true
BOD          : true
BOR          : true
Arduino      : FAST_CHIP_ERASE
Arduino      : FAST_MULTI_PAGE_WRITE
Arduino      : CAN_CHECKSUM_MEMORY_BUFFER
Erase flash
done in 0.870 seconds

Write 39216 bytes to flash (613 pages)
[==============================] 100% (613/613 pages)
done in 0.304 seconds

Verify 39216 bytes of flash with checksum.
Verify successful
done in 0.035 seconds
CPU reset.

Hi @stefa24. Please provide a detailed description of the problem.

The output you shared appears to be from a successful upload.

Hi

The output you shared appears to be from a successful upload.

I shared for information about my ZERO
The problem I met I wasn t able to make any upload after some updates, below the message after several minutes later I lunched upload command

Arduino: 1.8.19 (Windows 10), Board: "Arduino MKRZERO"

Sketch uses 39216 bytes (14%) of program storage space. Maximum is 262144 bytes.

Global variables use 3884 bytes (11%) of dynamic memory, leaving 28884 bytes for local variables. Maximum is 32768 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.

Hi @stefa24

Have you attempted double tapping the reset button, selecting the bootloader's COM port and uploading the code oncemore?

The issue with boards that use their native USB for uploading code, is that they require the current program (sketch) to be functioning, in order to allow the next to be uploaded. If the current program crashes for whatever reason, it prevents the auto-upload from working correctly. When this happens, it's necessary to manually activate bootloader mode by double tapping the reset button.

This is in contrast to boards such as the Arduino Uno/Nano/Mega that use a co-processor or FTDI USB-to-Serial chip. This device acts as an intermediary and keeps the COM port connection alive no matter what the current state of the main microcontroller.

Yes I did

thanks for the explanation

Hi @stefa24

Have you tried disconnecting the board from any external circuitry and uploading a simple "blink" sketch?

Does double tapping the reset button actually place the board into bootloader mode and does the new COM port appear in the Arduino IDE?

didn t worked

yes it does

Hi @stefa24

Ok, have you selected the bootloader COM port in the Arduino IDE?

On the menu bar select Tools->Port, then select the new COM port for your board.

If you check a second time, the COM port should be ticked.

Then try uploading a basic sketch with visual feedback, such as "blink" oncemore.

ok I did, now I can upload the sketch

@stefa24 Is the LED on your board blinking?

@stefa24 Once you've uploaded the code with the board in bootloader mode, it will run the sketch and return to normal operation. Auto-upload will start working again, (although you might have to select the new COM port in the IDE, as you just did for the bootloader).

I did
Now the board is working again
thanks

@stefa24 Glad to hear your board's up and running again :smiley:.

thanks to you all
:grinning:

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