[En-Nut-Discussion] at91sam7x bloader

Ole Reinhardt ole.reinhardt at embedded-it.de
Wed Feb 6 12:00:46 CET 2008


Hi,

> I've got a dataflash connected to at91, so the method will be to upload the
> new firmware from web, store in the dataflash, reboot, and a bootloader will
> update the firmware from dataflash if it needs.

Why so complicated? You could place the code of your update function in
RAM and reflash your controller online. If you will use your normal
application for that purpose this might not be what you want. In this
case using dataflash as a buffer might be better.
 
> I have no problems with dataflash, internal flash, web side, my only problem
> is the bootloader. It will live in the 0x0 address, and Nut app will be at
> 0x4000 for example.
> In this case I need to modify the the at91sam7x_ram.ld script to place Nut
> app at address 0x4000, right?

Right. But you will need to modify at91sam7x_rom.ld as you want to store
your application in the flash, right? 

> But how I need to setup the bootloader's .ld script. and if I upload the
> internal flash from dataflash, I need to simply jump to address 0x4000, or
> what? :)

More or less, right. Depending of what you have done before you should
configure your cpu to your needs before you jump to the new address.

You need to change the rom addresses in the at91sam7x_rom.ld linker
script like this:

/* Last 16k flash is used to save config. */
MEMORY
{
  rom(rx) : org = 0x00004000, len = 224k
  ram(rw) : org = 0x00200000, len = 64k
}

In case of any questions please let me know. If you make it running,
please let me know, I'd be interested in this solution too!

Best regards,

Ole Reinhardt

-- 
 _____________________________________________________________
|                                                             |
| Embedded-IT          Hard- und Softwarelösungen             |
|                                                             |
| Ole Reinhardt        Tel. / Fax:        +49 (0)271  7420433 |
| Luisenstraße 29      Mobil:             +49 (0)177  7420433 |
| 57076 Siegen         eMail:    ole.reinhardt at embedded-it.de |
| Germany              Web:         http://www.embedded-it.de |
|                      UstID / VAT:       DE198944716         |
|_____________________________________________________________|




More information about the En-Nut-Discussion mailing list