Nucleo-F072RB: Enable board_app_inititalize, procfs, and built-in functions.
This commit is contained in:
parent
d9c266c71b
commit
575fb0acbf
@ -407,14 +407,20 @@ CONFIG_ARCH_BOARD="nucleo-f072rb"
|
||||
CONFIG_ARCH_HAVE_LEDS=y
|
||||
CONFIG_ARCH_LEDS=y
|
||||
CONFIG_ARCH_HAVE_BUTTONS=y
|
||||
# CONFIG_ARCH_BUTTONS is not set
|
||||
CONFIG_ARCH_BUTTONS=y
|
||||
CONFIG_ARCH_HAVE_IRQBUTTONS=y
|
||||
CONFIG_ARCH_IRQBUTTONS=y
|
||||
|
||||
#
|
||||
# Board-Specific Options
|
||||
#
|
||||
# CONFIG_BOARD_CRASHDUMP is not set
|
||||
# CONFIG_LIB_BOARDCTL is not set
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
# CONFIG_BOARDCTL_RESET is not set
|
||||
# CONFIG_BOARDCTL_UNIQUEID is not set
|
||||
# CONFIG_BOARDCTL_TSCTEST is not set
|
||||
# CONFIG_BOARDCTL_GRAPHICS is not set
|
||||
# CONFIG_BOARDCTL_IOCTL is not set
|
||||
|
||||
#
|
||||
# RTOS Features
|
||||
@ -448,6 +454,7 @@ CONFIG_PREALLOC_TIMERS=0
|
||||
# CONFIG_SPINLOCK is not set
|
||||
# CONFIG_INIT_NONE is not set
|
||||
CONFIG_INIT_ENTRYPOINT=y
|
||||
# CONFIG_INIT_FILEPATH is not set
|
||||
CONFIG_USER_ENTRYPOINT="nsh_main"
|
||||
CONFIG_RR_INTERVAL=200
|
||||
# CONFIG_SCHED_SPORADIC is not set
|
||||
@ -675,13 +682,28 @@ CONFIG_SYSLOG_CONSOLE=y
|
||||
#
|
||||
# File system configuration
|
||||
#
|
||||
CONFIG_DISABLE_MOUNTPOINT=y
|
||||
# CONFIG_DISABLE_MOUNTPOINT is not set
|
||||
# CONFIG_FS_AUTOMOUNTER is not set
|
||||
CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y
|
||||
# CONFIG_FS_READABLE is not set
|
||||
CONFIG_FS_READABLE=y
|
||||
# CONFIG_FS_WRITABLE is not set
|
||||
# CONFIG_FS_NAMED_SEMAPHORES is not set
|
||||
# CONFIG_FS_RAMMAP is not set
|
||||
# CONFIG_FS_PROCFS is not set
|
||||
# CONFIG_FS_FAT is not set
|
||||
# CONFIG_FS_NXFFS is not set
|
||||
# CONFIG_FS_ROMFS is not set
|
||||
# CONFIG_FS_TMPFS is not set
|
||||
# CONFIG_FS_SMARTFS is not set
|
||||
# CONFIG_FS_BINFS is not set
|
||||
CONFIG_FS_PROCFS=y
|
||||
# CONFIG_FS_PROCFS_REGISTER is not set
|
||||
|
||||
#
|
||||
# Exclude individual procfs entries
|
||||
#
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_PROCESS is not set
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_UPTIME is not set
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set
|
||||
# CONFIG_FS_UNIONFS is not set
|
||||
|
||||
#
|
||||
@ -709,7 +731,10 @@ CONFIG_MM_REGIONS=1
|
||||
#
|
||||
# Binary Loader
|
||||
#
|
||||
CONFIG_BINFMT_DISABLE=y
|
||||
# CONFIG_BINFMT_DISABLE is not set
|
||||
# CONFIG_NXFLAT is not set
|
||||
# CONFIG_ELF is not set
|
||||
CONFIG_BUILTIN=y
|
||||
# CONFIG_PIC is not set
|
||||
# CONFIG_SYMTAB_ORDEREDBYNAME is not set
|
||||
|
||||
@ -762,6 +787,7 @@ CONFIG_LIB_RAND_ORDER=1
|
||||
#
|
||||
# Program Execution Options
|
||||
#
|
||||
# CONFIG_LIBC_EXECFUNCS is not set
|
||||
CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024
|
||||
CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=1536
|
||||
|
||||
@ -801,6 +827,7 @@ CONFIG_ARCH_HAVE_TLS=y
|
||||
#
|
||||
# NETDB Support
|
||||
#
|
||||
# CONFIG_NETDB_HOSTFILE is not set
|
||||
# CONFIG_LIBC_IOCTL_VARIADIC is not set
|
||||
CONFIG_LIB_SENDFILE_BUFSIZE=512
|
||||
|
||||
@ -822,6 +849,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
|
||||
# Application Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# Built-In Applications
|
||||
#
|
||||
CONFIG_BUILTIN_PROXY_STACKSIZE=1024
|
||||
|
||||
#
|
||||
# CAN Utilities
|
||||
#
|
||||
@ -867,12 +899,14 @@ CONFIG_EXAMPLES_NSH=y
|
||||
# CONFIG_EXAMPLES_SERLOOP is not set
|
||||
# CONFIG_EXAMPLES_SLCD is not set
|
||||
# CONFIG_EXAMPLES_SMART is not set
|
||||
# CONFIG_EXAMPLES_SMART_TEST is not set
|
||||
# CONFIG_EXAMPLES_SMP is not set
|
||||
# CONFIG_EXAMPLES_STAT is not set
|
||||
# CONFIG_EXAMPLES_TCPECHO is not set
|
||||
# CONFIG_EXAMPLES_TELNETD is not set
|
||||
# CONFIG_EXAMPLES_TIFF is not set
|
||||
# CONFIG_EXAMPLES_TOUCHSCREEN is not set
|
||||
# CONFIG_EXAMPLES_USBSERIAL is not set
|
||||
# CONFIG_EXAMPLES_WATCHDOG is not set
|
||||
# CONFIG_EXAMPLES_WEBSERVER is not set
|
||||
# CONFIG_EXAMPLES_XBC_TEST is not set
|
||||
@ -881,6 +915,7 @@ CONFIG_EXAMPLES_NSH=y
|
||||
# File System Utilities
|
||||
#
|
||||
# CONFIG_FSUTILS_INIFILE is not set
|
||||
# CONFIG_FSUTILS_PASSWD is not set
|
||||
|
||||
#
|
||||
# GPS Utilities
|
||||
@ -896,6 +931,7 @@ CONFIG_EXAMPLES_NSH=y
|
||||
#
|
||||
# Interpreters
|
||||
#
|
||||
# CONFIG_INTERPRETERS_BAS is not set
|
||||
# CONFIG_INTERPRETERS_FICL is not set
|
||||
# CONFIG_INTERPRETERS_MICROPYTHON is not set
|
||||
# CONFIG_INTERPRETERS_MINIBASIC is not set
|
||||
@ -928,10 +964,12 @@ CONFIG_NSH_READLINE=y
|
||||
# CONFIG_NSH_CLE is not set
|
||||
CONFIG_NSH_LINELEN=64
|
||||
CONFIG_NSH_DISABLE_SEMICOLON=y
|
||||
# CONFIG_NSH_CMDPARMS is not set
|
||||
CONFIG_NSH_MAXARGUMENTS=6
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
CONFIG_NSH_NESTDEPTH=3
|
||||
# CONFIG_NSH_DISABLEBG is not set
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
|
||||
#
|
||||
# Disable Individual commands
|
||||
@ -939,7 +977,7 @@ CONFIG_NSH_NESTDEPTH=3
|
||||
CONFIG_NSH_DISABLE_ADDROUTE=y
|
||||
CONFIG_NSH_DISABLE_BASENAME=y
|
||||
# CONFIG_NSH_DISABLE_CAT is not set
|
||||
CONFIG_NSH_DISABLE_CD=y
|
||||
# CONFIG_NSH_DISABLE_CD is not set
|
||||
CONFIG_NSH_DISABLE_CP=y
|
||||
CONFIG_NSH_DISABLE_CMP=y
|
||||
CONFIG_NSH_DISABLE_DATE=y
|
||||
@ -991,6 +1029,7 @@ CONFIG_NSH_MMCSDMINOR=0
|
||||
#
|
||||
CONFIG_NSH_CODECS_BUFSIZE=128
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
CONFIG_NSH_PROC_MOUNTPOINT="/proc"
|
||||
CONFIG_NSH_FILEIOSIZE=64
|
||||
|
||||
#
|
||||
@ -1003,7 +1042,7 @@ CONFIG_NSH_DISABLESCRIPT=y
|
||||
#
|
||||
CONFIG_NSH_CONSOLE=y
|
||||
# CONFIG_NSH_ALTCONDEV is not set
|
||||
# CONFIG_NSH_ARCHINIT is not set
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
# CONFIG_NSH_LOGIN is not set
|
||||
# CONFIG_NSH_CONSOLE_LOGIN is not set
|
||||
|
||||
|
@ -41,6 +41,7 @@
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <sys/types.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "nucleo-f072rb.h"
|
||||
|
||||
@ -72,7 +73,7 @@ int stm32_bringup(void)
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
ferr("ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -40,12 +40,14 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "stm32f0_gpio.h"
|
||||
#include "nucleo-f072rb.h"
|
||||
|
||||
#ifdef CONFIG_ARCH_BUTTONS
|
||||
@ -71,7 +73,7 @@ void board_button_initialize(void)
|
||||
* also configured for the pin.
|
||||
*/
|
||||
|
||||
stm32_configgpio(GPIO_BTN_USER);
|
||||
stm32f0_configgpio(GPIO_BTN_USER);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@ -84,7 +86,7 @@ uint32_t board_buttons(void)
|
||||
* pressed.
|
||||
*/
|
||||
|
||||
bool released = stm32_gpioread(GPIO_BTN_USER);
|
||||
bool released = stm32f0_gpioread(GPIO_BTN_USER);
|
||||
return !released;
|
||||
}
|
||||
|
||||
@ -117,7 +119,7 @@ int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
||||
|
||||
if (id == BUTTON_USER)
|
||||
{
|
||||
ret = stm32_gpiosetevent(GPIO_BTN_USER, true, true, true, irqhandler, arg);
|
||||
ret = stm32f0_gpiosetevent(GPIO_BTN_USER, true, true, true, irqhandler, arg);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user