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>
This commit is contained in:
Sean Cross 2020-03-30 11:06:52 +08:00
parent 1902579b46
commit 065441e58c
2 changed files with 4 additions and 40 deletions

View File

@ -86,7 +86,7 @@ endif
CFLAGS += $(INC) -Werror -Wall -std=gnu11 -nostdlib $(BASE_CFLAGS) $(C_DEFS) $(CFLAGS_MOD) $(COPT) CFLAGS += $(INC) -Werror -Wall -std=gnu11 -nostdlib $(BASE_CFLAGS) $(C_DEFS) $(CFLAGS_MOD) $(COPT)
# TODO: check this # TODO: check this
CFLAGS += -D__START=main CFLAGS += -D__START=main -DFOMU
LD_FILE := boards/$(BOARD)/$(BOARD)-spi.ld LD_FILE := boards/$(BOARD)/$(BOARD)-spi.ld

View File

@ -26,45 +26,8 @@ SECTIONS
. = ALIGN(4); . = ALIGN(4);
_sdata = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */ _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. */ *(.itcm.*) /* Instruction Tightly Coupled Memory */
*(.text.timer0_ev_pending_write) *(.dtcm_data.*) /* Data Tightly Coupled Memory */
*(.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)
*(.ramtext) /* .text* sections (code) */ *(.ramtext) /* .text* sections (code) */
*(.ramtext*) /* .text* sections (code) */ *(.ramtext*) /* .text* sections (code) */
*(.data) /* .data sections */ *(.data) /* .data sections */
@ -100,6 +63,7 @@ SECTIONS
_sbss = .; /* define a global symbol at bss start; used by startup code */ _sbss = .; /* define a global symbol at bss start; used by startup code */
*(.bss) *(.bss)
*(.bss*) *(.bss*)
*(.dtcm_bss.*) /* Data Tightly Coupled Memory */
*(.sbss) *(.sbss)
*(.sbss*) *(.sbss*)
*(COMMON) *(COMMON)