summaryrefslogtreecommitdiff
path: root/ports/litex
diff options
context:
space:
mode:
authorSean Cross <sean@xobs.io>2020-03-30 11:06:52 +0800
committerSean Cross <sean@xobs.io>2020-03-31 09:40:38 +0800
commit065441e58c5e56060e7cc690f284e1f12b442f1c (patch)
tree0da8de6377423bb0424e01cee4d80335d22a50a9 /ports/litex
parent1902579b465342e1adf7dcdc0c3abd5e035aa64b (diff)
ports: litex: enable itcm region for fomu
This adds a new command line flag -DFOMU to indicate we're building for a Fomu board. Signed-off-by: Sean Cross <sean@xobs.io>
Diffstat (limited to 'ports/litex')
-rw-r--r--ports/litex/Makefile2
-rw-r--r--ports/litex/boards/fomu/fomu-spi.ld42
2 files changed, 4 insertions, 40 deletions
diff --git a/ports/litex/Makefile b/ports/litex/Makefile
index 36d587412..b3a57e154 100644
--- a/ports/litex/Makefile
+++ b/ports/litex/Makefile
@@ -86,7 +86,7 @@ endif
CFLAGS += $(INC) -Werror -Wall -std=gnu11 -nostdlib $(BASE_CFLAGS) $(C_DEFS) $(CFLAGS_MOD) $(COPT)
# TODO: check this
-CFLAGS += -D__START=main
+CFLAGS += -D__START=main -DFOMU
LD_FILE := boards/$(BOARD)/$(BOARD)-spi.ld
diff --git a/ports/litex/boards/fomu/fomu-spi.ld b/ports/litex/boards/fomu/fomu-spi.ld
index b6b00becd..161ba607b 100644
--- a/ports/litex/boards/fomu/fomu-spi.ld
+++ b/ports/litex/boards/fomu/fomu-spi.ld
@@ -26,45 +26,8 @@ SECTIONS
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */
- /* These functions must be in RAM for USB to respond in time. */
- *(.text.timer0_ev_pending_write)
- *(.text.mp_parse)
- *(.text.parse_compile_execute)
- *(.text.cmp_lfn)
- *(.text.qstr_find_strn)
- *(.text.dcd_edpt_xfer)
- *(.text.pop_rule)
- *(.text.ff_wtoupper)
- *(.text.dir_find)
- *(.text.push_rule)
- *(.text.csr_writel)
- *(.text.csr_readl)
- *(.text.autoreload_tick)
- *(.text.filesystem_tick)
-
- /* These two functions are called twice as often as any other function */
- *(.text.mp_map_lookup)
- *(.text.mp_execute_bytecode) /* Note: this function is 7kb */
-
- /* These functions are hot, and placing them in ram greatly
- * improves performance
- */
- *(.text.mp_decode_uint_value)
- *(.text.tud_cdc_n_write_flush)
- *(.text.mp_load_method_maybe)
- *(.text.mp_convert_member_lookup)
- *(.text.irq_getmask)
- *(.text.irq_setmask)
- *(.text.tu_edpt_dir)
- *(.text.tu_fifo_empty)
- *(.text.irq_pending)
- *(.text.tud_task)
- *(.text.usb_background)
- *(.text._osal_q_lock)
- *(.text.osal_queue_receive)
- *(.text.mp_obj_get_type)
- *(.text.usbd_edpt_busy)
-
+ *(.itcm.*) /* Instruction Tightly Coupled Memory */
+ *(.dtcm_data.*) /* Data Tightly Coupled Memory */
*(.ramtext) /* .text* sections (code) */
*(.ramtext*) /* .text* sections (code) */
*(.data) /* .data sections */
@@ -100,6 +63,7 @@ SECTIONS
_sbss = .; /* define a global symbol at bss start; used by startup code */
*(.bss)
*(.bss*)
+ *(.dtcm_bss.*) /* Data Tightly Coupled Memory */
*(.sbss)
*(.sbss*)
*(COMMON)