TinyCircuits Forum

TinyCircuits Products => TinyDuino Processors & TinyShields => Topic started by: zet23t on May 05, 2015, 01:20:16 PM

Title: TinyDuino Bootloader questions
Post by: zet23t on May 05, 2015, 01:20:16 PM
I intend to modify the bootloader to support loading programs from SD cards. I don't know if this will work, but I want to attempt it in an effort to make an autonomous gaming console that can load different games without being connected via USB.

I am seeking now the source code of the current bootloader that is used in the tinyduino so I can learn what it does and how it works. Furthermore I wonder if I can brick (break) my tinyduino when burning the loader so that I can't program it anymore with my USB shield - maybe someone can tell me?
Title: Re: TinyDuino Bootloader questions
Post by: Ben Rose on May 07, 2015, 08:12:29 PM
We're using optiboot, the source is available at https://github.com/Optiboot/optiboot

To burn a bootloader, you'll need a programmer like USBasp or another Arduino programmed with the ArduinoISP example and the right connections- power, reset, SPI. Any time you do this, you're effectively below brick level.

I like your idea but don't have too much input. Fitting SD card support in in the 2K maximum bootloader size will be tough. It's an interesting project.
Title: Re: TinyDuino Bootloader questions
Post by: zet23t on May 08, 2015, 01:32:49 AM
Ah, ok so I am lacking right now the hardware to burn a bootloader as the tiny USB shield is not capable of burning the bootloader? I wasn't even aware of that... it's somewhat difficult to come by information how to approach this entire matter.

I have looked now a bit at USBasp but am blank regarding how to connect it to my TinyDuino. Does Tiny-Circuits offer some kind of hardware elements to approach this? I would be interested in getting something like that then.

Meanwhile I tried the examples for SDcard reading / writing with the sd card shield I got last week. It looks interesting but the sketch size is quite huge right now. It looks really difficult to handle the SD communication reduced to the level that it works but is just enough. My current plan is to try to get something working that loads data from SD but stays below 1k. If I can't get that working, I won't need the hardware I guess and fall back to trying out making an interpreter, though I guess that performance will be bad.
Title: Re: TinyDuino Bootloader questions
Post by: Ben Rose on May 20, 2015, 04:24:44 PM
Unfortunately we don't have a programming interface available right now- the only way is to solder/wire up a proto board with the correct connections. There's a bit of an information gap about the bootloader- http://www.arduino.cc/en/Hacking/Bootloader and http://www.arduino.cc/en/Tutorial/ArduinoISP might help you search in the right direction.