I found this bootloader a while back which allows you to load programs off an SD card:http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=72303
I have modified the code to use USART0 instead of SPI, and to flash the bootloader if the version number doesn't match the current version, rather than only if it is greater, and now I need to compile it.
I was hoping that I could do this from within the Arduino IDE, but it doesn't seem like that is possible. Do I need to install AvrStudio to do this? Or can I just use a make file of some kind? I don't know anything about using makefiles. And the tutorial is confusing, referencing a lot of stuff without explanation of what it is or where it is found. For example:
The programmer must put the bootloader into the bootloader section. This is quite easy and just requires reassinging .text (default 0x0000) to the bootloader start address.
I have no idea what ".text" is. Is it a file? It is a variable somewhere? Is it something from a make file? Is it a setting in AvrStudio? No clue.
Lastly, in Project-->Configuration Options-->Memory Settings, click Add, and configure
Memory type: flash
This can be done with a the linker command -tText, too, although I forget the exact syntax.
Part of my confusion is that it says "lastly" there as if this is another step in addition to setting .text somewhere. But perhaps it is just something set in AvrStudio. But it seems to be something I might simply be able to do from the command line when burning the bootloader?
Why is this variable called .text anyway? If it's the bootloader start addres why isn't it .address or something?
Also, in regards to the bootloader code itself, how does it find the program on the SD card? I don't see any mention of a specific filename. The code seems to be engineered to look for files, and scan every single one it comes across for a particular size and version number and then additional information. Is that right? I guess if it skips files that aren't a specific size it won't be too slow scanning with lots of other files on there, but it seems like it could potentially mistake a wav file for the program. I guess the chances of that are incredibly slim, but I'd kinda feel better if it looked for a bin extension.