This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 496a77653a57845c660d0e3758d92f7c4cfd6adf Author: Tiago Medicci Serrano <[email protected]> AuthorDate: Wed May 3 15:30:20 2023 -0300 arch/xtensa/esp32_esp32s3: prevent arch's libc in the userspace ESP32 and ESP32-S3 should use the ROM-defined versions of the libc in flat build and, when building the protected mode, in the kernel. The ROM-defined version of the libc functions can't be used in the userspace, however, because it isn't allowed to access the memory region in flash directly from the userspace. That being said, `LIBC_PREVENT_STRING_KERNEL` should be selected to avoid building any implementation of the libc, being the ROM-defined versions linked instead. NuttX's software implemented version of the libc will be built in the userspace. Also, the assembly-defined version of some of the libc functions (`XTENSA_xxx`) may also be selected to be used in the userspace. --- arch/xtensa/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index b168f93ea1..48ff80958e 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig @@ -21,6 +21,7 @@ config ARCH_CHIP_ESP32 select ARCH_HAVE_TESTSET select ARCH_HAVE_TEXT_HEAP select ARCH_VECNOTIRQ + select LIBC_PREVENT_STRING_KERNEL select LIBC_ARCH_ATOMIC select LIBC_ARCH_MEMCPY if BUILD_FLAT select LIBC_ARCH_MEMCHR if BUILD_FLAT @@ -83,6 +84,7 @@ config ARCH_CHIP_ESP32S3 select ARCH_HAVE_RESET select ARCH_HAVE_TESTSET select ARCH_VECNOTIRQ + select LIBC_PREVENT_STRING_KERNEL select LIBC_ARCH_MEMCPY if BUILD_FLAT select LIBC_ARCH_MEMCHR if BUILD_FLAT select LIBC_ARCH_MEMCMP if BUILD_FLAT
