From a97e460bea62375c9c870fb3e3650fbff20c5ad1 Mon Sep 17 00:00:00 2001 From: laforge Date: Wed, 13 Sep 2006 16:02:52 +0000 Subject: 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 --- firmware/src/os/pcd_enumerate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'firmware/src/os/pcd_enumerate.c') 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 #include -#include +#include #include "../openpcd.h" #include @@ -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); } -- cgit v1.2.3