sylvandb / gruvin9x

Automatically exported from code.google.com/p/gruvin9x
0 stars 0 forks source link

Boot loader for flashing from SD card #42

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
This email received with idea and links for implementing a boot loader than can 
re-flash the 9X from the SD card....

On 15 August 2011 08:21, finjjo <jyr...en71@gmail.com> wrote:

    I like to see SD card reader to used for FW load (like i.e. in DX9)

    My propose is following.

    When you turn 9X ON boot loader check SD card holder switch status and
    if it is pushed (SD card in place).
    Boot loader read firmware.hex (or bin) from card and flash it to MCU
    memory.

    I link few site what I think might be helpful to do that boot loader.
    http://seili.net/weblog/2010/07/14/avr2boots-dual-bootloader-released/
    http://false.ekta.is/2011/06/petitfatfs-sd-card-bootloader-for-atmega2560-arduino-mega-2560/

    I can also help develop that as soon as I get my own 9X from
    HobbyKing...

    I'm waiting to get gruvin9x custom board, I hope you sell those
    soon....

Original issue reported on code.google.com by gru...@gmail.com on 15 Aug 2011 at 2:40

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
We hope we sell these soon, too!

Original comment by gru...@gmail.com on 25 Aug 2011 at 5:55

GoogleCodeExporter commented 8 years ago
I've started this in trunk/firmware bootloader.

Jryki pointed me to this ...

http://seili.net/weblog/2010/07/14/avr2boots-dual-bootloader-released/
Dual boot USB&MMC fits to normal bootloader 2k

But it turned out that the USB part is actually just a old fashioned USART 
serial, using an external chip. We need to implement a USB stack.

This makes it very, very unlikely that we can fit USB and SD card boot loader 
functions into the 4K boot block.

Meanwhile, Jim is doing a great job on a little daughter board of a USBasp USB 
programmer, as used by the infamous SmartieParts.com pogo board.

So then, it makes sense to concentrate on MMC/SD card boot-loading for our 
onboard system.

This leaves the USB port kind of hanging in the air without a use for now. But 
I still have hopes of at least building in an HID mode USB joystick interface 
(to the main application code) with all those extra switches we've always 
wanted for flying RC flying simulators.

Original comment by gru...@gmail.com on 8 Oct 2011 at 10:13

GoogleCodeExporter commented 8 years ago

Original comment by gru...@gmail.com on 3 Apr 2012 at 7:01

GoogleCodeExporter commented 8 years ago
Not sure is this possible but I throw idea anyway.
Now MCU memory is divided to boot loader ja program memory areas.
Can that memory areas be divided to FAT driver and main program areas.
Bootloader then update only main program area. That way "big" FAT driver not 
need to fit bootloader.
Main system could also use SD card (or microSD) for log, alarm sounds and so on.

Original comment by jyrki.jo...@gmail.com on 9 Apr 2012 at 6:59

GoogleCodeExporter commented 8 years ago
Something like that might be possible. Some chips have a kind of partitioning / 
protection scheme, where more than just the special bootloader area can be 
independently 'write-protected'. If this chip can do that too, then the only 
remaining challenge is to figure out how to make the compile put the two blocks 
of code in the right places and have the function calls actually work.

That said, the FAT code for this needs only be read-only. I believe there is a 
version of fsFAT that will easily fit in the space available. The challenge 
then actually become doing something similar to the above solution for building 
a USB interface -- something for which there is no minimalistic version that 
will fit, so far as I can find.

That all said, the bootloader has gone on the back-burner for the foreseeable 
future -- unless someone else wants to have a go at it. I started it, but 
simply do not have the time to get back to it, for now.

Original comment by gru...@gmail.com on 10 Apr 2012 at 8:57