Loading a skech from an sd card

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
cepa
 
Posts: 1
Joined: Sun Nov 18, 2012 11:39 am

Loading a skech from an sd card

Post by cepa »

Here's the thing. I am wiring a sketch that loads a menu, from witch you can select a .hex file from an sd (witch contains an arduino sketch) and it loads that sketch.
It goes like this I boot up the arduino, it automatically loads the menu sketch, then I select for example the blink.hex, witch blinks the LED on pin 13. If i reset the arduino it goes back to the menu sketch.
Is this thing even possible? Is there a library or something similar for this, if not could somebody just point me in the right direction, so I could write my own.

User avatar
cjbaar
 
Posts: 73
Joined: Fri Aug 26, 2011 5:58 pm

Re: Loading a skech from an sd card

Post by cjbaar »

Funny; I was thinking of something very similar awhile back. The path I got onto was beyond my current understanding of microcontrollers. Essentially, I think you would have to replace the bootloader with code that would read from an SD card and write that to the program space. But, since that code is very low-level, and you can't use nice libraries, you would have to do direct block access to the SD card. Basically the arduino bootloader points to a location in memory where your setup() and loop() routines are. You could do the same thing, but you have to be sure you are pointing to the right location.
Then again, I could just be talking out of my....

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”