Go Down

Topic: Load sketch code from SD Card (Read 17468 times) previous topic - next topic

bhagman


If anyone is interested, I've written a bootloader which, besides interfacing normally with the IDE, also loads code from an SD Card.  So now you can update code without being connected to the IDE.

It checks a pin on reset, and if it's low, then the bootloader pulls a hex file from the SD card and programs the flash.

b

Osgeld

While I may not have a direct need for this right now, that is pretty darn spiffy
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL

Tw34kd

Interesting! cant wait to see some useful ideas on what can be done with this.

What was your initial inspiration for a reason to come up with this?

mowcius

Whoa!

I wanted to do this some time ago but I don't honestly have enough programming knowledge to do it.

Please can you provide more sauce?  ;)

This will be infinitely useful.

How are you writing the hex file to the SD card?

Mowcius

mowcius

I can see my dream of programming an arduino from an arduino working soon...

Just need to get a hex compiler working in another sketch now...

Could another arduino read from the sd card and send it via serial to the other arduino?  :-/

Then it'd work!  ;)

ArduinoM

The von Neuman machines are comming!!!
RUN FOR YOUR LIVES  :o

They are MULTIPLYING !!  
Now where did I put my nanobot-powder  ::)

David.

florinc

I am interested too.
How much flash memory is left for the actual application (sketch)?
Can you choose what to load or it loads a default hex file?
Thanks.

bhagman

The bootloader takes up less than 4K total.  This means that you'll have 28K at your disposal (on the '328).  I'm actually using the bootloader on one of our AVR boards - with an ATmega644P - which means I have 60K left for goodies.

Right now, you can only load a hex file named "sketch.hex".  The file is in native hex format which is parsed inside the bootloader - so no fiddly changes - just copy onto the card and go.

Tw34kd:  I needed to load code on a remote installation (maybe that's obvious).  Specifically, they are for POP (point of purchase) units that play music and capture metrics.

I'll put together a page with the bootloader and other info in the next couple of days.


b

Pumbaa

Yiehha, i am really interested.
Sounds damn cool. I read about all the questions and halftries in this Forum, and gave up hope that somebody enough skilled programmer has the need for this :)

bHogan

Waiting excitedly for this! Wanted this ability for a long time.

I guess I'll have to get over my fear of burning the 644P bootloader with a parallel programmer.

Can the hex file live on the card with other files?
(Guess I can wait till Christmas to find out.)

Thanks again for your great work. This for sure is a chick magnet! You should score mightily.
"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom."
~ Clifford Stoll

frank26080115

I think we are all interested in seeing your work
Are you using any of the popular FAT libraries?
Does it handle verification? How does it handle verification (page by page or all at once at the end)? What does it do when there is a mismatch?
Freelance engineer, consultant, contractor. Graduated from UW in 2013.

mowcius

Quote
This for sure is a chick magnet! You should score mightily.

Maybe if you are looking really geeky chicks ;D

Mowcius

bHogan

#12
Dec 18, 2009, 09:28 pm Last Edit: Dec 18, 2009, 09:31 pm by BroHogan Reason: 1
Quote
Maybe if you are looking really geeky chicks

Right! And I can certainly appreciate your firm grasp on the obvious. The comment was made with regard to bhagman's tag line.
"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom."
~ Clifford Stoll

mowcius

#13
Dec 18, 2009, 09:31 pm Last Edit: Dec 18, 2009, 09:32 pm by mowcius Reason: 1
Quote
Right! And I can certainly appreciate your firm grasp on the obvious.

Life is obvious, i have a firm grasp on life, oh wait, maybe not  ;D

Mowcius

rbrockman

ping....    for any more information regarding this boot loader.

Really interested in learning more.

Go Up