diff options
Diffstat (limited to 'source/application/hal/platforms/bare-metal')
-rw-r--r-- | source/application/hal/platforms/bare-metal/bsp/mem_layout/mps3-sse-300.ld | 4 | ||||
-rw-r--r-- | source/application/hal/platforms/bare-metal/bsp/mem_layout/simple_platform.ld | 28 |
2 files changed, 25 insertions, 7 deletions
diff --git a/source/application/hal/platforms/bare-metal/bsp/mem_layout/mps3-sse-300.ld b/source/application/hal/platforms/bare-metal/bsp/mem_layout/mps3-sse-300.ld index 46fc2e5..ceaff7d 100644 --- a/source/application/hal/platforms/bare-metal/bsp/mem_layout/mps3-sse-300.ld +++ b/source/application/hal/platforms/bare-metal/bsp/mem_layout/mps3-sse-300.ld @@ -72,7 +72,7 @@ SECTIONS * instead placed on BRAM. See comment in the * BRAM section for details. **/ - *(EXCLUDE_FILE(*all_ops_resolver.o) .text*) + *(EXCLUDE_FILE(*all_ops_resolver.o *hal.c.obj) .text*) KEEP(*(.init)) KEEP(*(.fini)) @@ -221,6 +221,8 @@ SECTIONS **/ *all_ops_resolver.o (*.text*) . = ALIGN(4); + *hal.c.obj (*.text*) + . = ALIGN(4); __data_end__ = .; } > BRAM diff --git a/source/application/hal/platforms/bare-metal/bsp/mem_layout/simple_platform.ld b/source/application/hal/platforms/bare-metal/bsp/mem_layout/simple_platform.ld index 8bb99cd..ceaff7d 100644 --- a/source/application/hal/platforms/bare-metal/bsp/mem_layout/simple_platform.ld +++ b/source/application/hal/platforms/bare-metal/bsp/mem_layout/simple_platform.ld @@ -65,7 +65,14 @@ SECTIONS .text.at_itcm : { KEEP(*(.vectors)) - *(.text*) + + /** + * All code goes here, with one exception of + * all_ops_resolver object file. This code + * instead placed on BRAM. See comment in the + * BRAM section for details. + **/ + *(EXCLUDE_FILE(*all_ops_resolver.o *hal.c.obj) .text*) KEEP(*(.init)) KEEP(*(.fini)) @@ -87,11 +94,6 @@ SECTIONS KEEP(*(.eh_frame*)) } > ITCM - .ARM.extab.at_itcm : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > ITCM - __exidx_start = .; .ARM.exidx.at_itcm : { @@ -208,6 +210,20 @@ SECTIONS KEEP(*(.jcr*)) . = ALIGN(4); + *(.ARM.extab* .gnu.linkonce.armextab.*) + . = ALIGN(4); + + /** + * Place the all ops resolver code data here. This accounts + * for ~4k worth of saving on the ITCM load region. It is + * only designed to be included (by default) for the inference + * runner use case. + **/ + *all_ops_resolver.o (*.text*) + . = ALIGN(4); + *hal.c.obj (*.text*) + . = ALIGN(4); + __data_end__ = .; } > BRAM |