Ways to erase flash with Serial1 conflict on Cloud?

I managed to brick a Seeeduino Cloud by programming a sketch that opens and uses Serial1. Now the Arduino USB is non-responsive (duh!), and the board immediately blocks the GPIO & keeps D13 on too. The Linux side is operating normally.



I’m looking for ideas on how to erase the bootloader or flash so that I can reprogram a correct sketch. avrdude isn’t helpful yet because of the conflict with Serial1, I presume. Do I have a chance aside from replacing a chip?





root@cloud:/tmp# /usr/bin/run-avrdude -c linuxgpio -v -patmega32u4 -e



avrdude: AVR device not responding

avrdude: initialization failed, rc=-1

Double check connections and try again, or use -F to override

this check.





avrdude done. Thank you.

Hi Mark,



do you have other good arduino boards as programmer? if yes, please followhttps://www.arduino.cc/en/Tutorial/ArduinoISP to reburn the bootloader of seeeduino cloud. i tested it successfully by using arduino uno as programmer. thanks



Seeed techsupport team

Bill

Thanks. Sorry for the delay - I missed seeing that you responded.



I tried programming the boards using a TinyUSB programmer and avrdude. I can see the red RST LED blink upon a command attempt, but I remain stuck at the initialization failed point.

Hi there, please try follow below instructions. thanks.


  1. Plug in the USBtiny to PC USB port
  2. Power the arduino yun through USB
  3. Plug the 6 pin cable from the USBtinyISP into the Arduino yun
  4. Start up Arduino IDE
  5. Select the Arduino Yun in the Tools->Board menu
  6. Do not select a COM/Serial port
  7. Select Tools->Burn Bootloader->w/USBtinyISP
  8. The USBtinyISP red LED should light up. It will take a minute or two to program the arduino yun.

    9.When it is done, the IDE will tell you it has completed and the red LED will be off.



    Bill

These instructions lead to the same result. I see a quick flash of red on the RST LED, but then the program fails.
[attachment=0]arduino.png[/attachment]

I fear that the stupid sketch that I programmed is interfering with the USB and serial, and I need a way to erase the bootloader and/or hold off the Atmel boot to allow a reprogram.
arduino.png

Hi there,



Please try to burn a bootloader to AVR processor. The Yun has a built-in ICSP programmer - the Linux processor. That makes it very easy to burn a new bootloader onto the AVR processor. Make sure your Yun and computer are connected to the same network - wired Ethernet or WiFi makes no difference. In the Arduino IDE, select the Yun’s network address on the Port menu, and then load the blink sketch. When loading over the network, the sketch is sent to the Linux side of the Yun, where it is combined with the bootloader image, and then programmed into the AVR processor using the ICSP lines.

Each time you load a sketch over the network, it burns a fresh copy of the bootloader.



Here are the detail steps.



please plug network cable into your seeedunio cloud Ethernet port and power the seeeduino cloud. Make sure your pc is in the same network as seeeduino cloud. Open the arduino ide–> tools–>select the arduino yun as baord. Then select the network port, such as 192.168.199.225. Just open the blink sketch and download the seeeduino cloud. please check if it works.



thanks

Bill

Hi again. Thanks for the continued advice.



Network programming is our “standard” programming method, and it does not work for this bricked board. The process appears to proceed normally, but the final Exec step (highlighted in red below) insta-finishes and doesn’t actually program anything.





Transferring… (0 of 75779)

Transferring… (20480 of 75779)

Transferring… (40960 of 75779)

Transferring… (61440 of 75779)

Transferring… (75779 of 75779)

Verifying transfer… (75779 of 75779)

Transfer completed successfuly (75779 bytes).



Uploading program now …

Connection closed

Connecting via ssh to run ‘avrdude’

Connected

Exec: kill-bridge

Exec: /usr/bin/run-avrdude /tmp/sketch.hex -v -patmega32u4

Connection Closed

The upload process has finished.

Hi Marks,



Sorry, I do not have any other advises. thanks.



Bill