File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -463,6 +463,13 @@ CFLAGS += -DCIRCUITPY_WATCHDOG=$(CIRCUITPY_WATCHDOG)
463
463
CIRCUITPY_WIFI ?= 0
464
464
CFLAGS += -DCIRCUITPY_WIFI=$(CIRCUITPY_WIFI )
465
465
466
+ # tinyusb port tailored configuration
467
+ CIRCUITPY_TUSB_MEM_ALIGN ?= 4
468
+ CFLAGS += -DCIRCUITPY_TUSB_MEM_ALIGN=$(CIRCUITPY_TUSB_MEM_ALIGN )
469
+
470
+ CIRCUITPY_TUSB_ATTR_USBRAM ?= ".bss.usbram"
471
+ CFLAGS += -DCIRCUITPY_TUSB_ATTR_USBRAM=$(CIRCUITPY_TUSB_ATTR_USBRAM )
472
+
466
473
# Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk
467
474
# $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers.
468
475
# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h.
Original file line number Diff line number Diff line change @@ -96,8 +96,18 @@ extern "C" {
96
96
// --------------------------------------------------------------------+
97
97
// USB RAM PLACEMENT
98
98
// --------------------------------------------------------------------+
99
- #define CFG_TUSB_ATTR_USBRAM
100
- #define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
99
+ #if !defined(CIRCUITPY_TUSB_ATTR_USBRAM )
100
+ #define CIRCUITPY_TUSB_ATTR_USBRAM ".bss.usbram"
101
+ #endif
102
+
103
+ #define CFG_TUSB_ATTR_USBRAM __attribute__((section(CIRCUITPY_TUSB_ATTR_USBRAM)))
104
+
105
+
106
+ #if !defined(CIRCUITPY_TUSB_MEM_ALIGN )
107
+ #define CIRCUITPY_TUSB_MEM_ALIGN 4
108
+ #endif
109
+
110
+ #define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(CIRCUITPY_TUSB_MEM_ALIGN)))
101
111
102
112
103
113
#ifdef __cplusplus
You can’t perform that action at this time.
0 commit comments