Pages: [1] 2 3   Go Down
Author Topic: Load sketch code from SD Card  (Read 11870 times)
0 Members and 1 Guest are viewing this topic.
Toronto, ON
Offline Offline
Full Member
***
Karma: 10
Posts: 233
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


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
Logged


SE USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

While I may not have a direct need for this right now, that is pretty darn spiffy
Logged


Jax Florida
Offline Offline
Jr. Member
**
Karma: 0
Posts: 86
Electronics Addict
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?  smiley-wink

This will be infinitely useful.

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

Mowcius
Logged

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!  smiley-wink
Logged

Norway
Offline Offline
Sr. Member
****
Karma: 0
Posts: 344
Just dip it in mercury and power it up
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

David.
Logged

0
Offline Offline
Edison Member
*
Karma: 7
Posts: 1411
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Toronto, ON
Offline Offline
Full Member
***
Karma: 10
Posts: 233
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged


0
Offline Offline
Full Member
***
Karma: 0
Posts: 236
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley
Logged

Denver
Offline Offline
God Member
*****
Karma: 19
Posts: 778
Inactive - PM
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom."
~ Clifford Stoll

0
Offline Offline
God Member
*****
Karma: 0
Posts: 594
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Freelance engineer, consultant, contractor. Graduated from UW in 2013.

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
This for sure is a chick magnet! You should score mightily.
Maybe if you are looking really geeky chicks ;D

Mowcius
Logged

Denver
Offline Offline
God Member
*****
Karma: 19
Posts: 778
Inactive - PM
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: December 18, 2009, 03:31:38 pm by BroHogan » Logged

"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom."
~ Clifford Stoll

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: December 18, 2009, 03:32:06 pm by mowcius » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Really interested in learning more.
Logged

Pages: [1] 2 3   Go Up
Jump to: