From 35fe1cd7d781a4669887faf0f05de8d91c117c30 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Wed, 3 Aug 2022 00:25:27 +0800 Subject: [PATCH] boards: Enable thread local storage for some config to improve the ci coverage Signed-off-by: Xiang Xiao --- .../kinetis/kwikstik-k40/configs/ostest/defconfig | 1 + .../kinetis/kwikstik-k40/scripts/kwikstik-k40.ld | 12 ++++++++++++ boards/risc-v/bl602/bl602evb/configs/fpu/defconfig | 1 + boards/risc-v/bl602/bl602evb/scripts/ld.script | 14 ++++++++++++++ 4 files changed, 28 insertions(+) diff --git a/boards/arm/kinetis/kwikstik-k40/configs/ostest/defconfig b/boards/arm/kinetis/kwikstik-k40/configs/ostest/defconfig index 2d5f03efcb..99ead82413 100644 --- a/boards/arm/kinetis/kwikstik-k40/configs/ostest/defconfig +++ b/boards/arm/kinetis/kwikstik-k40/configs/ostest/defconfig @@ -26,6 +26,7 @@ CONFIG_PREALLOC_TIMERS=4 CONFIG_RAM_SIZE=65536 CONFIG_RAM_START=0x1fff8000 CONFIG_RR_INTERVAL=200 +CONFIG_SCHED_THREAD_LOCAL=y CONFIG_START_DAY=25 CONFIG_START_MONTH=3 CONFIG_START_YEAR=2013 diff --git a/boards/arm/kinetis/kwikstik-k40/scripts/kwikstik-k40.ld b/boards/arm/kinetis/kwikstik-k40/scripts/kwikstik-k40.ld index d2d8193e24..cfbd563bfa 100644 --- a/boards/arm/kinetis/kwikstik-k40/scripts/kwikstik-k40.ld +++ b/boards/arm/kinetis/kwikstik-k40/scripts/kwikstik-k40.ld @@ -86,6 +86,18 @@ SECTIONS __exidx_end = ABSOLUTE(.); } > progflash + .tdata : { + _stdata = ABSOLUTE(.); + *(.tdata .tdata.* .gnu.linkonce.td.*); + _etdata = ABSOLUTE(.); + } > progflash + + .tbss : { + _stbss = ABSOLUTE(.); + *(.tbss .tbss.* .gnu.linkonce.tb.* .tcommon); + _etbss = ABSOLUTE(.); + } > progflash + .data : { _sdata = ABSOLUTE(.); *(.data .data.*) diff --git a/boards/risc-v/bl602/bl602evb/configs/fpu/defconfig b/boards/risc-v/bl602/bl602evb/configs/fpu/defconfig index 37583ab44a..0e71bc5171 100644 --- a/boards/risc-v/bl602/bl602evb/configs/fpu/defconfig +++ b/boards/risc-v/bl602/bl602evb/configs/fpu/defconfig @@ -48,6 +48,7 @@ CONFIG_RAM_SIZE=134217728 CONFIG_RAM_START=0xc0800000 CONFIG_RAW_BINARY=y CONFIG_RR_INTERVAL=200 +CONFIG_SCHED_THREAD_LOCAL=y CONFIG_SCHED_WAITPID=y CONFIG_STACK_COLORATION=y CONFIG_START_DAY=20 diff --git a/boards/risc-v/bl602/bl602evb/scripts/ld.script b/boards/risc-v/bl602/bl602evb/scripts/ld.script index 84c15c1f84..167cf0a325 100644 --- a/boards/risc-v/bl602/bl602evb/scripts/ld.script +++ b/boards/risc-v/bl602/bl602evb/scripts/ld.script @@ -82,6 +82,20 @@ SECTIONS _einit = .; } > flash + .tdata : + { + _stdata = ABSOLUTE(.); + *(.tdata .tdata.* .gnu.linkonce.td.*); + _etdata = ABSOLUTE(.); + } > flash + + .tbss : + { + _stbss = ABSOLUTE(.); + *(.tbss .tbss.* .gnu.linkonce.tb.* .tcommon); + _etbss = ABSOLUTE(.); + } > flash + /*put wifibss in the first place*/ .wifibss (NOLOAD) : {