Pages: [1]   Go Down
Author Topic: Can this be achieved (Loading a skech from an sd card)  (Read 990 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

All right guys, I am working on a project that requires me to load a sketch (.hex file) from an sd card. Is this possible?

The way I am thinking of doing is to write some sort of loader on to the atmega chip, the loader would have the ability to load sketches from the SD, if I reset the arduino, the loader would start up by default. Can this be achieved?
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 179
Posts: 8070
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The bootloader section of memory can write into the application section of memory so it is theoretically possible.  Currently the bootloader doesn't provide a function that you can call from a sketch to write into the application space.  You would probably have to start with that.

Another option is to have an Arduino with an SD card act as an ICSP device (like the ArduinoISP sketch) and program a separate Arduino through the ICSP header. I'm pretty sure that has already been done.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 508
Posts: 31436
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The other option is to run bitlash from the SD card. It is an interpretive language.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Another option is to have an Arduino with an SD card act as an ICSP device (like the ArduinoISP sketch) and program a separate Arduino through the ICSP header. I'm pretty sure that has already been done.

so by that you mean that I would need two Arduinos connected. The first one boots up, flashes the second one, then the second one boots up and does everything I need.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 508
Posts: 31436
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

No just the one arduino with a modified boot loader.
« Last Edit: November 05, 2012, 04:45:36 pm by Grumpy_Mike » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Could you provide some examples of this or at least point into a general direction?
Logged

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

something like this maybe:
http://baldwisdom.com/category/hacking/arduino/bootdrive/
Logged

Pages: [1]   Go Up
Jump to: