From 0effe359100318f343c3775be321924dbe1d11ee Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 30 Aug 2014 08:48:18 -0600 Subject: [PATCH] Enable SYSCALL interface with address environments in the SAMA5D4-EK ELF configuration --- configs/sama5d4-ek/README.txt | 14 +++++++++++++- configs/sama5d4-ek/elf/defconfig | 5 ++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/configs/sama5d4-ek/README.txt b/configs/sama5d4-ek/README.txt index 7fad01b809..b9cb114c06 100644 --- a/configs/sama5d4-ek/README.txt +++ b/configs/sama5d4-ek/README.txt @@ -3701,9 +3701,19 @@ Configurations CONFIG_GRAN=n : Disable the granule allocator CONFIG_MM_PGALLOC=n : Disable the page allocator + 4. A system call interface is enabled and the ELF test programs interface with the base RTOS code system calls. This eliminates the need for symbol tables to link with the base RTOS (symbol tables are still used, however, to interface with the common C library instaniation). Relevant configuration settings: + + RTOS Features -> System call support + CONFIG_LIB_SYSCALL=y : Enable system call support + CONFIG_SYS_NNEST=2 : Max number of nested system calls + CONFIG_SYS_RESERVED=1 : SYStem call 0 is reserved on this platform + + Application Configurations -> Examples -> ELF Loader Example + CONFIG_EXAMPLES_ELF_SYSCALL=y : Link apps with the SYStem call library + STATUS: 2014-8-24: This configuration works with the address environment - option disable. + and system call options disabled. 2014-8-28: Now this option works well well with address environments enabled. There is a potential issue with the use of task_create() as it is used in the ELF test, but the code @@ -3711,6 +3721,8 @@ Configurations http://www.nuttx.org/doku.php?id=wiki:nxinternal:memconfigs#task_create + 2014-8-29: System call interface verified. + nsh: This configuration directory provide the NuttShell (NSH). This is a diff --git a/configs/sama5d4-ek/elf/defconfig b/configs/sama5d4-ek/elf/defconfig index f22da29fbd..b877cb3cdc 100644 --- a/configs/sama5d4-ek/elf/defconfig +++ b/configs/sama5d4-ek/elf/defconfig @@ -427,7 +427,9 @@ CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_DEFAULT=2048 -# CONFIG_LIB_SYSCALL is not set +CONFIG_LIB_SYSCALL=y +CONFIG_SYS_RESERVED=1 +CONFIG_SYS_NNEST=2 # # Device Drivers @@ -701,6 +703,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set CONFIG_EXAMPLES_ELF=y +CONFIG_EXAMPLES_ELF_SYSCALL=y # CONFIG_EXAMPLES_ELF_LIBC is not set CONFIG_EXAMPLES_ELF_DEVMINOR=0 CONFIG_EXAMPLES_ELF_DEVPATH="/dev/ram0"