Pages: 1 2 [3] 4   Go Down
Author Topic: Flashing a sketch from SD card using 2boot bootloader  (Read 12326 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 27
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you want to work  together on this?
I have code for doing the hex file (from my bootdrive project) but I'm wondering if it's worth the space. It's only a small simple command to convert it.

I was going to try to squeeze it down to either:
1. get it out of the 4k bootloader zone (into at least the 2k zone)
2. add back serial programming. The Optiboot code is very small and should be easy to integrate (I ported it into my bootdrive code)
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 134
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, that would be great. I have doubts about the 2K target, I'd rather focus on fixing the 2boots if we go in that direction. I guess it is something really small that is missing to get it working.

My ideal bootloader will have these features, in order of importance:

* SD card flashing (only if new file is uploaded)
* EEPROM based firmware file name
* Serial programming
* .HEX rather than .BIN
* 2K

With the EEPROM based firmware file name, the application may switch itself to a TFTP sketch that will run for 20 minutes and revert back to the original application. The TFTP will wait for incomming connection and if found will save the uploaded file to the SD card (new firmare)..
Logged

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

i also have the code for loading from eeprom EDIT: I mean: the code for reading the filename from eeprom

smiley-grin
« Last Edit: May 08, 2012, 01:01:56 pm by eudaldcp » Logged

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

Cool. Can we agree to use one github? We can all be contributors, or we could designate one master and do forks/pulls.

Martin, I like the load only if new, and would incorporate that right away. The LED thing should be under ifdef with some defines to make it board dependent.
I have an idea how to handle this in the makefile (similar to 2boots).
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 134
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I think it will be best to do it this way. As I am less experienced, I suggest you take the lead.
Logged

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

Hi guys,
I agree to make a colaborative github, also, I would like to give an other chance to the 2boots code. I sent a mail to the main developer of 2boots explaining our problems. I still waiting for an answer...

But 2boots is based in another code => https://www.mikrocontroller.net/topic/67047 and this one might work for FAT16, if works, we will have 2K extra for including all this stuf!!
Logged

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

This is great.
Martin, I added you as a collaborator to
https://github.com/osbock/avr_boot

Eudaldcp, what's your github id?

I spent a lot of time on 2boots, and actually got about 50% done rewriting it using the sdfat library code. It was really hard to debug. I'm hoping that changes when I get the Dragon I ordered (allows breakpoints.)

hold off on putbacks to the repository until I branch (to preserve the current working version.)
Logged

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

Ive just created an account. My ID in github is: eudaldcp smiley
Logged

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

OK, you are added. WE can probably take this offline to github, unless they are general ideas you feel others would be interested.
I created the v.1 branch which nobody should touch (putback to master)
Later today I'll draft some groundrules. Basically if you are confident with your change, you can put it back directly. If you want a review, it is best to fork the repository, and then do a pull request.

Also, if you have "application specific features" that aren't of general use, you should probably just put those in your own fork. You can have as many as you want.
Logged

MC
Offline Offline
God Member
*****
Karma: 14
Posts: 917
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi to everyone, interesting thread.

I've a lot of problems to let it working.
I'm using an arduino ethernet board
4gb Microsd sdhc, partitioned to only 2gb fat16 formatted.

I've dowload the code from here :https://github.com/osbock/avr_boot/downloads

I've compiled and flash fw into my board making only little modifications at the file provided then i've put a app.bin sketch file named in the root of sdcard.
Nothing happen, after reset, app.bin fw not loaded, i can see only the board led (in my board connected to pin9) always on.

Any suggestion?
Thanks in advance.
« Last Edit: August 22, 2012, 11:05:36 am by niki77 » Logged

Vi è una spiegazione scientifica a tutto.
La fede è solo quell'anello che si porta al dito dopo il matrimonio.

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

Did you set the chipselect?
It's been a while since I tried this and some folks have made some changes. I'll try to look and see if I can see anything obvious. Unfortunately I don't have an arduino ethernet to test
Logged

MC
Offline Offline
God Member
*****
Karma: 14
Posts: 917
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No i've not  set any chipselect.

For what Board that fw is ready TO go?
It's possibile that problem come from sdhc card?
Thanks again tor your time.
Logged

Vi è una spiegazione scientifica a tutto.
La fede è solo quell'anello che si porta al dito dopo il matrimonio.

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

By default it's set up for Arduino Ethernet (someone else tested it, though I emulated it with a specially wired sd holder)
I think your problem might be that it is looking for the program name in eeprom. It is supposed to default to app.bin, but I'm not sure that's tested.

You are trying to load a binary file right? this firmware doesn't read hex files.
This was a feature that someone wanted, but I think I'm going to revert back to a fixed filename. Your program could always rename another  program to app.bin .
« Last Edit: August 22, 2012, 02:56:14 pm by osbock » Logged

MC
Offline Offline
God Member
*****
Karma: 14
Posts: 917
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sure i try TO upload a bin file, not an hex .

I thought that this bootloader does not read filename from eprom but it is already made fixed to app.bin.
I need to  see  deep the code...
Logged

Vi è una spiegazione scientifica a tutto.
La fede è solo quell'anello che si porta al dito dopo il matrimonio.

MC
Offline Offline
God Member
*****
Karma: 14
Posts: 917
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Little update:

i've  let it working flashing directly this hex file for bootloader : http://baldwisdom.com/data/ArduinoEthernetSDBoot.hex

In wich is different from the code on github?

Thanks again osbock.
Logged

Vi è una spiegazione scientifica a tutto.
La fede è solo quell'anello che si porta al dito dopo il matrimonio.

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