Pages: 1 2 3 [4]   Go Down
Author Topic: Flashing a sketch from SD card using 2boot bootloader  (Read 10110 times)
0 Members and 1 Guest are viewing this topic.
London, UK
Offline Offline
Full Member
***
Karma: 4
Posts: 188
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I am very interested in this project and I would like to get involved.  In addition make it compatible with the 2560.  Can someone tell me where it currently stands what the latest builds are etc?
Logged

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

I haven't had time to write it up yet, but I can send you a zip with the code. What Chip select are you using for the SD card?
_________________________
Unique Mui Ne Resort
Logged


London, UK
Offline Offline
Full Member
***
Karma: 4
Posts: 188
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am using a 2560v running at 8Mhz so the whole board is running at 3.3v so I have no level shifter.  The SD card is connected directly to the SPI lines.

https://www.sparkfun.com/products/10744
My board is one of these with an W5200 Ethernet module attached. (Same way as the W5100)
Logged

0
Online Online
Edison Member
*
Karma: 44
Posts: 1484
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Over a year ago there was interest in a very small SD read program as the base for a boot loader.  I wrote the attached program which may be useful.

It is FAT16 only for standard (2GB or less) SD cards.

I estimate the size is about 1200 bytes.

It has two functions
Code:
bool fileOpen(uint8_t* dirName);
int fileRead();
dirName is the filename in directory format, 11 bytes with blank fill like this.
Code:
  // open TEST.BIN
  if (!fileOpen((uint8_t*)"TEST    BIN")) {
    // open failed
  }
fileRead() reads a single byte or returns -1 for error or EOF.

The programs are packaged as a library.  Try the examples.

You must be logged in to download the attached zip file.

* SdBoot20130403.zip (8.46 KB - downloaded 32 times.)
Logged

London, UK
Offline Offline
Full Member
***
Karma: 4
Posts: 188
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My goal is to place a sketch on the SD Card and run program that sketch to the chip itself or run the sketch off the chip.  travelvietnam I am using pin 53 as chip select for the SD
Logged

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

hello everyone,
i'm trying to do something similar to this by uploading a sketch from an external memory.
my goal is to rewrite the bootloader that started in this post, with osbock, and make it first compile under atmel studio (i hade to change some global variables to constants...).

finally i've succeeded compiling that bootloader under atmel studio and now i have a few  quwstions please:

1) this bootloader can't upload .hex file at all and specifically from the arduino ide, correct? if so why not?
2) if i want that bootloader to upload only sketches with the correct name (app.bin or lets say app.hex) will it check for changes? on restart and program the sketch only if it's new? if not why?
3) if i won't to do the same thing but from external flash chip, on a breadboard and make the bootloader check whether there is a "new" file on the uSD or ext. Flash, what changes are needed? any reference?

4) what are the correct numbers for this bootloader on arduino mega 2560 with sparkfun micro-sd shield (not eth') (speed, legs CS etc, memory addresses... etc)

thank you,
snir.
Logged

Malaysia
Offline Offline
Full Member
***
Karma: 3
Posts: 245
Stay calm and call batman!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hello, where is the current stand of this project?
Logged

London, UK
Offline Offline
Full Member
***
Karma: 4
Posts: 188
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think the project has somewhat stalled.  I have tried to message the original contributors with no results.  smiley-sad
Logged

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

What a pity this has stalled. Just what I was looking for smiley-sad
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 65
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What a pity this has stalled. Just what I was looking for smiley-sad
I think, it was stalled, but then i found this.
The thread owner has found a way to make it work.
http://harizanov.com/2013/01/2boots-bootloader-on-the-uiot-serial-mmc-bootloader-in-2kb/
His changes are on his own github repository...
« Last Edit: September 18, 2013, 05:43:29 am by willie1968 » Logged

und Tschoe
Willie
http://www.rcarduino.tk

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