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/src/os/pcd_enumerate.c | |
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/src/os/pcd_enumerate.c')
-rw-r--r-- | firmware/src/os/pcd_enumerate.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/src/os/pcd_enumerate.c b/firmware/src/os/pcd_enumerate.c index cded8c8..40bd88e 100644 --- a/firmware/src/os/pcd_enumerate.c +++ b/firmware/src/os/pcd_enumerate.c @@ -23,7 +23,7 @@ #include <os/pcd_enumerate.h> #include <os/req_ctx.h> -#include <os/dfu.h> +#include <dfu/dfu.h> #include "../openpcd.h" #include <os/dbgu.h> @@ -41,6 +41,7 @@ #ifdef CONFIG_DFU #define DFU_API_LOCATION ((const struct dfuapi *) 0x00102100) static const struct dfuapi *dfu = DFU_API_LOCATION; +#define udp_init dfu->udp_init #define udp_ep0_send_data dfu->ep0_send_data #define udp_ep0_send_zlp dfu->ep0_send_zlp #define udp_ep0_send_stall dfu->ep0_send_stall @@ -328,6 +329,7 @@ static void udp_irq(void) void udp_open(void) { DEBUGPCRF("entering"); + udp_init(); upcd.pUdp = AT91C_BASE_UDP; upcd.cur_config = 0; upcd.cur_rcv_bank = AT91C_UDP_RX_DATA_BK0; @@ -340,7 +342,6 @@ void udp_open(void) /* End-of-Bus-Reset is always enabled */ /* Set the Pull up resistor */ - AT91F_PIO_CfgOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUP); AT91F_PIO_SetOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUP); } |