あーさん日記

https://akkera102.sakura.ne.jp/gbadev/ の中の人

Arduboy 実験40

うーん、これはちょっとひどいかなあ。
大きなスケッチを書き込みと、ブートローダーを破壊することがわかりました。
領域保護機能はありません・・・。


Arduino IDEはサイズを見ているので大丈夫っぽいですけど、
platformio、ino、自作makefileの方は危険です。


FLASH領域は0x8000(32KB)で、IDEの書けるスケッチサイズは0x7000(28KB)。
残りの4KB(32KB - 28KB)がブートローダのようです。
0x7000・・・10進数でいうと28672バイトを超えて書き込むと壊れるようです。。


復帰はブートローダーを書き直す、の一択です。
AVR MKII ISPを使った参考例がありました。
http://community.arduboy.com/t/how-to-reset-arduboy-if-its-bricked/807/17

This is a video (could be also a picture) where I tried to flash the bootloader via the Arduino IDE.
You need to select the leonardo board and choose Tools->Burn Bootloader
(before that select the programmer you have, do not forget to switch on your Arduboy).

Use Arduino IDE 1.6.9.