Remove usb_bulk_buffer declaration, it was causing duplicate buffers to exist in RAM. Allow ldscript to determine symbol's address by making buffer "extern" only.

This commit is contained in:
Jared Boone
2014-02-14 10:48:38 -08:00
parent 4aa3a3b553
commit a51eb9dd60
2 changed files with 5 additions and 6 deletions

View File

@ -22,11 +22,5 @@
#include "usb_bulk_buffer.h"
/* Address of usb_bulk_buffer is set in ldscripts. If you change the name of this
* variable, it won't be where it needs to be in the processor's address space,
* unless you also adjust the ldscripts.
*/
uint8_t usb_bulk_buffer[32768];
const uint32_t usb_bulk_buffer_mask = 32768 - 1;
volatile uint32_t usb_bulk_buffer_offset = 0;

View File

@ -25,7 +25,12 @@
#include <stdint.h>
/* Address of usb_bulk_buffer is set in ldscripts. If you change the name of this
* variable, it won't be where it needs to be in the processor's address space,
* unless you also adjust the ldscripts.
*/
extern uint8_t usb_bulk_buffer[32768];
extern const uint32_t usb_bulk_buffer_mask;
extern volatile uint32_t usb_bulk_buffer_offset;