diff --git a/configs/eagle100/src/lm_appinit.c b/configs/eagle100/src/lm_appinit.c index 2690bbdba3..404fe52110 100644 --- a/configs/eagle100/src/lm_appinit.c +++ b/configs/eagle100/src/lm_appinit.c @@ -47,6 +47,10 @@ #include #include +#ifdef CONFIG_NXFLAT +# include +#endif + #include "tiva_ssi.h" /**************************************************************************** @@ -107,7 +111,7 @@ * arg - The boardctl() argument is passed to the board_app_initialize() * implementation without modification. The argument has no * meaning to NuttX; the meaning of the argument is a contract - * between the board-specific initalization logic and the + * between the board-specific initialization logic and the * matching application logic. The value cold be such things as a * mode enumeration value, a set of DIP switch switch settings, a * pointer to configuration data read from a file or serial FLASH, @@ -125,6 +129,18 @@ int board_app_initialize(uintptr_t arg) FAR struct spi_dev_s *spi; int ret; +#ifdef CONFIG_NXFLAT + /* Initialize the NXFLAT binary loader */ + + ret = nxflat_initialize(); + if (ret < 0) + { + syslog(LOG_ERR, + "ERROR: Initialization of the NXFLAT loader failed: %d\n", + ret); + } +#endif + /* Get the SPI port */ syslog(LOG_INFO, "Initializing SPI port %d\n", diff --git a/configs/lincoln60/src/lpc17_appinit.c b/configs/lincoln60/src/lpc17_appinit.c index 7642c91395..71ed7dab2b 100644 --- a/configs/lincoln60/src/lpc17_appinit.c +++ b/configs/lincoln60/src/lpc17_appinit.c @@ -47,6 +47,10 @@ #include #include +#ifdef CONFIG_FS_BINFS +# include +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -76,5 +80,17 @@ int board_app_initialize(uintptr_t arg) { +#ifdef CONFIG_FS_BINFS + /* Initialize the BINFS binary loader */ + + int ret = builtin_initialize(); + if (ret < 0) + { + syslog(LOG_ERR, + "ERROR: Initialization of the Built-In loader failed: %d\n", + ret); + } +#endif + return OK; } diff --git a/configs/lpcxpresso-lpc1768/src/lpc17_appinit.c b/configs/lpcxpresso-lpc1768/src/lpc17_appinit.c index dfcb5fcce1..93777f2f12 100644 --- a/configs/lpcxpresso-lpc1768/src/lpc17_appinit.c +++ b/configs/lpcxpresso-lpc1768/src/lpc17_appinit.c @@ -47,6 +47,10 @@ #include #include +#ifdef CONFIG_NXFLAT +# include +#endif + #include "lpc17_ssp.h" /**************************************************************************** @@ -124,7 +128,7 @@ * arg - The boardctl() argument is passed to the board_app_initialize() * implementation without modification. The argument has no * meaning to NuttX; the meaning of the argument is a contract - * between the board-specific initalization logic and the + * between the board-specific initialization logic and the * matching application logic. The value cold be such things as a * mode enumeration value, a set of DIP switch switch settings, a * pointer to configuration data read from a file or serial FLASH, @@ -139,11 +143,24 @@ int board_app_initialize(uintptr_t arg) { - int ret; - #ifdef NSH_HAVEMMCSD FAR struct spi_dev_s *ssp; +#endif + int ret; +#ifdef CONFIG_NXFLAT + /* Initialize the NXFLAT binary loader */ + + ret = nxflat_initialize(); + if (ret < 0) + { + syslog(LOG_ERR, + "ERROR: Initialization of the NXFLAT loader failed: %d\n", + ret); + } +#endif + +#ifdef NSH_HAVEMMCSD /* Get the SSP port */ ssp = lpc17_sspbus_initialize(CONFIG_NSH_MMCSDSPIPORTNO); diff --git a/configs/mikroe-stm32f4/src/stm32_appinit.c b/configs/mikroe-stm32f4/src/stm32_appinit.c index 67eced68d1..b073be394b 100644 --- a/configs/mikroe-stm32f4/src/stm32_appinit.c +++ b/configs/mikroe-stm32f4/src/stm32_appinit.c @@ -65,12 +65,16 @@ #endif #endif -#ifdef CONFIG_STM32_OTGFS -# include "stm32_usbhost.h" +#ifdef CONFIG_AUDIO +# include #endif -#ifdef CONFIG_AUDIO -# include "nuttx/audio/audio.h" +#if defined(CONFIG_FS_BINFS) && (CONFIG_BUILTIN) +# include +#endif + +#ifdef CONFIG_STM32_OTGFS +# include "stm32_usbhost.h" #endif #include "stm32.h" @@ -182,6 +186,17 @@ int board_app_initialize(uintptr_t arg) #endif int ret = OK; +#if defined(CONFIG_FS_BINFS) && defined(CONFIG_BUILTIN) + /* Register the BINFS file system */ + + ret = builtin_initialize(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: builtin_initialize failed: %d\n", ret); + return ret; + } +#endif + /* Configure SPI-based devices */ #ifdef CONFIG_STM32_SPI3 diff --git a/configs/moxa/src/moxart_appinit.c b/configs/moxa/src/moxart_appinit.c index a550e1f777..cb726327cc 100644 --- a/configs/moxa/src/moxart_appinit.c +++ b/configs/moxa/src/moxart_appinit.c @@ -47,6 +47,10 @@ #include #include +#if defined(CONFIG_FS_BINFS) && defined(CONFIG_BUILTIN) +# include +#endif + #include /**************************************************************************** @@ -90,6 +94,16 @@ int board_app_initialize(uintptr_t arg) { #ifndef CONFIG_BOARD_INITIALIZE +#if defined(CONFIG_FS_BINFS) && (CONFIG_BUILTIN) + /* Register the BINFS file system */ + + int ret = builtin_initialize(); + if (ret < 0) + { + fprintf(stderr, "ERROR: builtin_initialize failed: %d\n", ret); + } +#endif + #ifdef CONFIG_NET_FTMAC100 /* Perform board-specific initialization */ diff --git a/configs/moxa/src/moxart_boot.c b/configs/moxa/src/moxart_boot.c index 4520ca8835..55a90fcf60 100644 --- a/configs/moxa/src/moxart_boot.c +++ b/configs/moxa/src/moxart_boot.c @@ -73,6 +73,16 @@ #ifdef CONFIG_BOARD_INITIALIZE void board_initialize(void) { +#if defined(CONFIG_FS_BINFS) && (CONFIG_BUILTIN) + /* Register the BINFS file system */ + + int ret = builtin_initialize(); + if (ret < 0) + { + fprintf(stderr, "ERROR: builtin_initialize failed: %d\n", ret); + } +#endif + #ifdef CONFIG_NET_FTMAC100 /* Perform board-specific initialization */ diff --git a/configs/ntosd-dm320/README.txt b/configs/ntosd-dm320/README.txt index 7bd71464f0..aaafc3a065 100644 --- a/configs/ntosd-dm320/README.txt +++ b/configs/ntosd-dm320/README.txt @@ -310,11 +310,6 @@ Configuration Sub-Directories This configuration exercises the poll()/select() text at examples/poll - thttpd - - This builds the THTTPD web server example using the THTTPD and - the examples/thttpd application. - udp This alternative configuration directory is similar to nettest diff --git a/configs/ntosd-dm320/thttpd/defconfig b/configs/ntosd-dm320/thttpd/defconfig deleted file mode 100644 index be5d860de4..0000000000 --- a/configs/ntosd-dm320/thttpd/defconfig +++ /dev/null @@ -1,52 +0,0 @@ -# CONFIG_ARCH_LEDS is not set -CONFIG_ARCH="arm" -CONFIG_ARCH_BOARD="ntosd-dm320" -CONFIG_ARCH_BOARD_NTOSD_DM320=y -CONFIG_ARCH_CHIP_DM320=y -CONFIG_ARM_TOOLCHAIN_CODESOURCERYL=y -CONFIG_BOARD_LOOPSPERMSEC=16945 -CONFIG_BOOT_RUNFROMSDRAM=y -CONFIG_DISABLE_MQUEUE=y -CONFIG_DISABLE_POSIX_TIMERS=y -CONFIG_DISABLE_PTHREAD=y -CONFIG_DM9X_BASE=0xd0000300 -CONFIG_DM9X_IRQ=27 -CONFIG_EXAMPLES_THTTPD=y -CONFIG_FS_ROMFS=y -CONFIG_IDLETHREAD_STACKSIZE=4096 -CONFIG_MAX_TASKS=64 -CONFIG_NET=y -CONFIG_NETDEVICES=y -CONFIG_NETUTILS_NETLIB=y -CONFIG_NETUTILS_THTTPD=y -CONFIG_NET_DM90x0=y -CONFIG_NET_ICMP=y -CONFIG_NET_MAX_LISTENPORTS=8 -CONFIG_NET_SOCKOPTS=y -CONFIG_NET_TCP=y -CONFIG_NET_TCPBACKLOG=y -CONFIG_NET_TCP_CONNS=16 -CONFIG_NFILE_DESCRIPTORS=8 -CONFIG_NFILE_STREAMS=8 -CONFIG_NSOCKET_DESCRIPTORS=16 -CONFIG_NXFLAT=y -CONFIG_PIPES=y -CONFIG_PREALLOC_WDOGS=8 -CONFIG_PTHREAD_STACK_DEFAULT=4096 -CONFIG_RAM_SIZE=33554432 -CONFIG_RAM_START=0x01100000 -CONFIG_RAM_VSTART=0x00000000 -CONFIG_RAW_BINARY=y -CONFIG_RR_INTERVAL=200 -CONFIG_SCHED_HPWORK=y -CONFIG_START_DAY=2 -CONFIG_START_MONTH=8 -CONFIG_START_YEAR=2009 -CONFIG_TASK_NAME_SIZE=0 -CONFIG_THTTPD_CGI_BYTECOUNT=20000 -CONFIG_THTTPD_CGI_PRIORITY=50 -CONFIG_THTTPD_CGI_STACKSIZE=1024 -CONFIG_UART0_SERIAL_CONSOLE=y -CONFIG_USERMAIN_STACKSIZE=4096 -CONFIG_USER_ENTRYPOINT="thttp_main" -CONFIG_WDOG_INTRESERVE=0 diff --git a/configs/olimex-lpc1766stk/src/lpc17_appinit.c b/configs/olimex-lpc1766stk/src/lpc17_appinit.c index 8a5d9a2fd4..76def1cbf6 100644 --- a/configs/olimex-lpc1766stk/src/lpc17_appinit.c +++ b/configs/olimex-lpc1766stk/src/lpc17_appinit.c @@ -51,6 +51,10 @@ #include #include +#ifdef CONFIG_NXFLAT +# include +#endif + #include "lpc17_ssp.h" #include "lpc17_gpio.h" #include "lpc17_usbhost.h" @@ -330,7 +334,7 @@ static int nsh_usbhostinitialize(void) * arg - The boardctl() argument is passed to the board_app_initialize() * implementation without modification. The argument has no * meaning to NuttX; the meaning of the argument is a contract - * between the board-specific initalization logic and the + * between the board-specific initialization logic and the * matching application logic. The value cold be such things as a * mode enumeration value, a set of DIP switch switch settings, a * pointer to configuration data read from a file or serial FLASH, @@ -347,12 +351,26 @@ int board_app_initialize(uintptr_t arg) { int ret; +#ifdef CONFIG_NXFLAT + /* Initialize the NXFLAT binary loader */ + + ret = nxflat_initialize(); + if (ret < 0) + { + syslog(LOG_ERR, + "ERROR: Initialization of the NXFLAT loader failed: %d\n", + ret); + } +#endif + /* Initialize SPI-based microSD */ ret = nsh_sdinitialize(); if (ret < 0) { - syslog(LOG_ERR, "ERROR: Failed to initialize SPI-based SD card: %d\n", ret); + syslog(LOG_ERR, + "ERROR: Failed to initialize SPI-based SD card: %d\n", + ret); } /* Initialize USB host */ diff --git a/configs/shenzhou/src/stm32_appinit.c b/configs/shenzhou/src/stm32_appinit.c index 18de2f1660..32301dfea6 100644 --- a/configs/shenzhou/src/stm32_appinit.c +++ b/configs/shenzhou/src/stm32_appinit.c @@ -46,6 +46,10 @@ #include +#ifdef CONFIG_NXFLAT +# include +#endif + #include "stm32.h" #include "shenzhou.h" @@ -150,7 +154,7 @@ * arg - The boardctl() argument is passed to the board_app_initialize() * implementation without modification. The argument has no * meaning to NuttX; the meaning of the argument is a contract - * between the board-specific initalization logic and the + * between the board-specific initialization logic and the * matching application logic. The value cold be such things as a * mode enumeration value, a set of DIP switch switch settings, a * pointer to configuration data read from a file or serial FLASH, @@ -167,9 +171,21 @@ int board_app_initialize(uintptr_t arg) { int ret; - /* Initialize and register the W25 FLASH file system. */ +#ifdef CONFIG_NXFLAT + /* Initialize the NXFLAT binary loader */ + + ret = nxflat_initialize(); + if (ret < 0) + { + syslog(LOG_ERR, + "ERROR: Initialization of the NXFLAT loader failed: %d\n", + ret); + } +#endif #ifdef HAVE_W25 + /* Initialize and register the W25 FLASH file system. */ + ret = stm32_w25initialize(CONFIG_NSH_W25MINOR); if (ret < 0) { @@ -179,9 +195,9 @@ int board_app_initialize(uintptr_t arg) } #endif +#ifdef HAVE_MMCSD /* Initialize the SPI-based MMC/SD slot */ -#ifdef HAVE_MMCSD ret = stm32_sdinitialize(CONFIG_NSH_MMCSDMINOR); if (ret < 0) { @@ -191,11 +207,11 @@ int board_app_initialize(uintptr_t arg) } #endif +#ifdef HAVE_USBHOST /* Initialize USB host operation. stm32_usbhost_initialize() starts a thread * will monitor for USB connection and disconnection events. */ -#ifdef HAVE_USBHOST ret = stm32_usbhost_initialize(); if (ret != OK) { diff --git a/configs/sim/src/sim_bringup.c b/configs/sim/src/sim_bringup.c index d60f3aa8a2..3f991d39b3 100644 --- a/configs/sim/src/sim_bringup.c +++ b/configs/sim/src/sim_bringup.c @@ -56,6 +56,10 @@ #include #include +#if defined(CONFIG_FS_BINFS) && defined(CONFIG_BUILTIN) +# include +#endif + #include "up_internal.h" #include "sim.h" @@ -107,12 +111,39 @@ int sim_bringup(void) #endif int ret; +#if defined(CONFIG_FS_BINFS) && defined(CONFIG_BUILTIN) + /* Register the BINFS file system */ + + ret = builtin_initialize(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: builtin_initialize failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_FS_PROCFS + /* Mount the procfs file system */ + + ret = mount(NULL, SIM_PROCFS_MOUNTPOINT, "procfs", 0, NULL); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to mount procfs at %s: %d\n", + SIM_PROCFS_MOUNTPOINT, ret); + } +#endif + #ifdef CONFIG_LIB_ZONEINFO_ROMFS /* Mount the TZ database */ (void)sim_zoneinfo(3); #endif +#ifdef CONFIG_GRAPHICS_TRAVELER_ROMFSDEMO + /* Special initialization for the Traveler game simulation */ + + (void)trv_mount_world(0, CONFIG_GRAPHICS_TRAVELER_DEFPATH); +#endif + #ifdef CONFIG_EXAMPLES_GPIO /* Initialize simulated GPIO drivers */ @@ -211,23 +242,6 @@ int sim_bringup(void) } #endif -#ifdef CONFIG_GRAPHICS_TRAVELER_ROMFSDEMO - /* Special initialization for the Traveler game simulation */ - - (void)trv_mount_world(0, CONFIG_GRAPHICS_TRAVELER_DEFPATH); -#endif - -#ifdef CONFIG_FS_PROCFS - /* Mount the procfs file system */ - - ret = mount(NULL, SIM_PROCFS_MOUNTPOINT, "procfs", 0, NULL); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to mount procfs at %s: %d\n", - SIM_PROCFS_MOUNTPOINT, ret); - } -#endif - #ifdef NEED_FRAMEBUFFER /* Initialize and register the simulated framebuffer driver */ diff --git a/configs/zkit-arm-1769/src/lpc17_appinit.c b/configs/zkit-arm-1769/src/lpc17_appinit.c index a2f260ab1c..5fad17b1bd 100644 --- a/configs/zkit-arm-1769/src/lpc17_appinit.c +++ b/configs/zkit-arm-1769/src/lpc17_appinit.c @@ -52,6 +52,10 @@ #include #include +#ifdef CONFIG_NXFLAT +# include +#endif + #include "lpc17_spi.h" #include "zkit-arm-1769.h" @@ -146,7 +150,7 @@ * arg - The boardctl() argument is passed to the board_app_initialize() * implementation without modification. The argument has no * meaning to NuttX; the meaning of the argument is a contract - * between the board-specific initalization logic and the + * between the board-specific initialization logic and the * matching application logic. The value cold be such things as a * mode enumeration value, a set of DIP switch switch settings, a * pointer to configuration data read from a file or serial FLASH, @@ -161,11 +165,24 @@ int board_app_initialize(uintptr_t arg) { - int ret; - #ifdef CONFIG_NSH_HAVEMMCSD FAR struct spi_dev_s *spi; +#endif + int ret; +#ifdef CONFIG_NXFLAT + /* Initialize the NXFLAT binary loader */ + + ret = nxflat_initialize(); + if (ret < 0) + { + syslog(LOG_ERR, + "ERROR: Initialization of the NXFLAT loader failed: %d\n", + ret); + } +#endif + +#ifdef CONFIG_NSH_HAVEMMCSD /* Get the SPI port */ spi = lpc17_spibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO); @@ -189,7 +206,7 @@ int board_app_initialize(uintptr_t arg) return ret; } - message("Successfuly bound SPI port %d to MMC/SD slot %d\n", + message("Successfully bound SPI port %d to MMC/SD slot %d\n", CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO); #endif