altos/lpc: Don't use loader to place USB endpoint data in USB ram
authorKeith Packard <keithp@keithp.com>
Mon, 20 May 2013 03:06:03 +0000 (20:06 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 20 May 2013 03:39:18 +0000 (20:39 -0700)
Instead, just assign a fixed address in registers.ld. This avoids a
confusing section in the elf file.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/lpc/altos.ld
src/lpc/ao_usb_lpc.c
src/lpc/registers.ld

index 2778797a4a378b8f4411f995377608411659c334..4d6f35a82a32b83574fffa1730dea574d853d9c4 100644 (file)
@@ -66,10 +66,6 @@ SECTIONS {
        } >ram
        PROVIDE(end = .);
 
-       .usb : {
-               *(.usb)
-       } > usb
-
        PROVIDE(__stack__ = ORIGIN(stack) + LENGTH(stack));
 }
 
index cd8967249643c365312985816a37a4429dfd681d..8070acc36ddd1f174b285fee8bec04fd016f705f 100644 (file)
@@ -81,8 +81,7 @@ static uint8_t        ao_usb_tx_count;
 static uint8_t ao_usb_rx_buffer[AO_USB_OUT_SIZE];
 static uint8_t ao_usb_rx_count, ao_usb_rx_pos;
 
-__attribute__((section(".usb")))
-static struct lpc_usb_endpoint lpc_usb_endpoint __attribute((aligned(256)));
+extern struct lpc_usb_endpoint lpc_usb_endpoint;
 
 /* Marks when we don't need to send an IN packet.
  * This happens only when the last IN packet is not full,
index 51866e079bc004d336867841d4e5d714ef343ef2..a523c39c9afb1910f6d844b0ef3d81005e3da336 100644 (file)
@@ -1,4 +1,5 @@
 lpc_usb_sram   = 0x20004000;
+lpc_usb_endpoint = 0x20004700;
 lpc_usart      = 0x40008000;
 lpc_ct32b0     = 0x40014000;
 lpc_ct32b1     = 0x40018000;