How to Reset Arduboy if it's Bricked


(Michael Gollnick) #21

I hope to finish it soon. Actually your character can throw things on the people passing by. They in turn want to break the door into the house. If they succeed you loose… kind of makes me feel like a kid.
The code is a mess and I constantly have new ideas. So I want to finish it soon. The graphics take me ages… I am not very skilled in that. Its my first game ever. My goal was this weekend… fingers crossed.


(Michael Gollnick) #22

@Botisaurus Sorry to hear that. You can also use another Arduino to program it. Maybe you have a fablab in your home town? Usually there are people that are familiar with that.


(Michael Gollnick) #23

Did anybody try to upload a game using Arduino IDE 1.6.9? I have the feeling that with big sketches the upload fails even when pressing the reset button (or holding the UP key while switching on).

BTW: When I use the latest platformio (2.10.1) there is no such issue.


(Kevin) #24

Arduino did make a change to how the reset and reprogramming works on 32u4 boards in the latest revision but it shouldnt effect us. But it seems like it is.

@veritazz did you have a specific sketch that was causing a problem on 1.6.9?


(Michael Gollnick) #25

I did a few tests. Actually I have two Arduboys. The yellow one in the pictures above has a new bootloader that I needed to flash. The other one was vanilla with a TeamARG game installed.
The state is the following:

The yellow one refused to be flashed. What I need to do to flash it is holding the UP button then switch on the Ardoboy, then flash (either platformio and recently also the Arduino IDE works)

The red one worked once with the Arduino IDE. After I have flashed my sketch, the behavior is the same as on the yellow
one.

Conclusion is that the bootloader version has no impact.

The sketch that I am using is the game Fatsche. I just pushed some changes to be able to use it easily in the IDE.

http://community.arduboy.com/t/fatsche-defend-the-door/1714

The reason why I can flash it now with the Arduino IDE is that I reduced the RAM usage. Seems like anything near 2kb is critical for the normal flash process.
Maybe we should note that it is essential to keep the Hold the UP button feature in the Arduboy library. Only this option allows me to flash again.
If the option is not included that I needed to have the right timing of pressing the reset button + calling avr-dude manually to flash the image. Or use the following sequence:

I think I’ve done almost every version of bringing images to the arduboy. :joy:


(Scott) #26

F.Y.I. The “Hold the UP button” feature is officially known as the “flashlight” feature. It turns all three of the RGB LEDs on full, so the LED lights up bright white.

It’s intended to provide a bright light for use in the dark, but it also stops the main part of the sketch from executing. This prevents sketches which use a large amount of RAM from corrupting the RAM location that causes problems with uploading new sketches.

Unfortunately, for the 8000 or so Arduboys that have their RGB LED installed incorrectly, the LED will remain unlit while in flashlight mode.

EDIT:
You can exit flashlight mode by pressing the DOWN button, to continue running the sketch. Sorry, not yet. In the next library release. Currently you have to power off to exit the flashliight.

I don’t think there are any plans to remove the flashlight feature.


Fatsche: defend the door!
Arduventure (RPG)
(Michael Gollnick) #27

Recently some people also try to flash a bootloader after things went wrong. I just thought about it to have a nice adaptor to be able to nicely connect an ISP or an Arduino (used as ISP) to the 6 pins on the back of the Arduboy PCB.

Having this adaptor would enable people to recover from such issues. All things can be done be the Arduino IDE then.

Maybe somebody with enough 3D printer knowledge can craft one an publish how to create them so people can reproduce it. If we find a good design it could be sold in the Arduboy store.

@bateske What do you think?


(Boti Kis) #28

Oh that would be amazing.


(Ross) #29

A “Community Market” would be a nice idea. I’m sure if say, sweatpants or shirts were ever made by someone the store could sell them, and other such items like 3d printed products from the community.

We do also have a #classifieds section, and I believe our current Terms of Service would cover us pretty well if users wanted to try and sell items to each other, within some reason of course. I rarely see forum classifieds working with any great effect, but I did see a group buy offer posted the other day :slight_smile:

http://community.arduboy.com/t/big-overhead-shipping-cost-15-anyone-for-a-group-buy-in-france/1751

It would be fun to try and source a few hours on a few dozen 3d printers if the design is solid, and just do a round of orders that way.


#30

This is my report.
If you know wrong, please tell me.

@ekem
very sry. my english is super wrong. pls rewrite my document.

Problem

  1. My Arduboy can’t Sketch!
  2. My Arduboy can’t detect COM port!(tool -> Serial Port)

Why?

Problem There are multiple.
Here, I talk about the process of up to play the game.

  1. Turn ON Arduboy.
  2. run Bootloader.
  3. run Arduboy Library.
  4. run Sketch.

How to recovery.

case number 4.

Game or your original sketch break.
Possibility is CPU of Program Counter, Memory leak, Pointer Problem.

Please use flashlight mode.
Library prevents the sketch of the intrusion.
https://github.com/Arduboy/Arduboy/blob/stable/src/Arduboy.cpp#L54

  1. Keep push UP Button.
  2. Turn ON Arduboy.
  3. Write Sketich form Arduino IDE.
  4. Recovery!

case number 2.

Serious sickness.

Possibility is Big Sketich, Big Global and Local Variable.
Max Variable is 2,560 bytes. but probably 2000 over break Arduboy.
I don’t have answer. It might conflict sections.
http://www.nongnu.org/avr-libc/user-manual/mem_sections.html

Arduino IDE can’t write Big Sketich.
Probably you use platformio or original makefile.

Max is 28672 bytes. if 28672 bytes over write, Arduboy will break.

reset switch video here.

but reset timing is very short. 500ms - 1sec?
I found 100% timing.

  1. keeping reset switch
  2. turn on.
  3. write sketich(Library of Hello World) from Arduino IDE. and keeping reset siwtch!

log(in japanese).

最大28,672バイトのフラッシュメモリのうち、スケッチが10,522バイト(36%)を使っています。
最大2,560バイトのRAMのうち、グローバル変数が1,253バイト(48%)を使っていて、ローカル変数で1,307バイト使うことができます。
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
指定されたポートには、ボードが接続されていません。正しいポートを選んである事を確認してください。もしも正しいポートを選んである場合には、書き込みを開始した直後にボードのリセットボタンを押してみてください。

Did you have the same result?
In the case of the same result, it has worked a reset switch.

Next step. You don’t keep reset switch when you find log of “PORTS”.
Your Arduboy can write Sketich.

but if you see log, bootloader break!
log(in japanese).

PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {COM3, } => {COM3, }
Found upload port: COM3
E:\program\Arduino\hardware\tools\avr/bin/avrdude -CE:\program\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega32u4 -cavr109 -PCOM3 -b57600 -D -Uflash:w:C:\Users\fletcher\AppData\Local\Temp\build622a37fead4ee654a1b9a5613f737b3a.tmp/HelloWorld.ino.hex:i 

avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58
     Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
     Copyright (c) 2007-2009 Joerg Wunsch

     System wide configuration file is "E:\program\Arduino\hardware\tools\avr/etc/avrdude.conf"

     Using Port                    : COM3
     Using Programmer              : avr109
     Overriding Baud Rate          : 57600
     AVR Part                      : ATmega32U4
     Chip Erase delay              : 9000 us
     PAGEL                         : PD7
     BS2                           : PA0
     RESET disposition             : dedicated
     RETRY pulse                   : SCK
     serial program mode           : yes
     parallel program mode         : yes
     Timeout                       : 200
     StabDelay                     : 100
     CmdexeDelay                   : 25
     SyncLoops                     : 32
     ByteDelay                     : 0
     PollIndex                     : 3
     PollValue                     : 0x53
     Memory Detail                 :

                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       eeprom        65    20     4    0 no       1024    4      0  9000  9000 0x00 0x00
       flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
       lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
       hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
       efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
       lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
       calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
       signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

     Programmer Type : butterfly
     Description     : Atmel AppNote AVR109 Boot Loader

Connecting to programmer: .avrdude: butterfly_recv(): programmer is not responding
マイコンボードに書き込もうとしましたが、エラーが発生しました。
このページを参考にしてください。
http://www.arduino.cc/en/Guide/Troubleshooting#upload

Arduboy does not heal by itself.

You need Arudino Board or AVR ISP mkII.

Arduino UNO - devkit

pin13 - CLK
pin12 - MISO
pin11 - MOSI
pin10 - RESET
GND   - GND
3.3V  - VCC

i dont have kickStarter Arduboy. sry. picture is My devkit.
devkit pins is VCC, RST, MISO, MOSI, CLK, GND.
pls set cable.

next. Arduino IDE write Arduino UNO.

[file]→[sketch example]→[11.ArduinoISP]→[ArduinoISP]

you change target. Arduboy Setting here.

[tool]->[board]->[Arduino Leonardo]
[tool]->[Burn board]->[Arduino as ISP]
[tool]->[Burn bootloader]

Burn time is 1,2 min. You will feel long time :slight_smile:
last. it write Hello World of Arduboy Libary.
All is complete.


(Ross) #31

@akkera102, glancing through the guide, it seems everything is straight forward. I will break out my dev kit and step through this process, and do any clarification needed. I’ll post any edits here, and then we can make the new topic for a guide from the source here. Thanks a ton!!! This is amazing work, thank you. どうもありがとうございました!


#32
devkit (land side) --- arduino uno (cable pin side)

If the connection is loose, it will result in an error.
it need strong physical power. i used both hands.


(Kevin) #33

If you do manage to brick your Arduboy and can’t fix it yourself please let us know via our contact form or direct message and we will do our best to help you out! Amazing to see the hacker spirit in people trying to bring it back to life!


#34

Hello,

My Arduboy no longer recognize the COM port.
I reset it, but a problem is not solved.

There is a need to write the bootloader.
Should I write in it using these 6 points?


[トラブル]スケッチ転送開始直後にシリアルポートが消える
(Scott) #35

Yes.

I haven’t seen the power supply part of the Arduboy schematic, because @bateske still hasn’t published it, but I suspect that you should leave the Arduboy powered off when attaching the programmer, and have the programmer supply power to VCC. To avoid damaging the display, you should probably use a 3.3V programmer.


[トラブル]スケッチ転送開始直後にシリアルポートが消える
(Michael Gollnick) #36

If you have the original 6pin AVRISPMKII from Atmel like the one that I used then you need to power your Arduboy to flash it. The VCC pin of this programmer is only an input to sense the VCC of the target.
As I said, just for the original AVRISPMKII. There are clones out there that supply the VCC with either 5V or 3.3V.


(Scott) #37

That’s fine, as long as the programmer senses that the Arduboy’s VCC is somewhere between 3.2V and 4.2V (because it comes directly from the battery) and adjusts its output signals to match. I suspect this is true for the AVRISPMKII. It may not be the case with other programmers.


[トラブル]スケッチ転送開始直後にシリアルポートが消える
(Bernard Duchaine) #39

I try with 1.6.9. Holding UP key while resetting permits me to upload the sketch. It is working perfectly .


(Tomi) #40

I think the case is often that the programmer output has a buffer (level shifter) that uses the device VCC for the output. At least that is how the USBtinyISP that I have works. It is possible to power the device from USB though, but that’s selected by a jumper.


(Scott) #41

The popular, cheap USBASP programmers don’t. Some of them have a jumper for 5V or 3.3V operation but they don’t do it properly. The jumper just changes the VCC supply output to 3.3V but the output signals remain at 5V :scream:

I have a USBASP V2.0 clone which I modified to properly work at 3.3V (as well as 5V).