Add new boardctl() command to set OS symbol table

This commit is contained in:
Gregory Nutt
2015-12-13 08:13:15 -06:00
parent 2d1f97282d
commit 54ea059beb
8 changed files with 46 additions and 13 deletions
+10 -3
View File
@@ -1799,12 +1799,19 @@ config BOARDCTL_UNIQUEID_SIZE
Provides the size of the memory buffer that must be provided by the
caller of board_uniqueid() in which to receive the board unique ID.
config BOARDCTL_SYMTAB
bool "Enable symbol table interfaces"
config BOARDCTL_APP_SYMTAB
bool "Enable application symbol table interfaces"
default n
depends on EXECFUNCS_HAVE_SYMTAB
---help---
Enables support for the BOARDIOC_SYMTAB boardctl() command.
Enables support for the BOARDIOC_APP_SYMTAB boardctl() command.
config BOARDCTL_OS_SYMTAB
bool "Enable kernel module symbol table interfaces"
default n
depends on MODULE
---help---
Enables support for the BOARDIOC_OS_SYMTAB boardctl() command.
config BOARDCTL_TSCTEST
bool "Enable touchscreen test interfaces"
+30 -5
View File
@@ -46,6 +46,7 @@
#include <assert.h>
#include <nuttx/board.h>
#include <nuttx/module.h>
#include <nuttx/binfmt/symtab.h>
#ifdef CONFIG_LIB_BOARDCTL
@@ -148,15 +149,17 @@ int boardctl(unsigned int cmd, uintptr_t arg)
break;
#endif
#ifdef CONFIG_BOARDCTL_SYMTAB
/* CMD: BOARDIOC_SYMTAB
* DESCRIPTION: Select a symbol table
#ifdef CONFIG_BOARDCTL_APP_SYMTAB
/* CMD: BOARDIOC_APP_SYMTAB
* DESCRIPTION: Select the application symbol table. This symbol table
* provides the symbol definitions exported to application
* code from application space.
* ARG: A pointer to an instance of struct boardioc_symtab_s
* CONFIGURATION: CONFIG_BOARDCTL_SYMTAB
* CONFIGURATION: CONFIG_BOARDCTL_APP_SYMTAB
* DEPENDENCIES: None
*/
case BOARDIOC_SYMTAB:
case BOARDIOC_APP_SYMTAB:
{
FAR const struct boardioc_symtab_s *symdesc =
(FAR const struct boardioc_symtab_s *)arg;
@@ -168,6 +171,28 @@ int boardctl(unsigned int cmd, uintptr_t arg)
break;
#endif
#ifdef CONFIG_BOARDCTL_OS_SYMTAB
/* CMD: BOARDIOC_OS_SYMTAB
* DESCRIPTION: Select the OS symbol table. This symbol table provides
* the symbol definitions exported by the OS to kernel
* modules.
* ARG: A pointer to an instance of struct boardioc_symtab_s
* CONFIGURATION: CONFIG_BOARDCTL_OS_SYMTAB
* DEPENDENCIES: None
*/
case BOARDIOC_OS_SYMTAB:
{
FAR const struct boardioc_symtab_s *symdesc =
(FAR const struct boardioc_symtab_s *)arg;
DEBUGASSERT(symdesc != NULL);
mod_setsymtab(symdesc->symtab, symdesc->nsymbols);
ret = OK;
}
break;
#endif
#ifdef CONFIG_BOARDCTL_TSCTEST
/* CMD: BOARDIOC_TSCTEST_SETUP
* DESCRIPTION: Touchscreen controller test configuration
+1
View File
@@ -336,6 +336,7 @@ CONFIG_NSH_MMCSDMINOR=0
# CONFIG_SAMV71XULT_MXTXPLND is not set
CONFIG_LIB_BOARDCTL=y
# CONFIG_BOARDCTL_UNIQUEID is not set
CONFIG_BOARDCTL_OS_SYMTAB=y
# CONFIG_BOARDCTL_TSCTEST is not set
# CONFIG_BOARDCTL_ADCTEST is not set
# CONFIG_BOARDCTL_PWMTEST is not set
+1 -1
View File
@@ -146,7 +146,7 @@ CONFIG_NSH_MMCSDMINOR=0
CONFIG_LIB_BOARDCTL=y
# CONFIG_BOARDCTL_POWEROFF is not set
# CONFIG_BOARDCTL_UNIQUEID is not set
# CONFIG_BOARDCTL_SYMTAB is not set
# CONFIG_BOARDCTL_APP_SYMTAB is not set
# CONFIG_BOARDCTL_TSCTEST is not set
# CONFIG_BOARDCTL_ADCTEST is not set
# CONFIG_BOARDCTL_PWMTEST is not set
+1 -1
View File
@@ -146,7 +146,7 @@ CONFIG_NSH_MMCSDMINOR=0
CONFIG_LIB_BOARDCTL=y
CONFIG_BOARDCTL_POWEROFF=y
# CONFIG_BOARDCTL_UNIQUEID is not set
# CONFIG_BOARDCTL_SYMTAB is not set
# CONFIG_BOARDCTL_APP_SYMTAB is not set
# CONFIG_BOARDCTL_TSCTEST is not set
# CONFIG_BOARDCTL_ADCTEST is not set
# CONFIG_BOARDCTL_PWMTEST is not set
+1 -1
View File
@@ -147,7 +147,7 @@ CONFIG_NSH_MMCSDMINOR=0
CONFIG_LIB_BOARDCTL=y
# CONFIG_BOARDCTL_POWEROFF is not set
# CONFIG_BOARDCTL_UNIQUEID is not set
# CONFIG_BOARDCTL_SYMTAB is not set
# CONFIG_BOARDCTL_APP_SYMTAB is not set
# CONFIG_BOARDCTL_TSCTEST is not set
# CONFIG_BOARDCTL_ADCTEST is not set
# CONFIG_BOARDCTL_PWMTEST is not set
+1 -1
View File
@@ -146,7 +146,7 @@ CONFIG_NSH_MMCSDMINOR=0
CONFIG_LIB_BOARDCTL=y
# CONFIG_BOARDCTL_POWEROFF is not set
# CONFIG_BOARDCTL_UNIQUEID is not set
# CONFIG_BOARDCTL_SYMTAB is not set
# CONFIG_BOARDCTL_APP_SYMTAB is not set
# CONFIG_BOARDCTL_TSCTEST is not set
# CONFIG_BOARDCTL_ADCTEST is not set
# CONFIG_BOARDCTL_PWMTEST is not set
+1 -1
View File
@@ -147,7 +147,7 @@ CONFIG_NSH_MMCSDMINOR=0
CONFIG_LIB_BOARDCTL=y
# CONFIG_BOARDCTL_POWEROFF is not set
# CONFIG_BOARDCTL_UNIQUEID is not set
# CONFIG_BOARDCTL_SYMTAB is not set
# CONFIG_BOARDCTL_APP_SYMTAB is not set
# CONFIG_BOARDCTL_TSCTEST is not set
# CONFIG_BOARDCTL_ADCTEST is not set
# CONFIG_BOARDCTL_PWMTEST is not set