soc: it8xxx2: linker: Move zephyr library to RAM to enhance performance
Place zephyr library in ILM. This can improve performance. test: Print the message 10000 times with 1ms sleep interval to compare the time difference before and after adding RAM code on the it82002bw evb. RAM code size save time original: 1954 bytes libzephyr.a: +16974 bytes -608ms Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
This commit is contained in:
parent
2ab908bcf2
commit
6a4a164b54
2 changed files with 18 additions and 0 deletions
|
@ -204,6 +204,13 @@ config SOC_IT8XXX2_KERNEL_IN_RAM
|
||||||
help
|
help
|
||||||
Place kernel handling code in ILM. This can significantly improve performance.
|
Place kernel handling code in ILM. This can significantly improve performance.
|
||||||
|
|
||||||
|
config SOC_IT8XXX2_ZEPHYR_IN_RAM
|
||||||
|
bool "Place zephyr handling code in RAM"
|
||||||
|
select SOC_IT8XXX2_USE_ILM
|
||||||
|
select SOC_IT8XXX2_LIBRARY_TO_RAM
|
||||||
|
help
|
||||||
|
Place zephyr handling code in ILM. This can significantly improve performance.
|
||||||
|
|
||||||
config SOC_IT8XXX2_SHA256_HW_ACCELERATE
|
config SOC_IT8XXX2_SHA256_HW_ACCELERATE
|
||||||
bool "HW SHA256 calculation"
|
bool "HW SHA256 calculation"
|
||||||
help
|
help
|
||||||
|
|
|
@ -179,6 +179,9 @@ SECTIONS
|
||||||
#ifdef CONFIG_SOC_IT8XXX2_KERNEL_IN_RAM
|
#ifdef CONFIG_SOC_IT8XXX2_KERNEL_IN_RAM
|
||||||
*libkernel.a:*
|
*libkernel.a:*
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CONFIG_SOC_IT8XXX2_ZEPHYR_IN_RAM
|
||||||
|
*libzephyr.a:*
|
||||||
|
#endif
|
||||||
#ifdef CONFIG_SOC_IT8XXX2_LIBRARY_TO_RAM
|
#ifdef CONFIG_SOC_IT8XXX2_LIBRARY_TO_RAM
|
||||||
)
|
)
|
||||||
.text
|
.text
|
||||||
|
@ -194,6 +197,9 @@ SECTIONS
|
||||||
#ifdef CONFIG_SOC_IT8XXX2_KERNEL_IN_RAM
|
#ifdef CONFIG_SOC_IT8XXX2_KERNEL_IN_RAM
|
||||||
*libkernel.a:*
|
*libkernel.a:*
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CONFIG_SOC_IT8XXX2_ZEPHYR_IN_RAM
|
||||||
|
*libzephyr.a:*
|
||||||
|
#endif
|
||||||
#ifdef CONFIG_SOC_IT8XXX2_LIBRARY_TO_RAM
|
#ifdef CONFIG_SOC_IT8XXX2_LIBRARY_TO_RAM
|
||||||
)
|
)
|
||||||
.text.*
|
.text.*
|
||||||
|
@ -230,6 +236,11 @@ SECTIONS
|
||||||
*libkernel.a:*(.text .text.*)
|
*libkernel.a:*(.text .text.*)
|
||||||
*libkernel.a:*(.rodata .rodata.*)
|
*libkernel.a:*(.rodata .rodata.*)
|
||||||
*libkernel.a:*(.srodata .srodata.*)
|
*libkernel.a:*(.srodata .srodata.*)
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_SOC_IT8XXX2_ZEPHYR_IN_RAM
|
||||||
|
*libzephyr.a:*(.text .text.*)
|
||||||
|
*libzephyr.a:*(.rodata .rodata.*)
|
||||||
|
*libzephyr.a:*(.srodata .srodata.*)
|
||||||
#endif
|
#endif
|
||||||
__ilm_flash_end = .;
|
__ilm_flash_end = .;
|
||||||
/* ILM mapping is always a multiple of 4k size; ensure following
|
/* ILM mapping is always a multiple of 4k size; ensure following
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue