summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-05-19 20:06:03 -0700
committerKeith Packard <keithp@keithp.com>2013-05-19 20:39:18 -0700
commit6343bd774f542a4f915cf1fca2053d03e93bf2c3 (patch)
tree88edff26b8a0e1611ef160ab61b86491f7d0bdfc /src
parent35a05041d3ca3e69a146bd3bf8038c0f1cbc1b42 (diff)
altos/lpc: Don't use loader to place USB endpoint data in USB ram
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>
Diffstat (limited to 'src')
-rw-r--r--src/lpc/altos.ld4
-rw-r--r--src/lpc/ao_usb_lpc.c3
-rw-r--r--src/lpc/registers.ld1
3 files changed, 2 insertions, 6 deletions
diff --git a/src/lpc/altos.ld b/src/lpc/altos.ld
index 2778797a..4d6f35a8 100644
--- a/src/lpc/altos.ld
+++ b/src/lpc/altos.ld
@@ -66,10 +66,6 @@ SECTIONS {
} >ram
PROVIDE(end = .);
- .usb : {
- *(.usb)
- } > usb
-
PROVIDE(__stack__ = ORIGIN(stack) + LENGTH(stack));
}
diff --git a/src/lpc/ao_usb_lpc.c b/src/lpc/ao_usb_lpc.c
index cd896724..8070acc3 100644
--- a/src/lpc/ao_usb_lpc.c
+++ b/src/lpc/ao_usb_lpc.c
@@ -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,
diff --git a/src/lpc/registers.ld b/src/lpc/registers.ld
index 51866e07..a523c39c 100644
--- a/src/lpc/registers.ld
+++ b/src/lpc/registers.ld
@@ -1,4 +1,5 @@
lpc_usb_sram = 0x20004000;
+lpc_usb_endpoint = 0x20004700;
lpc_usart = 0x40008000;
lpc_ct32b0 = 0x40014000;
lpc_ct32b1 = 0x40018000;