Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Boards get bricked when uploading sketch on Linux #9408

Closed
Labels
@Twilight-Logic

Description

When I try to upload a sketch a 32u4 Micro board on Linux, the board gets bricked each time and has to be recovered using an AVR programmer. Have tested with IDE version 1.8.8, 1.8.9 and 1.8.10. The problem does not seem to happen on Windows.

On Linux the board is assigned serial port /dev/ttyACM0. The problem happens with new boards with standard bootloader. I am currently using the IDE Export Compiled Binary and uploading the version with the bootlloader using an AVR programmer to get around the problem.

Status of USB and serial before the upload:

$ lsusb
Bus 002 Device 007: ID 2341:8037 Arduino SA
Bus 002 Device 006: ID 413c:2010 Dell Computer Corp. Keyboard
Bus 002 Device 004: ID 413c:1003 Dell Computer Corp. Keyboard Hub
Bus 002 Device 003: ID 046d:c03d Logitech, Inc. M-BT96a Pilot Optical Mouse
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ ls /dev/ttyA*
/dev/ttyACM0

The test sketch that I am using:

void setup() {
 // put your setup code here, to run once:
 Serial.begin(115200);
}
void loop() {
 // put your main code here, to run repeatedly:
 Serial.println("Hello :-)");
 delay(1000);
}

Output during compile and upload (excessive duplication removed):

Arduino: 1.8.9 (Linux), Board: "Arduino/Genuino Micro"
Sketch uses 3598 bytes (12%) of program storage space. Maximum is 28672 bytes.
Global variables use 161 bytes (6%) of dynamic memory, leaving 2399 bytes for local variables. Maximum is 2560 bytes.
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: write block
 ***failed; 
 .....
 ***failed; 
avrdude: Error: butterfly programmer uses avr_write_page() but does not
provide a cmd() method.
 *** page 127 (addresses 0x0000 - 0x007f) failed to write
 ***failed; 
.....
 ***failed; 
avrdude: Error: butterfly programmer uses avr_write_page() but does not
provide a cmd() method.
 *** page 127 (addresses 0x0080 - 0x00ff) failed to write
 ***failed; 
.....
 ***failed; 
avrdude: Error: butterfly programmer uses avr_write_page() but does not
provide a cmd() method.
 *** page 127 (addresses 0x0100 - 0x017f) failed to write
 ***failed; 
.....
 ***failed; 
avrdude: Error: butterfly programmer uses avr_write_page() but does not
provide a cmd() method.
 *** page 127 (addresses 0x0180 - 0x01ff) failed to write
 ***failed; 
.....
 ***failed; 
avrdude: Error: butterfly programmer uses avr_write_page() but does not
provide a cmd() method.
 *** page 127 (addresses 0x0200 - 0x027f) failed to write
 ***failed; 
.....
 ***failed; 
avrdude: Error: butterfly programmer uses avr_write_page() but does not
provide a cmd() method.
 *** page 127 (addresses 0x0280 - 0x02ff) failed to write
 ***failed; 
.....
 ***failed; 
avrdude: Error: butterfly programmer uses avr_write_page() but does not
provide a cmd() method.
 *** page 127 (addresses 0x0300 - 0x037f) failed to write
 ***failed; 
.....
 ***failed; 
avrdude: Error: butterfly programmer uses avr_write_page() but does not
provide a cmd() method.
 *** page 127 (addresses 0x0380 - 0x03ff) failed to write
 ***failed; 
.....
 ***failed; 
avrdude: Error: butterfly programmer uses avr_write_page() but does not
provide a cmd() method.
 *** page 127 (addresses 0x0400 - 0x047f) failed to write
 ***failed; 
.....
 ***failed; 
avrdude: Error: butterfly programmer uses avr_write_page() but does not
provide a cmd() method.
 *** page 127 (addresses 0x0480 - 0x04ff) failed to write
 ***failed; 
.....
 ***failed; 
avrdude: Error: butterfly programmer uses avr_write_page() but does not
provide a cmd() method.
 *** page 127 (addresses 0x0500 - 0x057f) failed to write
 ***failed; 
.....
 ***failed; 
.....
 ***failed; 
 ***failed; 
avrdude: Error: butterfly programmer uses avr_write_page() but does not
provide a cmd() method.
 *** page 13 (addresses 0x0d8e - 0x0e0d) failed to write
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: verification error, first mismatch at byte 0x002a
 0x2b != 0x75
avrdude: verification error; content mismatch
avrdude: verification error; content mismatch
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Status of USB/serial after the upload has failed:

$ lsusb
Bus 002 Device 006: ID 413c:2010 Dell Computer Corp. Keyboard
Bus 002 Device 004: ID 413c:1003 Dell Computer Corp. Keyboard Hub
Bus 002 Device 003: ID 046d:c03d Logitech, Inc. M-BT96a Pilot Optical Mouse
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ ls /dev/ttyA*
ls: cannot access '/dev/ttyA*': No such file or directory

After the board is bricked, plugging in the board does nothing and shows nothing in dmesg. Its as if it hasn't been connected. Different USB cables have been tried (all work in Windows) and the board is connected directly to the USB port and not indirectly via a USB hub. As mentioned above, the board can be recovered with an AVR programmer by using the Burn Bootloader feature in the Tools menu within the IDE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /