diff options
author | laforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-09-13 16:02:52 +0000 |
---|---|---|
committer | laforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-09-13 16:02:52 +0000 |
commit | a97e460bea62375c9c870fb3e3650fbff20c5ad1 (patch) | |
tree | 64c0de524a604015a367aa979c777325765fbfa3 /firmware/doc/dfu.txt | |
parent | 8bd3d51b23e328e91c209dbebe8cfe002b0b0042 (diff) |
Completely separate DFU from application program, we now have a real bootloader.
DFU occupies 0x00100000 - 0x00100fff in flash, application starts at 0x00101000.
DFU also occupies the first couple of bytes in SRAM, application starts at 0x00200024.
In order to produce a samba-flashable image, first build dfu.bin by typing
'make -f Makefule.dfu', succeeded by 'make TARGET=... DEBUG=... BOARD=...' and then
concatenating the two files together, e.g. cat dfu.bin main_reqa.bin > flash.bin.
Actual flashing via DFU is still not operational, but will be implemented next
git-svn-id: https://svn.openpcd.org:2342/trunk@194 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'firmware/doc/dfu.txt')
-rw-r--r-- | firmware/doc/dfu.txt | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/firmware/doc/dfu.txt b/firmware/doc/dfu.txt index 9b40c3c..78fe5a6 100644 --- a/firmware/doc/dfu.txt +++ b/firmware/doc/dfu.txt @@ -86,4 +86,46 @@ dfu_api x x flash (const anyway) dfu_state x x RAM +preconditions: + - dfu code assumes to be loaded to address zero to make it work from both ram and rom + +startup: + - exception vectors (in flash) + - call lowlevel_init + - setup user/supervisor/FIQ/IRQ stack + - relocate dfu_state + - if DFU switch is pressed + - jump to dfu_main in flash + - relocate all of DFU .text/.data into ram (including exception vectors) + - initialize DFU .bss + - remap RAM to address zero + + - if DFU switch is not pressed jump to entry address of app + - Cstartup_app.S + - relocate application .data + - initialize application .bss + - jump to appliction main + - application uses dfu_api in flash, pointing to in-flash data + - application calls dfu_switch() + - disable all interupts but USB + - relocate all of DFU .text/.data into ram (including exception vectors) + - remap RAM to address zero + - check whether app has already remapped RAM before !?! + +memory map: + +load_addr run_Addr +0x00100000 0x00000000 exception vectors (DFU Cstartup) + Cstartup_SAM7 + + 0x00200000 + + +DFU constants: +_etext: +_data: 0x200000 +_edata: + +APP contants: +_data: _edata_dfu |