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:
@ -22,11 +22,5 @@
|
|||||||
|
|
||||||
#include "usb_bulk_buffer.h"
|
#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;
|
const uint32_t usb_bulk_buffer_mask = 32768 - 1;
|
||||||
volatile uint32_t usb_bulk_buffer_offset = 0;
|
volatile uint32_t usb_bulk_buffer_offset = 0;
|
||||||
|
@ -25,7 +25,12 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#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 uint8_t usb_bulk_buffer[32768];
|
||||||
|
|
||||||
extern const uint32_t usb_bulk_buffer_mask;
|
extern const uint32_t usb_bulk_buffer_mask;
|
||||||
|
|
||||||
extern volatile uint32_t usb_bulk_buffer_offset;
|
extern volatile uint32_t usb_bulk_buffer_offset;
|
||||||
|
Reference in New Issue
Block a user