From c3bc22f07cb203c5a577b80467c8469d2a5ae9cb Mon Sep 17 00:00:00 2001
From: patacongo Last Updated: August 25, 2012 Last Updated: September 29, 2012
@@ -480,6 +480,7 @@
NuttX RTOS
-
/dev/null, /dev/zero, and loop drivers.
+
+
+
- The 88th release of NuttX, Version 6.21, was made on August 25, 2012, and is available for download from the
+ The 89th release of NuttX, Version 6.22, was made on September 29, 2012, and is available for download from the
SourceForge website.
- Note that the release consists of two tarballs: nuttx-6.21.tar.gz and apps-6.21.tar.gz.
+ Note that the release consists of two tarballs: nuttx-6.22.tar.gz and apps-6.22.tar.gz.
Both may be needed (see the top-level nuttx/README.txt file for build information)
The change log associated with the release is available here.
Unreleased changes after this release are available in SVN.
These unreleased changes are also listed here.
- This release corresponds with SVN release number: r5052 + This release corresponds with SVN release number: r5206, + Note that all SVN information has been stripped from the tarballs. + If you need the SVN configuration, you should check out directly from SVN. + Revision r5206 should equivalent to release 6.22 of NuttX 6.22:
++svn checkout -r5206 svn://svn.code.sf.net/p/nuttx/code/trunk nuttx-code ++
Or
++svn checkout -r5206 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code ++
Additional new features and extended functionality
atexit() functions.
-
+ RTOS:
+ Application entry point is no longer user_start, but can be configured using CONFIG_USER_ENTRYPOINT.
+ NuttX now supports two work queues: A lower priority work queue (for extended processing) and a higher priority work queue (for quick, high priority operations).
+
+ Memory Management: + Added a new granule-based allocated that can be used to manage, aligned and quantized DMA memory. +
+ File System: + Add hooks to allocate I/O memory with and external allocated (need if required by DMA). +
+ Networking: + ENC28J60 driver is (finally) verified. +
+ Drivers: + Add hooks USB device drivers to allocate I/O memory with and external allocated (need if required by DMA). + Driver for the Windbond SPI FLASH family (W25x16, W25x32, W25x64, and others). + ADS7843E driver extended for TSC2046 and XPT2046 and verified. +
+ ARMv7-M: + Added logic to reset the MCU using the NVIC. +
+ STM32: + Add support for STM32F103VET6. +
+ STM32 Drivers: + Add logic to re-initialize UARTs a second time to enable DMA (Mike Smith). + I2C driver error recovery (Mike Smith). +
+ STM32 boards: + Support for USB host added add to several configurations (or at least explained in README files). + Support for the Shenzhou STM32F107 board (see www.armjishu.com). + Support for M3 Wildfire STM32F103 board (v2 and v3). +
+ Build System::
+ Kconfig string de-quoting logic.
+ Remove comments from defconfig files (Kate).
+ Add tool to create NuttX-style symbol tables.
+ Numerous changes to configuration logic as needed for the new mconf-based configuration (much of this from Richard Cochran).
+ Refactor common Make.defs logic into tools/Config.mk (Richard Cochran).
+
+ Library:
+ Configurable terse output from strerror().
+ Added perror() (Kate).
+ Add %n format to sscanf() (Kate).
+
cfsetispeed(), cfsetospeed(), tcflush(), memchr(), and memccpy().
- mount command (with no arguments) will now show mounted volumes.
- df command to show file system usage.
- mkconfig will not define CONFIG_DRAM_END.
- Bugfixes (see the change log for details):
-ioctl() return value.
- EINTR if a serial wait is interrupted by a signal.
- %s format.
- + Applications: + Numerous changes and extensions to the old uIP web server (from Kate and Max Holtzberg, see the ChangeLog for specific extensions). + UDP network discovery utility (Max Holtzberg). + Embeddable Lightweight XML-RPC Server (http://www.drdobbs.com/web-development/an-embeddable-lightweight-xml-rpc-server/184405364, Max Holtzberg). +
+ Bugfixes (see the change log for details) + Some of these are very important (marked critical): +
+
+ RTOS:
+ Fixes to priority inheritance logic (critical).
+ waitpid() critical section.
+ Assertion in work_cancel() (Mike Smith).
+ mmap() (Kate).
+
+ FAT File System: + Improper Boolean expression caused un-necessary writes and performance issues (critical, Ronen Vainish). +
+
+ Networking:
+ Remove an un-necessary delay from recvfrom().
+ This greatly improves network performance (critical, Max Holtzberg).
+
+ Graphics: + NX parameter checking errors. +
++ Drivers: + Fix double release of memory in SDIO-based, MMC/SD driver (Ronen Vainish). +
++ LPC17xx: + Ethernet driver fixes needed for certain PHYs (Kate). +
++ AVR: + Fix build error (Richard Cochran). +
++ STM32: + USB OTG FS host driver NAKing an retries. + Power management compilation errors (Diego Sanchez). + Missing SPI3 remap logic. +
++ STM32 Drivers: + Fix for Ethernet errata for STM32F107 (critical). + Ethernet buffer alignment check. + Add "kludge" to Ethernet driver to handle DM9161 PHY which (at least on the Shenzhou board), sometimes does not come up correctly. +
+
+ Applications:
+ THTTPD (Kate).
+ NSH ping when IP address is on a different network (Darcy Gong).
+
+ Library:
+ fread(), fflush(), fdopen(): Fix error handling logic (Ronen Vainish).
+ Fix some field-width handling issues in sscanf()
+
+ As well as other, less critical bugs. See the ChangeLog for additional, detailed changes.
@@ -1450,8 +1425,8 @@ but only partially tested. Additional features are needed: USB driver, MMC integration, to name two (the slot on the board appears to accept on MMC card dimensions; I have only SD cards). - An SPI-based ENC29J60 Ethernet driver for add-on hardware is under development and - should be available in the NuttX 5.5 release. + An SPI-based ENC28J60 Ethernet driver for add-on hardware is available and + but has not been fully verified on the Olimex board (due to issues powering the ENC28J60 add-on board).Development Environments: @@ -3232,284 +3207,364 @@ Other memory:
-nuttx-6.21 2012-08-25 Gregory Nutt <gnutt@nuttx.org>
+nuttx-6.22 2012-09-29 Gregory Nutt <gnutt@nuttx.org>
- * configs/lpc4330-xplorer/up_nsh.c: Add support for a basic SPIFI block
- driver for use by NSH. Does not work! Crashes on first SPIFI write.
- * configs/lpc4330-xplorer/*/defconfig: Calibrate delay loops (this is
- based on the current "slow" 72MHz M4 clock and will need to be
- re-calibrated when this is increased).
- * configs/stm3220g-eval/include/board.h and configs/stm3240g-eval/include/board.h:
- The SDIOCLK frequency in the F2 and F4 derives for PLL48CLK and not HCLK
- so that the SDIOCLK input frequency should always be 48MHz.
- * sched/os_internal.h, sched_setupidlefiles.c, sched_setuptaskfiles.c, and
- sched_setupidlefiles.c: Detangle some conditional compilation. Allow for
- a perverse configuration that has socket descriptors and streams but no file
- descriptors (sure, why not?).
- * sched/: Stylistic clean-up of all files. Some of these files are pretty old
- and do not follow current NuttX coding standards in detail.
- * fs/: More stylistic file clean-up.
- * mm/: More stylistic file clean-up.
- * drivers/ and drivers/serial/: More stylistic file clean-up.
- * arch/arm/src/lpc43xx/lpc43_clockconfig.c: Fix PLL1 bit manipulation logic.
- Critical bugfix! This would often cause the LPC43xx to fail to boot.
- * arch/arm/src/lpc43xx/lpc43_rgu.c: The soft reset logic called from the
- beginning of __start seems cause problems. A magic delay seems to improve
- the logic some. But I suspect that real fix is to get rid of all of the
- soft reset logic. This would also be a critical bugfix if I believed
- that it really fixed all of the issues.
- * arch/arm/src/lpc43xx/chip/lpc43_cgu.h: Fix a bit mask in the PLL1
- control register. Critical bugfix.
- * arch/arm/src/lpc43xx/lpc43_clockconfig.c and configs/lpc4330-xplorer/include/board.h:
- Implement PLL1 ramp-up logic; Now the LPC43xx is running at 204MHz.
- * configs/lpc4330-xplorer/*/defconfig: Re-calibrated delay loops using
- the 204MHz clock. The LPC43xx ripping rips! This calibration was performed
- with symbols enabled and all optimization disabled. It will need to be
- better recalibrated again down the road.
- * arch/arm/src/stm32/stm32_exti.c: Renamed to rch/arm/src/stm32/stm32_exti_gpio.c
- to make a little room in the file name space.
- * arch/arm/src/stm32/stm32_exti_alarm.c: Add initial logic to attached the
- RTC alarm EXTI interrupt. This is work be performed mostly by Diego Sanchez.
- * include/: More stylistic file clean-up.
- * arch/arm/src/lpc43xx/lpc43_spifi.c, lpc43_spifi.h, and chip/lpc43_spifi.h: Add
- logic to configure and initialize the SPIFI device (does not yet work).
- * configs/lpc4330-xplorer/include/board.h: Reduce SPI SCLK value.
- * arch/arm/src/lpc43xx/lpc43_spifi.c, lpc43_spifi.h, and chip/lpc43_spifi.h:
- Logic completely redesigned. It now creates an MTD driver to access SPIFI...
- but the driver still does not work.
- * arch/arm/src/stm32 and arch/arm/include/stm32: Make name of RTC ALARM interrupt
- common on STM32 F1,2,4
- * arch/arm/src/stm32 and arch/arm/include/stm32: Add support for the
- STM32F100x "Value Line" devices. This includes changes to stm32F10xx_rcc.c that
- add the ability to run the chip off the internal oscillator. There is no open
- board configuration for this part yet (the STM32VLDiscovery would be a candidate).
- Contributed by Mike Smith.
- * arch/arm/src/stm32: Fixed typos in conditional compilation in the CAN and DMA
- and some pin configuration. This would have caused problems for STM32 F107xx.
- Typos noted by Mike Smith.
- * arch/arm/src/lpc43xx/lpc43_serial.c: Add support for certain RS-485 features
- * lib/termios/lib_cfsetispeed.c, lib_cfsetospeed.c, lib_tcflush.c: Add
- simple implementations of cfsetispeed(), cfsetospeed(), and tcflush().
- * include/sys/str_tty.h, lib/lib_setspeed.c, lib_getspeed.c, and lib_resetspeed.c:
- Add APIs to support setting non-standard BAUD values not supported by POSIX
- termios. These are non-standard interfaces but have a precedence: There are
- similar interfaces in AIX.
- * include/sys/str_tty.h, lib/lib_setspeed.c, lib_getspeed.c, and lib_resetspeed.c:
- Sigh... removed. We don't need any more almost standard interfaces! (SVN
- revision 4968 if you want the short-lived code).
- * include/termios.h and lib/termios/*: Open the existing, standard termios
- interfaces to permit some non-standard baud settings. The new termios definitions
- still supports the POSIX standard except that it does not strictly enforce
- baud rate settings, permitting some non-portable, but useful baud rate settings
- (this is what the short-lived AIX-like interfaces would have accomplished as well).
- * include/termios.h and lib/termios/*: Redesigned yet again (this is getting
- painful. NuttX now supports the BOTHER baud setting just as Linux does. termios
- Bxxx definitions are again encoded; cf[set|get][o|i]speed now deal with only the
- encoded values. If the encoded baud is set to BOTHER, then the values in the (non-
- standard) c_ispeed and c_ospeed baud values may be accessed directly.
- * arch/arm/src/stm32/stm32_serial.c: Add minimal termios support for the STM32
- (BOTHER style baud settings only). Contributed by Mike Smith.
- * configs/lpc4343-xplorer/src: Clean up SPIFI-library based build to that it
- actually works.
- * arch/arm/src/lpc43xx/lpc43_spifi.c: Add support for verification to writes.
- Add debug option to dump buffers. Several bugfixes... almost works.
- * include/termios.h, lib/termios/*, and arch/arm/src/stm32/stm32_serial.c: :
- BOTHER is gone again.
- * arch/arm/src/stm32/stm32_sdio.c and chip/stm32f20xx_pinmap.h: STM32 F2 SDIO
- fixes from Gary Teravskis and Scott Rondestvedt.
- * include/termios.h and lib/termios/*: Replace cfsetispeed and cfsetospeed with
- cfsetspeed (with definitions for the input/outputs in termios.h).
- * configs/stm32f4discovery/src and configs/stm32f4discovery/pm: Add a power
- management configuration for the STM32F4Discovery and supporting logic. This
- check-in also includes some fixes for the F4 RTC alarm logic.
- * drivers/input/pga11x.c and include/nuttx/input/pga11x.h: Add support for the
- TI PGA112/3/6/7 amplifier/multiplexer parts.
- * configs/mirtoo/README.txt, nsh/defconfig, and nxffs/defconfig: Add support
- for the PGA117 on the Mirtoo module.
- * drivers/analog/pga11x.c and include/nuttx/analog/pga11x.h: These belong in
- the analog subdirectories, not input.
- * configs/compal_e99/src/ssd1783.c and /ssd1783.h: Drivers for the SSD1783
- LCD found in the Motorola C155 telephone. The driver is specific to the C155
- because it uses the uwire transport. Contributed by Denis Carilki and
- Alan Carvalho de Assis.
- * drivers/power/pm_changestate.c. Correct a case where interrupts were not
- being re-enabled. Found by Diego Sanchez.
- * configs/mirtoo/nxffs/defconfig: This Mirtoo NXFFS configuration now uses the
- open Pinguino toolchain by default. This is necessary because the free C32
- toolchain does not support any optimization and the unoptimized NXFFS image
- hits the PIC32MX2 FLASH size (128K). There is plenty of room to grow using
- the Pinguino toolchain with -O2 optimization.
- * configs/mirtoo/src/up_adc.c. This is just a stub for now, but this is
- where Mirtoo ADC logic will eventually need to go.
- * arch/mips/src/pic32mx/pic32mx-gpio.c: Now supports the PIC32MX1/2 ANSEL
- IOPORT register.
- * lib/string/lib_memchr.c: Add support for memchr() (contributed by Mike Smith)
- * lib/string/lib_memccpy.c: Add support for memccpy()
- * arch/arm/src/lpc17xx/lpc17_serial.c: Now supports ioctl commands to change
- the baud using tcsetattr() (contributed by Chris Taglia).
- * arch/*/src/*_serial.c: Fix ioctl method return values. These methods
- should return a negated errno value; they should not set the errno
- variable.
- * sched/on_exit.c, sched/task_exithook.c, and include/nuttx/sched.c: Add
- support for multiple registered on_exit() functions if CONFIG_SCHED_ONEXIT_MAX
- is defined.
- * drivers/syslog/ramlog.c: Move the RAM SYSLOG device into drivers/syslog
- so that it will be in the same directory as some new SYSLOGing devices
- in the works.
- * include/nuttx/syslog.h and drivers/syslog/ramlog.c: The SYSLOG putc function
- now has a common name that is independent of the device that provides the
- SYSLOG.
- * include/nuttx/syslog.h and drivers/syslog/syslog.c: This is a new, generic
- SYSLOG device that can redirect debug output to any character device or file.
- So you can log debug output to a file or you can put the console on /dev/ttyS0
- and the debug output on /dev/ttyS1.
- * arch/arm/src/lpc43xxl/lpc43_spifi.c: Correct an addressing error in the LPC43
- SPIFI MTD driver
- * drivers/syslog/syslog.c and fs/fs_syslog.c: Moved the generic syslog logic
- from drivers/syslog to fs/ where is belongs. Especially after realizing that
- the syslog logic is going to have to some internal FS operations in order
- to realize a totally thread-independent SYSLOG interface.
- * arch/arm/src/stm32/stm32*_rcc.c and .h: If CONFIG_PM is defined, add a
- function called stm32_clockenable() that can be used by PM logic to re-start
- the PLL after re-awakening from deep sleep modes.
- * fs/fs_foreachinode.c and fs/fs_foreachmountpoint.c: Add logic to traverse
- inodes and mountpoints in the NuttX pseudo-file system.
- * fs/fat/fs_fat32.c: Max. filename length reported by statfs() was wrong
- if FAT long file names were enabled.
- * lib/stdio/lib_libvsprintf.c: Fieldwidth and justification were not
- supported for the %s format. As a result, %s, %12s, and %-12s all
- produced the same output.
- * lib/stdio/lib_libdtoa.c: Fix several issues with presenting floating
- point numbers (conversions are fine, but presentation was bad). This
- is a critical bug fix if you use printf or sprintf to deal with floating
- point numbers.
- * lib/stdio/lib_libdtoa.c and lib_libvsprintf.c: Correct some floating
- point options.
- * arch/arm/lpc43xx/lpc32_usb0dev.c: Add framework for development of
- an USB0, device-side driver for the LPC43XX. The initial check-in,
- however, is simply for the LPC31xx driver with name changes. The
- LPC31xx has the same USB IP, but will require some additional initialization
- (and lots of testing) before it can be used with the LPC43xx.
- * nuttx/Documentation/NuttShell.html: Added a section covering ways to
- customize the behavior of NSH.
- * arch/arm/src/stm32/chip/stm32f1*_pinmap.h: STM32 CAN TX/RX pins reversed;
- inconsistent conditional compilation. Reported by Max Holtzberg.
- * arch/arm/*/stm32: Add support for STM32 F107 "Connectivity Line"
- Ethernet (contributed by Max Holtzberg).
- * configs/olimex-stm32-p107: Add board support for the Olimiex STM32-P107
- board (contributed by Max Holtzberg).
- * arch/arm/src/stm32/stm32f2xx_dma.c, stm32f4xx_dma.c, stm32_serial.c, and
- stm32_spic.c: DMA priority was getting zeroed by STM32 F2/F4 DMA drivers
- so that all DMAs ran at the lowest priority.
- * configs/stm3240g-eval/include/board.h and configs/stm3220: Drop SD card
- frequency from 24 to 16 MHz. Apparently 24 MHz is too fast for the board.
- This (plus the change to the STM32 DMA (above) fixes SDIO DMA on the
- STM3240G-EVAL (and probably STM3220G-EVAL -- untested).
- * arch/arm/src/stm32/stm32f2xx_dma.c and stm32f4xx_dma.c: Backed out the
- DMA priority change just above. The reduced SD card frequency was
- necessary and sufficient to resolve the problem.
- * drivers/serial/serial.c: open, read, write, and poll methods may now
- abort return EINTR (or a short transfer size) if a signal is received
- while waiting to receive or send serial data. This behavior is required
- by POSIX.
- * include/sys/types.h: Define NULL to be (0) if __cplusplus is defined.
- (contributed by Mike Smith)
- * include/ctype.h: Remove a stray semi-colon in a definitions (Thanks
- Mike Smith).
- * configs/.../Make.defs. Fix C++ include path set-up in Make.defs file
- for all 8-bit AVR platforms (Thanks Richard Cochran).
- * lib/stdio/lib_*stream.c: Revised to handle new error return values from
- serial.c.
- * arch/arm/src/stm32/stm32_spi.c: SPI driver can now service re-
- initialization (Mike Smith).
- * tools/mkconfig.c: If CONFIG_DRAM_END is not specified, this tool
- will provide default definition of (CONFIG_DRAM_START + CONFIG_DRAM_SIZE)
- * arch/arm/src/stm32/stm32_otgfshost.c: Renamed from stm32_usbhost.c.
- This is nearly code complete and, with any luck, will be available
- in NuttX-6.21.
- * configs/*/defconfig: Update all defconfig files to remove syntax
- that is incompatible with the mconf configuration tool.
- * arch/arm/src/stm32/stm32_otgfshost.c: This driver now appears to be
- functional (although more testing is necesary).
+ * include/semaphore.h, sched/sem_holders.c, and lib/semaphore/sem_init.c:
+ Fix some strange (and probably wrong) list handling when
+ CONFIG_PRIORITY_INHERITANCE and CONFIG_SEM_PREALLOCHOLDERS are defined.
+ This list handling was probably causing errors reported by Mike Smith
+ * sched/sched_waitpid.c: Fix a possible issue with logic logic that
+ should be brought into a critical section (suggested by Mike Smith)
+ * sched/sched_setuptaskfiles.c: Should be 'struct socket' not
+ 'struct sockets'. How did this compile before? (found by Kate)
+ * syscall/syscall.csv: Fix prototype for usleep() and prctl() (also
+ from Kate).
+ * arch/arm/src/lpc17xx/lpc17_ethernet.c: Conditionally elide setting PHY
+ speed/duplex. This does not work for certain PHYs. Still some unresolved
+ issues (also from Kate).
+ * tools/Config.mk, Makefile, configs/*/Make.defs: Add a new Makefile
+ fragment to de-quote certain strings from the Kconfig logic that
+ need to be used at path segments (Richard Cochran).
+ * arch/arm/src/stm32/stm32_usbotghost.c: The STM32 USB host driver only
+ works with debug turned on. The problem appears to be that with debug
+ OFF, there are more NAKs occuring in more places than before and this
+ reveals a variety of errors. This check in improves NAK robustness
+ for control transfers but does not resolve all of the issues.
+ * configs/stm3220g-eval/*/defconfig: Calibrated delay loop. It had
+ never been calibrated was way off.
+ * sched/sem_holder.c: Add logic to handler some priority inheritance
+ cases when sem_post() is called from an interrupt handler. The
+ logic is clearly wrong, but it is not known if this is the
+ cause of any known bugs.
+ * lib/stdio/lib_perror(): Add perror(). Contributed by Kate.
+ * lib/string/lib_strerror(): Add option CONFIG_LIBC_STRERROR that
+ is now required to enabled strerror(). Add an option
+ CONFIG_LIBC_STRERROR_SHORT that can be used to output shortened
+ strings by strerror().
+ * arch/arm/src/stm32/stm32_usbotghost.c: Finally... the USB OTG FS
+ appears to handle NAKing correctly.
+ * configs/stm32f4discovery/*: Added and verifed support for USB OTG FS
+ host on the STM32F4Discovery board.
+ * configs/*/defconfig: Remove configuration documentation from config
+ files. It is redundant, error-prone, and difficult to maintain.
+ Configuration documentation is available in configs/README.txt for
+ common configurations and in configs/*/README.txt for board and MCU-
+ specific configurations.
+ * configs/stm3240g-eval: Add USB host support.
+ * sched/os_bring.c, configs/*/defconfig, tools/mkconfig.c, and others: Added
+ configuration variable CONFIG_USER_ENTRYPOINT that may be used to change
+ the default entry from user_start to some other symbol. Contributed by
+ Kate. NOTE: This change does introduce a minor backward incompatibility.
+ For example, if your application uses NSH as its start-up program, then your
+ build will now fail because it will be unable to find "user_start". The fix
+ for this link failure is to add the following to your configuration file:
+ CONFIG_USER_ENTRYPOINT="nsh_main".
+ * libs/stdio/lib_libfread.c and lib_*flush*.c: Correct a couple of
+ error cases where the lib semaphore was not be released on error
+ exits (thanks Ronen Vainish). Also, improved some error reporting:
+ the generic ERROR was being used instead of the specific errno
+ value; the errno variable was not always set correctly.
+ * tools/mkfsdata.pl: The uIP web server CGI image making perl script was
+ moved from apps/netutils/webserver/makefsdata to nuttx/tools/mkfsdata.pl
+ (Part of a larger change submitted by Max Holtzberg).
+ * configs/stm3240g-eval/script/ld.script: All of the identical ld.script
+ files for the STM3240G-EVAL were replaced by one version in this directory.
+ * configs/stm3240g-eval/webserver: Configuration submitted by Max Holtzberg
+ for testing the changes to the uIP web server (see apps/ChangeLog.txt).
+ * lib/stdio/lib_perror.c: Remove CONFIG_LIBC_PERROR_DEVNAME. What was I
+ thinking? Arbitrary streams cannot be shared by different tasks.
+ * tools/mksyscall.c, csvparser.c, and csvparser.h: Separate CSV parsing
+ logic from mksyscall.c into files where it can be shared.
+ * tools/mksymtab.c: Add a tool that can be used to convert a CSV file
+ into a NuttX-style symbol table.
+ * sched/work_cancel.c: Fix a bad assertion (reported by Mike Smith)
+ * configs/stm3210e-eval/src/up_idle.c: Correct some power management
+ compilation errors (reported by Diego Sanchez).
+ * include/nuttx/wqueue.h, sched/work*, and others: Added logic to support
+ a second, lower priority work queue (CONFIG_SCHED_LPWORK).
+ * arch/arm/src/stm32/stm32_dma.c, chip/stm32*_memorymap.h: FSMC SRAM is
+ only 16-bits wide and the SDIO DMA must be set up differently.
+ * arch/arm/src/stm32/stm32_dma.c: Back out the 16-bit DMA change. It
+ is incorrect.
+ * configs/: Make use of UART4/5 vs USART4/5 consistent in all places.
+ * Kconfig: Serial 2STOP setting must be integer 0/1, not a boolean.
+ * lib/misc/sendfile.c and include/sys/sendfile.h: Add a Linux style
+ sendfile() (non-standard!)
+ * Kconfig: Refactor serial settings (moved from chip to drivers/serial).
+ AVR "teensy" now builds with Kconfig (contributed by Richard Cochran).
+ * Kconfig: Add configuration settings for the LPC17xx
+ * Kconfig: Add configuration settings for the LM3S (from Richard Cochran).
+ * Kconfig: Verify configuration settings for the STM32. This includes
+ changes in the way that the external SRAM is configured: Define
+ CONFIG_HEAP2_SIZE (decimal) instead of CONFIG_HEAP2_END (hex).
+ * tools/configure.sh: Don't append the apps directory path setting
+ if the correct setting is already in defined in the defconfig file.
+ * fs/fat/fs_utils.c: Improperly constructed bool expression. This
+ would cause many unnecessary writes to FLASH (Thanks Ronen Vainish).
+ * Kconfig: Verify configuration settings for the LPC43xx. This includes
+ some corrections to configuration variable names and defconfig settings.
+ * Kconfig: Add and verify configuration settings for the LPC31xx.
+ * arch/arm/src/stm32/stm32_uart.h and stm32_serial.c: Add logic to
+ re-initialize the console UART as needed to enable DMA on the
+ console UART (contributed by Mike Smith).
+ * net/recvfrom.c, net/Kconfig, include/nuttx/net/uipopt.h: Remove delay
+ after receiving data. That has historical reasons to be there (it
+ was needed before read-ahead buffering was added), but kills performance.
+ (Noted by Max Holtzberg).
+ * configs/shenzhou: Add beginnings of a board configuration for the
+ Shenzhou STM32107 board (see www.armjishu.com). Very little is in
+ place as of this initial check-in.
+ * QEMU: Fixes from Richard Cochran to build QEMU with Kconfig files.
+ * arch/*/src/Makefile: Remove some old logic that was kicked off
+ when CONFIG_BOOT_RUNFROMFLASH=y. The old logic used to use
+ objcopy to move sections. Newer logic changes the load position
+ of sections in the the linker script. As far as I can tell, there
+ is nothing in the source tree now that depends on the old way of
+ doing things (if I am wrong, they will need a change to the linker
+ script).
+ * configs/fire-stm32v2: Configuration for the M3 Wildfire board. I
+ don't know very much about this board other than is has an
+ STM32F103VET6 chip, LCD, touchscreen, and ENC28J60 network. Very
+ little is in place on the initial check-in.
+ * configs/shenzhou: Coding for the Shenzhou board port is complete,
+ but tested has been deferred until I get the right tools.
+ * arch/arc/include/stm32/chip.h and arch/arm/src/stm32/chip.h:
+ Add support for the STM32F103VET6.
+ * fs/fs_fdopen.c: Bad check for failure to allocate memory. (Noted
+ by Ronen Vainish).
+ * drivers/mmcsd/mmcsd_sdio.c: If the MMC/SD driver were ever
+ uninitialized then there would be a double release of memory
+ (Noted by Ronen Vainish).
+ * fs/mmap/fs_rammap.c: Fix logic error and errno check (contributed
+ by Kate).
+ * arch/avr/src: Fixes from AVR32 build errors that have crept in
+ over the time; incorporated Kconfig for AVR3 (Richard Cochran).
+ * fs/fat and include/nuttx/fs/fat.h: The FAT file system allocates
+ memory for sector I/O buffers used to exchange data with the
+ configured block driver. In some contexts, the block driver may
+ require DMA-capable memory. If CONFIG_FAT_DMAMEMORY is defined,
+ then the FAT FS will use platform-provided DMA memory allocators
+ to allocate the block driver I/O buffers.
+ * CONFIG_NET_ENC28J60 renamed CONFIG_ENC28J60 to be consistent
+ in all places.
+ * drivers/enc28j60.c, include/nuttx/net/enc28j60.h, and
+ olimex-strp711/src/up_enc28j60.c: No longer passes IRQ number
+ as a parameter. Instead now passes a call table to manage
+ ENC28J60 GPIO interrupts. That is because GPIO interrupts are
+ handled in different ways by different MCUs and some do not
+ support IRQ numbers for GPIO interrupts.
+ * mm/mm_gran* and include/nuttx/gran.h: Add a simple granule-
+ based allocator. The intent of this allocator is to support
+ simple allocation of DMA I/O buffers. The initial check-in
+ is code complete but untested (not event built into the
+ mm/Makefile yet.
+ * confgs/fire-stm32v2: The board port is basically functional.
+ Not all features have been verified. The ENC28J60 network
+ is not yet functional.
+ * configs/stm3240g-eval/discover: A configuration for testing
+ the UDP discovery utility. Contributed by Max Holtzberg.
+ * mm/README.txt: Add a new README file.
+ * include/nuttx/usb/usb.h, arch/*/src/*usb.c, and arch/*/src/*otg*.c:
+ Add hooks to to use common, external DMA buffer allocation
+ implementation.
+ * net/recvfrom.c: Don't block in recvfrom if (1) read-ahead buffering
+ is enabled and (2) some data was obtained from read-ahead buffers.
+ Blocking is a bad idea in that case because there is no timeout!
+ (submitted by Max Holtzberg).
+ * configs/stm3240g-eval/xmlrpc: An example configuration for the
+ Embeddable Lightweight XML-RPC Server at apps/examples/xmlrpc.
+ See http://www.drdobbs.com/web-development/\
+ an-embeddable-lightweight-xml-rpc-server/184405364 for more info.
+ Contributed by Max Holtzberg.
+ * configs/*/nxwm/defconfig and sched/task_exithook.c: Fixes for
+ bugs that crept in during recent changes. (Submitted by Max
+ Holtzberg).
+ * arch/arm/include/armv7-m/irq.h: Fix a critical bug in irqsave().
+ It looks like sometimes the compile will re-order some instructions
+ inapproapriately. This end result is that interrupts will get
+ stuck off.
+ * drivers/mtd/w25.c: Beginning of a driver for the Windbond SPI
+ FLASH family (W25x16, W25x32, and W25x64). The initial check-in
+ is basically just the SST25 driver with some name changes.
+ * arch/arm/include/armv7-m/irq.h and arch/arm/src/stm32/stm32_spi.c:
+ Back out the last change in irq.h. It is (most likely) fine the
+ way it was. The really interrupt related problem was in stm32_spi.c:
+ When SPI3 is not enabled, then the irqrestore() falls in the
+ else clause.
+ * include/nuttx/compiler.h and other files: Moved always_inline
+ and noinline __attributes__ here. Also replaced all occurrences
+ of explicit __atributes__ in other files with definitions from
+ this header file.
+ * drivers/mtd/w25.c: The Windbond SPI FLASH W25 FLASH driver is
+ code complete (but still untested).
+ * arch/arm/src/stm32/stm32_i2c.c: I2C improvements from Mike Smith.
+ Unified configuration logic; dynamic timeout calculations;
+ I2C reset logic to recover from locked devices on the bus.
+ * configs/*/*/Make.defs, tools/Config.mk, Makefile: Refactor all
+ common make definitions from the various Make.defs files into
+ the common tools/Config.mk. Add support for a verbosity options:
+ Specify V=1 on the make command line in order to see the exact
+ commands used in the build (Contributed by Richard Cochran).
+ * drivers/net/enc28j60.c: The ENC28J60 Ethernet driver is
+ now functional.
+ * configs/fire-stm32v2: Add support or the fire-stm32v3 board as
+ well (untested because I do not have a v3 board).
+ * lib/stdio/lib_sscanf.c: Add %n psuedo-format (from Kate).
+ * lib/stdio/lib_sscanf.c: There is an issue of handling input
+ when (1) no fieldwidth is provided and (2) there is no space
+ seperating the input values. No solutions is in place for this
+ case now (either space or a fieldwidth must be provided). But
+ at least some of the bad logic that attempted to handle this
+ case has been removed (noted by Kate).
+ * arch/arm/src/stm32/stm32_eth.c: DMA buffer sizes must be an
+ even multiple of 4, 8, or 16 bytes.
+ * arch/arm/src/stm32/stm32_idle.c: Fixes STM32F107 DMA issues:
+ We cannot go into sleep mode while Ethernet is actively DMAing.
+ * configs/shenzhou/src/up_ssd1289.c: Add infrastructure to support
+ SSD1289 LCD. Initial checkin is just a clone of the
+ STM32F4Discovery's FSMC-based LCD interface. The Shenzhou
+ will need a completely need bit-banging interface; this
+ initial check-in is only for the framework.
+ * configs/shenzhou/src/up_ssd1289.c: Bit-banging driver is
+ code complete.
+ * configs/shenzhou/src/up_lcd.c: Oops. Shenzhou LCD does not
+ have an SSD1289 controller. Its an ILI93xx. Ported the
+ STM3240G-EVAL ILI93xx driver to work on the Shenzhou board.
+ * configs/shenzhou/nxwm: Added an NxWM configuration for the
+ Shenzhou board. This is untested on initial check-in. It will
+ be used to verify the Shenzhou LCD driver (and eventually the
+ touchscreen driver).
+ * configs/shenzhou/src/up_touchscreen.c: Add ADS7843E touchscreen
+ support for the Shenzhou board. The initial check-in is untested
+ and basically a clone of the the touchscreen support for the SAM-3U.
+ * tools/cfgparser.c: There are some NxWidget configuration
+ settings that must be de-quoted.
+ * arch/arm/src/stm32/Kconfig: There is no SPI4. Some platforms
+ support SPI3 and some do not (still not clear).
+ * nuttx/configs/shenzhou: Various fixes to build new NxWM
+ configuration.
+ * configs/shenzhou: Oops. The Shenzhou LCD is and SSD1289,
+ not an ILI93xx.
+ * configs/shenzhou/src/up_ssd1289.c: The LCD is basically functional
+ on the Shenzhou board.
+ * graphics/nxmu: Correct some bad parameter checking that caused
+ failures when DEBUG was enabled.
+ * arch/arm/src/armv7-m/nvic.h: Add bit definitions for the AIRCR
+ register.
+ * drivers/input/ads7843.c: Need semaphore protection in logic
+ that samples the position.
+ * drivers/lcd/ssd1289.c: On some platforms we are unable to
+ read the device ID -- reason unknown; workaround in place.
+ * drivers/input/ads7843.c: Add thresholding options and an
+ option to swap X and Y positions. Fix some logic errors in
+ the SPI locking/selecting logic.
+ * arch/arm/src/armv7-m/up_systemreset.c: Add logic to reset
+ the Cortex-Mx using the AIRCR register. Contributed by Darcy
+ Gong.
+ * arch/arm/src/stm32/up_eth.c: Add logic specifically for the
+ DM9161 PHY. If the DM9161 failed to initialize, then use the
+ up_sysemreset() logic to reset the MCU. Contributed by Darcy
+ Gong.
+ * arch/arm/src/stm32/stm32_gpio.c: Add missing logic to set bit
+ for SPI3 remap. This fixes the XPT2046 touchscreen driver using
+ drivers/input/ads7843.c
+ * configs/shenzhou/src/up_ssd1289.c: Fix naming error in
+ conditional compilation.
+ * configs/shenzhou/nxwm/defconfig: Disable reading from the LCD.
+ This does not work. The hardware and the driver support the
+ capability, but there is some bug that causes memory corruption.
+ The work around for now: Just disable reading from the LCD.
+ * drivers/lcd/ssd1289.c: Add some logic to reduce the amount of
+ output when CONFIG_DEBUG_LCD is enabled.
+ * configs/shenzhou/nxwm/defconfig: Bug found and fixed... The
+ original configuration had too much stuff turned on. Reducing
+ stack sizes, some features, and buffer sizes made the
+ configuration reliable (Reading from the LCD is still disabled).
+ * net/uip/uip_icmpping.c: Fix problem that prevented ping from
+ going outside of local network. Submitted by Darcy Gong
-apps-6.21 2012-08-25 Gregory Nutt <gnutt@nuttx.org>
+apps-6.22 2012-09-29 Gregory Nutt <gnutt@nuttx.org>
- * apps/include/: Stylistic clean-up of all header files.
- * apps/modbus and apps/include/modbus: A port of freemodbus-v1.5.0
- has been added to the NuttX apps/ source tree.
- * apps/examples/modbus: A port of the freemodbus-v1.5.0 "demo"
- program that will be used to verify the FreeModBus port
- * apps/modbus: Don't use strerror(). It is just too big.
- * apps/modbus: Add CONFIG_MB_TERMIOS. If the driver doesn't support
- termios ioctls, then don't bother trying to configure the baud, parity
- etc.
- * apps/nshlib: If waitpid() is supported, then NSH now catches the
- return value from spawned applications (provided by Mike Smith)
- * apps/nshlib: Lock the scheduler while starting built-in applications
- in order to eliminate race conditions (also from Mike Smith).
- * apps/examples/adc, pwm, and qencoder: Add support for testing
- devices with multiple ADC, PWM, and QE devices.
- * apps/nshlib/nsh_mntcmds.c: Separated mount-related commands out of
- nsh_fscmds.c. Extended to the mount command so that if no arguments
- are provided, then the current mountpoints are enumerated.
- * apps/nshlib/nsh_mntcmds.c: Add an NSH df command to list the
- properties of mounted file systems.
- * apps/nshlib/nsh_parse.c: Extend help command options. 'help' with
- no arguments outputs a short list of commands. With -v lists all
- command line details. A command name can be added to just get
- help on one command.
- * system/readline.c: If character input/output is interrupted by a
- signal, then readline() will try the read/write again.
- * apps/*/Make.defs: Numerous fixes needed to use the automated
- configuration (from Richard Cochran).
+ * apps/netutils/thttpd/thttpd_cgi.c: Missing NULL in argv[]
+ list (contributed by Kate).
+ * apps/nshlib/nsh_parse.c: CONFIG_NSH_DISABLE_WGET not CONFIG_NSH_DISABLE_GET
+ in one location (found by Kate).
+ * apps/examples/ostest/prioinherit.c: Limit the number of test
+ threads to no more than 3 of each priority. Bad things happen
+ when the existing logic tried to created several hundred test
+ treads!
+ * apps/nshlib/nsh.h: Both CONFIG_LIBC_STRERROR and CONFIG_NSH_STRERROR
+ must be defined to use strerror() with NSH.
+ * apps/examples/*/*_main.c, system/i2c/i2c_main.c, and others: Added
+ configuration variable CONFIG_USER_ENTRYPOINT that may be used to change
+ the default entry from user_start to some other symbol. Contributed by
+ Kate.
+ * apps/netutils/webserver/httpd/c: Fix a typo that as introduced in
+ version r4402: 'lese' instead of 'else' (Noted by Max Holtzberg).
+ * tools/mkfsdata.pl: The uIP web server CGI image making perl script was
+ moved from apps/netutils/webserver/makefsdata to nuttx/tools/mkfsdata.pl
+ (Part of a larger change submitted by Max Holtzberg).
+ * apps/netutils/webserver, apps/examples/uip, and apps/include/netutils/httpd.h:
+ The "canned" version of the uIP web servers content that was at
+ netutils/webserver/httpd_fsdata.c has been replaced with a dynamically
+ built configuration located at apps/examples/uip (Contributed by
+ Max Holtzberg).
+ * apps/netutils/webserver: Several inenhancements from Kate including the
+ ability to elide scripting and SERVER headers and the ability to map
+ files into memory before transferring them.
+ * apps/netutils/webserver: Add ability to map a URL to CGI function.
+ Contributed by Kate.
+ * apps/nshlib/nsh_mntcmds.c: The changes of 6.21 introduced holes in the
+ error handling: Now the number of arguments to mount can be 0 or 4.
+ Additional parameter checking is required to prevent mysterious errors
+ (submiteed by Kate).
+ * apps/netutils/webserver/httpd_mmap.c: Fix errors when the mmap()
+ length is zero (submitted by Kate).
+ * apps/netutils/webserver/httpd_sendfile.c: Add and option,
+ CONFIG_NETUTILS_HTTPD_SENDFILE to transfer files using the NuttX
+ sendfile() interface.
+ * apps/netutils/discover: A UDP network discovery utility contributed
+ by Max Holtzberg.
+ * apps/examples/discover: A test example for the UDP network discovery
+ utility (also contribed by Max Holtzberg).
+ * apps/examples/*/main.c: Too many files called main.c. Each renamed
+ to something unique so that they will not collide in the archive.
+ * apps/netutils/xmlrpc: The Embeddable Lightweight XML-RPC Server
+ discussed at http://www.drdobbs.com/web-development/\
+ an-embeddable-lightweight-xml-rpc-server/184405364. Contributed by
+ Max Holtzberg.
+ * apps/netutils/uip_listenon.c: Logic in uip_server.c that creates
+ the listening socket was moved to this new file to support re-use.
+ Contributed by Kate.
+ * apps/netutils/webserver/httpd.c: The option CONFIG_NETUTILS_HTTPD_SINGLECONNECT
+ can now be used to limit the server to a single thread. Option
+ CONFIG_NETUTILS_HTTPD_TIMEOUT can be used to generate HTTP 408 errors.
+ Both from Kate.
+ * apps/netutils/webserver/httpd.c: Improvements to HTTP parser from
+ Kate.
+ * apps/netutils/webserver/httpd.c: Add support for Keep-alive connections
+ (from Kate).
+ * apps/NxWidget/Kconfig: This is a kludge. I created this NxWidgets
+ directory that ONLY contains Kconfig. NxWidgets does not live in
+ either the nuttx/ or the apps/ source trees. This kludge makes it
+ possible to configure NxWidgets/NxWM without too much trouble (with
+ the tradeoff being a kind ugly structure and some maintenance issues).
+ * apps/examples/Make.defs: Missing support for apps/examples/watchdog.
+ * apps/NxWidgets/Kconfig: Add option to turn on the memory monitor
+ feature of the NxWidgets/NxWM unit tests.
-NxWidgets-1.2 2012-06-15 Gregory Nutt <gnutt@nuttx.org>
+NxWidgets-1.3 2012-09-29 Gregory Nutt <gnutt@nuttx.org>
- * NXWidgets::CCallback: callback arguement is now type CCallback and not
- CWidgetControl; Added a method to redirect keyboard contacts to either
- the widgets in the window (via CWidgetControl) or to an NxConsole (via
- nxcon_kbdin()).
- * NXWidgets::INxWindow, CBgWindow, CNxTkWindow, CNxToolbar, CNxWindow:
- Now pass the CCallback intances as the callback argument instead of
- the CWidgetControl instance. New method redirectNxConsole() will
- support redirection of any window keyboard input to the NxConsole
- (via CCallback).
- * NxWM:CNxConsole: Configures the NxConsole window to redirection keyboard
- input to the NxConsole; redirects standard input to the NxConsole
- device driver.
- * NxWM:CKeyboard: Add a new class that implements a keyboard listener
- thread. This thread reads from /dev/console and injects the keyboard
- input into NX. NX will determine which window is at the top of the
- heirarchy and re-direct the keyboard input to only that top window.
- This solves an important problem with, for example, running multiple
- copies of the NxConsole: On the copy of the NxConsole at the top of
- the heirarchy should get the keyboard input.
- * UnitTests/nxwm/main.cxx: Now starts the keyboard thread if
- CONFIG_NXWM_KEYBOARD is defined.
- * NxWM::CTaskbar: After drawing the task bar, need to raise the
- application window otherwise the taskbar will be on the top and
- keyboard input will not be received by the top application.
- * NxWM::CTaskbar: Bugfix... previous window should not be minimized
- when a new window is started. It should stay in a maximized state
- so that it will re-appear with the window above it is closed or
- minimized.
- * NxWM::CHexCalculator: Add a hexadecimal/decimal calculator
- example.
- * NXWidgets::CNxTkWindow: Back out height adjustment in the getSize()
- method. The code was correct as it was before.
- * NXWidgets::CButtonArray and NXWidgets::CGraphicsPort: There is
- a kludge in there to handle the case where we cannot read the
- background data because the LCD does not support read operations.
- In that case, we just use the default background color. However,
- that doesn't work either for the case where the background color
- changes when the widget is selected. Then the background color
- in the font is wrong. Fixed in CButtonArrary, but the problem
- probably exists in other places as well.
- * NxWM: Increase default spacing of icons on the Start Window.
- * NxWM::CHexCalculator: Fix some non-standard calculator behavior
- after = is pressed. Use upper case hex. Increase font size.
- * nxwm/Makefile: Fix error that creapt in during some other
- recent check-ins.
+ * UnitTests/*/main.cxx: Change entry point name to be consistent
+ with with entry point naming conventions introduced in NuttX
+ 6.22.
+ * Kconfig: Added a mconfig configuration file. Eventually, NxWidgets
+ needs to get hooked into the NuttX mconf configuration. Still not
+ exactly sure how to do that.
+ * libnxwidgets/Makefile and NxWidgets/nxwm/Makefile: Need updates
+ for consistency with recent changes to NuttX build system (>= 6.22)
+ * Kconfig: Add option to turn on the memory monitor feature of the
+ NxWidgets/NxWM unit tests.
pascal-3.0 2011-05-15 Gregory Nutt <gnutt@nuttx.org>
diff --git a/nuttx/ReleaseNotes b/nuttx/ReleaseNotes
index 4d72116694..80362f5ddc 100644
--- a/nuttx/ReleaseNotes
+++ b/nuttx/ReleaseNotes
@@ -3063,3 +3063,107 @@ Bugfixes (see the change log for details) :
for C++
As well as other, less critical bugs (see the ChangeLog for details)
+
+NuttX-6.22
+^^^^^^^^^^
+
+The 89th release of NuttX, Version 6.22, was made on September 29, 2012,
+and is available for download from the SourceForge website. Note
+that release consists of two tarballs: nuttx-6.22.tar.gz and
+apps-6.22.tar.gz. Both may be needed (see the top-level nuttx/README.txt
+file for build information).
+
+This release corresponds with SVN release number: r5206
+
+Note that all SVN information has been stripped from the tarballs. If you
+need the SVN configuration, you should check out directly from SVN. Revision
+r5206 should equivalent to release 6.22 of NuttX 6.22:
+
+ svn checkout -r5206 svn://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
+
+Or
+
+ svn checkout -r5206 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
+
+Additional new features and extended functionality:
+
+ * RTOS: Application entry point is no longer user_start, but can be
+ configured using CONFIG_USER_ENTRYPOINT. NuttX now supports two work
+ queues: A lower priority work queue (for extended processing) and a
+ higher priority work queue (for quick, high priority operations).
+
+ * Memory Management: Added a new granule-based allocated that can be
+ used to manage, aligned and quantized DMA memory.
+
+ * File System: Add hooks to allocate I/O memory with and external
+ allocated (need if required by DMA).
+
+ * Networking: ENC28J60 driver is (finally) verified.
+
+ * Drivers: Add hooks USB device drivers to allocate I/O memory with and
+ external allocated (need if required by DMA). Driver for the Windbond
+ SPI FLASH family (W25x16, W25x32, W25x64, and others). ADS7843E driver
+ extended for TSC2046 and XPT2046 and verified.
+
+ * ARMv7-M: Added logic to reset the MCU using the NVIC.
+
+ * STM32: Add support for STM32F103VET6.
+
+ * STM32 Drivers: Add logic to re-initialize UARTs a second time to
+ enable DMA (Mike Smith). I2C driver error recovery (Mike Smith).
+
+ * STM32 boards: Support for USB host added add to several configurations
+ (or at least explained in README files). Support for the Shenzhou
+ STM32F107 board (see www.armjishu.com). Support for M3 Wildfire
+ STM32F103 board (v2 and v3).
+
+ * Build System: Kconfig string de-quoting logic. Remove comments from
+ defconfig files (Kate). Add tool to create NuttX-style symbol tables.
+ Numerous changes to configuration logic as needed for the new mconf-based
+ configuration (much of this from Richard Cochran). Refactor common
+ Make.defs logic into tools/Config.mk (Richard Cochran).
+
+ * Library: Configurable terse output from strerror(). Added perror() (Kate).
+ Add %n format to sscanf() (Kate).
+
+ * Applications: Numerous changes and extensions to the old uIP web server
+ (from Kate and Max Holtzberg, see the ChangeLog for specific extensions).
+ UDP network discovery utility (Max Holtzberg). Embeddable Lightweight
+ XML-RPC Server (http://www.drdobbs.com/web-development/an-embeddable-lightweight-xml-rpc-server/184405364, Max Holtzberg).
+
+Bugfixes (see the change log for details). Some of these are very important
+(marked *critical*):
+
+ * RTOS: Fixes to priority inheritance logic (*critical*). waitpid()
+ critical section. Assertion in work_cancel() (Mike Smith). mmap() (Kate).
+
+ * FAT File System: Improper Boolean expression caused un-necessary writes
+ and performance issues (*critical*, Ronen Vainish).
+
+ * Networking: Remove an un-necessary delay from recvfrom(). This greatly
+ improves network performance (*critical*, Max Holtzberg).
+
+ * Graphics: NX parameter checking errors.
+
+ * Drivers: Fix double release of memory in SDIO-based, MMC/SD driver
+ (Ronen Vainish).
+
+ * LPC17xx: Ethernet driver fixes needed for certain PHYs (Kate).
+
+ * AVR: Fix build error (Richard Cochran).
+
+ * STM32: USB OTG FS host driver NAKing an retries. Power management
+ compilation errors (Diego Sanchez). Missing SPI3 remap logic.
+
+ * STM32 Drivers: Fix for Ethernet errata for STM32F107 (*critical*).
+ Ethernet buffer alignment check. Add "kludge" to Ethernet driver to
+ handle DM9161 PHY which (at least on the Shenzhou board), sometimes
+ does not come up correctly.
+
+ * Applications: THTTPD (Kate). NSH ping when IP address is on a different
+ network (Darcy Gong).
+
+ * Library: fread(), fflush(), fdopen(): Fix error handling logic (Ronen
+ Vainish). Fix some field-width handling issues in sscanf()
+
+As well as other, less critical bugs (see the ChangeLog for details)
From 96a334a758bbdc466ba8ae0cb20f2f79958623ec Mon Sep 17 00:00:00 2001
From: patacongo
Date: Sat, 29 Sep 2012 20:34:25 +0000
Subject: [PATCH 10/43] Implementation of /dev/random using the STM32 Random
Number Generator (RNG)
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5207 42af7a65-404d-4744-a932-0658087f49c3
---
nuttx/ChangeLog | 4 +
nuttx/arch/arm/src/common/up_initialize.c | 6 +
nuttx/arch/arm/src/common/up_internal.h | 6 +
nuttx/arch/arm/src/stm32/Kconfig | 1 +
nuttx/arch/arm/src/stm32/Make.defs | 6 +-
nuttx/arch/arm/src/stm32/chip/stm32_rng.h | 77 +++++++
nuttx/arch/arm/src/stm32/stm32_rng.c | 264 ++++++++++++++++++++++
nuttx/configs/stm3240g-eval/README.txt | 11 +-
nuttx/configs/stm3240g-eval/nsh/defconfig | 4 +-
nuttx/configs/stm3240g-eval/src/Makefile | 4 +-
nuttx/drivers/Kconfig | 8 +
11 files changed, 385 insertions(+), 6 deletions(-)
create mode 100644 nuttx/arch/arm/src/stm32/chip/stm32_rng.h
create mode 100644 nuttx/arch/arm/src/stm32/stm32_rng.c
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index ef9e771325..55a06aeecd 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -3454,3 +3454,7 @@
going outside of local network. Submitted by Darcy Gong
6.23 2012-09-29 Gregory Nutt
+
+ * arch/arm/src/stm32/stm32_rng.c, chip/stm32_rng.h, and other files:
+ Implementation of /dev/random using the STM32 Random Number
+ Generator (RNG).
diff --git a/nuttx/arch/arm/src/common/up_initialize.c b/nuttx/arch/arm/src/common/up_initialize.c
index 094835c293..80f9b1193b 100644
--- a/nuttx/arch/arm/src/common/up_initialize.c
+++ b/nuttx/arch/arm/src/common/up_initialize.c
@@ -171,6 +171,12 @@ void up_initialize(void)
ramlog_consoleinit();
#endif
+ /* Initialize the Random Number Generator (RNG) */
+
+#ifdef CONFIG_DEV_RANDOM
+ up_rnginitialize();
+#endif
+
/* Initialize the system logging device */
#ifdef CONFIG_SYSLOG_CHAR
diff --git a/nuttx/arch/arm/src/common/up_internal.h b/nuttx/arch/arm/src/common/up_internal.h
index 42142c5e86..0d3c5b1f2f 100644
--- a/nuttx/arch/arm/src/common/up_internal.h
+++ b/nuttx/arch/arm/src/common/up_internal.h
@@ -373,6 +373,12 @@ extern void up_usbuninitialize(void);
# define up_usbuninitialize()
#endif
+/* Random Number Generator (RNG) ********************************************/
+
+#ifdef CONFIG_DEV_RANDOM
+extern void up_rnginitialize(void);
+#endif
+
/****************************************************************************
* Name: up_check_stack
*
diff --git a/nuttx/arch/arm/src/stm32/Kconfig b/nuttx/arch/arm/src/stm32/Kconfig
index fe89119a48..2f91002360 100644
--- a/nuttx/arch/arm/src/stm32/Kconfig
+++ b/nuttx/arch/arm/src/stm32/Kconfig
@@ -320,6 +320,7 @@ config STM32_RNG
bool "RNG"
default n
depends on STM32_STM32F20XX || STM32_STM32F40XX
+ select ARCH_HAVE_RNG
config STM32_SDIO
bool "SDIO"
diff --git a/nuttx/arch/arm/src/stm32/Make.defs b/nuttx/arch/arm/src/stm32/Make.defs
index e529629775..ef14b48c14 100644
--- a/nuttx/arch/arm/src/stm32/Make.defs
+++ b/nuttx/arch/arm/src/stm32/Make.defs
@@ -78,7 +78,7 @@ endif
ifeq ($(CONFIG_USBHOST),y)
ifeq ($(CONFIG_STM32_OTGFS),y)
-CMN_CSRCS += stm32_otgfshost.c
+CMN_CSRCS += stm32_otgfshost.c
endif
endif
@@ -119,6 +119,10 @@ ifeq ($(CONFIG_DAC),y)
CHIP_CSRCS += stm32_dac.c
endif
+ifeq ($(CONFIG_DEV_RANDOM),y)
+CHIP_CSRCS += stm32_rng.c
+endif
+
ifeq ($(CONFIG_PWM),y)
CHIP_CSRCS += stm32_pwm.c
endif
diff --git a/nuttx/arch/arm/src/stm32/chip/stm32_rng.h b/nuttx/arch/arm/src/stm32/chip/stm32_rng.h
new file mode 100644
index 0000000000..5e31d58174
--- /dev/null
+++ b/nuttx/arch/arm/src/stm32/chip/stm32_rng.h
@@ -0,0 +1,77 @@
+/************************************************************************************
+ * arch/arm/src/stm32/chip/stm32_rng.h
+ *
+ * Copyright (C) 2012 Max Holtzberg. All rights reserved.
+ * Author: Max Holtzberg
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ************************************************************************************/
+
+#ifndef __ARCH_ARM_STC_STM32_CHIP_STM32_RNG_H
+#define __ARCH_ARM_STC_STM32_CHIP_STM32_RNG_H
+
+/************************************************************************************
+ * Included Files
+ ************************************************************************************/
+
+#include
+#include "chip.h"
+
+/************************************************************************************
+ * Pre-processor Definitions
+ ************************************************************************************/
+
+/* Register Offsets *****************************************************************/
+
+#define STM32_RNG_CR_OFFSET 0x0000 /* RNG Control Register */
+#define STM32_RNG_SR_OFFSET 0x0004 /* RNG Status Register */
+#define STM32_RNG_DR_OFFSET 0x0008 /* RNG Data Register */
+
+/* Register Addresses ***************************************************************/
+
+#define STM32_RNG_CR (STM32_RNG_BASE+STM32_RNG_CR_OFFSET)
+#define STM32_RNG_SR (STM32_RNG_BASE+STM32_RNG_SR_OFFSET)
+#define STM32_RNG_DR (STM32_RNG_BASE+STM32_RNG_DR_OFFSET)
+
+/* Register Bitfield Definitions ****************************************************/
+
+/* RNG Control Register */
+
+#define RNG_CR_RNGEN (1 << 2) /* Bit 2: RNG enable */
+#define RNG_CR_IE (1 << 3) /* Bit 3: Interrupt enable */
+
+/* RNG Status Register */
+
+#define RNG_SR_DRDY (1 << 0) /* Bit 0: Data ready */
+#define RNG_SR_CECS (1 << 1) /* Bit 1: Clock error current status */
+#define RNG_SR_SECS (1 << 2) /* Bit 2: Seed error current status */
+#define RNG_SR_CEIS (1 << 5) /* Bit 5: Clock error interrupt status */
+#define RNG_SR_SEIS (1 << 6) /* Bit 6: Seed error interrupt status */
+
+#endif /* __ARCH_ARM_STC_STM32_CHIP_STM32_RNG_H */
diff --git a/nuttx/arch/arm/src/stm32/stm32_rng.c b/nuttx/arch/arm/src/stm32/stm32_rng.c
new file mode 100644
index 0000000000..38e8108fee
--- /dev/null
+++ b/nuttx/arch/arm/src/stm32/stm32_rng.c
@@ -0,0 +1,264 @@
+/****************************************************************************
+ * arch/arm/src/stm32/stm32_rng.c
+ *
+ * Copyright (C) 2012 Max Holtzberg. All rights reserved.
+ * Author: Max Holtzberg
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+
+#include "up_arch.h"
+#include "chip/stm32_rng.h"
+#include "up_internal.h"
+
+/****************************************************************************
+ * Private Function Prototypes
+ ****************************************************************************/
+
+static int stm32_rnginitialize(void);
+static int stm32_interrupt(int irq, void *context);
+static void stm32_enable(void);
+static void stm32_disable(void);
+static ssize_t stm32_read(struct file *filep, char *buffer, size_t);
+
+/****************************************************************************
+ * Private Types
+ ****************************************************************************/
+
+struct rng_dev_s
+{
+ sem_t rd_devsem; /* Threads can only exclusively access the RNG */
+ sem_t rd_readsem; /* To block until the buffer is filled */
+ char *rd_buf;
+ size_t rd_buflen;
+ uint32_t rd_lastval;
+ bool rd_first;
+};
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+static struct rng_dev_s g_rngdev;
+
+static const struct file_operations g_rngops =
+{
+ 0, /* open */
+ 0, /* close */
+ stm32_read, /* read */
+ 0, /* write */
+ 0, /* seek */
+ 0 /* ioctl */
+#ifndef CONFIG_DISABLE_POLL
+ ,0 /* poll */
+#endif
+};
+
+/****************************************************************************
+ * Private functions
+ ****************************************************************************/
+
+static int stm32_rnginitialize()
+{
+ uint32_t regval;
+
+ vdbg("Initializing RNG\n");
+
+ memset(&g_rngdev, 0, sizeof(struct rng_dev_s));
+
+ sem_init(&g_rngdev.rd_devsem, 0, 1);
+
+ if (irq_attach(STM32_IRQ_RNG, stm32_interrupt))
+ {
+ /* We could not attach the ISR to the interrupt */
+
+ vdbg("Could not attach IRQ.\n");
+
+ return -EAGAIN;
+ }
+
+ /* Enable interrupts */
+
+ regval = getreg32(STM32_RNG_CR);
+ regval |= RNG_CR_IE;
+ putreg32(regval, STM32_RNG_CR);
+
+ up_enable_irq(STM32_IRQ_RNG);
+
+ return OK;
+}
+
+static void stm32_enable()
+{
+ uint32_t regval;
+
+ g_rngdev.rd_first = true;
+
+ regval = getreg32(STM32_RNG_CR);
+ regval |= RNG_CR_RNGEN;
+ putreg32(regval, STM32_RNG_CR);
+}
+
+static void stm32_disable()
+{
+ uint32_t regval;
+ regval = getreg32(STM32_RNG_CR);
+ regval &= ~RNG_CR_RNGEN;
+ putreg32(regval, STM32_RNG_CR);
+}
+
+static int stm32_interrupt(int irq, void *context)
+{
+ uint32_t rngsr;
+ uint32_t data;
+
+ rngsr = getreg32(STM32_RNG_SR);
+
+ if ((rngsr & (RNG_SR_SEIS | RNG_SR_CEIS)) /* Check for error bits */
+ || !(rngsr & RNG_SR_DRDY)) /* Data ready must be set */
+ {
+ /* This random value is not valid, we will try again. */
+
+ return OK;
+ }
+
+ data = getreg32(STM32_RNG_DR);
+
+ /* As required by the FIPS PUB (Federal Information Processing Standard
+ * Publication) 140-2, the first random number generated after setting the
+ * RNGEN bit should not be used, but saved for comparison with the next
+ * generated random number. Each subsequent generated random number has to be
+ * compared with the previously generated number. The test fails if any two
+ * compared numbers are equal (continuous random number generator test).
+ */
+
+ if (g_rngdev.rd_first)
+ {
+ g_rngdev.rd_first = false;
+ g_rngdev.rd_lastval = data;
+ return OK;
+ }
+
+ if (g_rngdev.rd_lastval == data)
+ {
+ /* Two subsequent same numbers, we will try again. */
+
+ return OK;
+ }
+
+ /* If we get here, the random number is valid. */
+
+ g_rngdev.rd_lastval = data;
+
+ if (g_rngdev.rd_buflen >= 4)
+ {
+ g_rngdev.rd_buflen -= 4;
+ *(uint32_t*)&g_rngdev.rd_buf[g_rngdev.rd_buflen] = data;
+ }
+ else
+ {
+ while (g_rngdev.rd_buflen > 0)
+ {
+ g_rngdev.rd_buf[--g_rngdev.rd_buflen] = (char)data;
+ data >>= 8;
+ }
+ }
+
+ if (g_rngdev.rd_buflen == 0)
+ {
+ /* Buffer filled, stop further interrupts. */
+
+ stm32_disable();
+ sem_post(&g_rngdev.rd_readsem);
+ }
+
+ return OK;
+}
+
+/****************************************************************************
+ * Name: stm32_read
+ ****************************************************************************/
+
+static ssize_t stm32_read(struct file *filep, char *buffer, size_t buflen)
+{
+ if (sem_wait(&g_rngdev.rd_devsem) != OK)
+ {
+ return -errno;
+ }
+ else
+ {
+ /* We've got the semaphore. */
+
+ /* Initialize semaphore with 0 for blocking until the buffer is filled from
+ * interrupts.
+ */
+
+ sem_init(&g_rngdev.rd_readsem, 0, 1);
+
+ g_rngdev.rd_buflen = buflen;
+ g_rngdev.rd_buf = buffer;
+
+ /* Enable RNG with interrupts */
+
+ stm32_enable();
+
+ /* Wait until the buffer is filled */
+
+ sem_wait(&g_rngdev.rd_readsem);
+
+ /* Free RNG for next use */
+
+ sem_post(&g_rngdev.rd_devsem);
+
+ return buflen;
+ }
+}
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+void up_rnginitialize()
+{
+ stm32_rnginitialize();
+ register_driver("/dev/random", &g_rngops, 0444, NULL);
+}
diff --git a/nuttx/configs/stm3240g-eval/README.txt b/nuttx/configs/stm3240g-eval/README.txt
index df98f087d5..b536097a88 100644
--- a/nuttx/configs/stm3240g-eval/README.txt
+++ b/nuttx/configs/stm3240g-eval/README.txt
@@ -1110,7 +1110,16 @@ Where is one of the following:
nsh> umount /mnt/stuff
- 11. This configuration requires that jumper JP22 be set to enable RS-232
+ 11. By default, this configuration supports /dev/random using the STM32's
+ RNG hardware. This can be disabled as follows:
+
+ -CONFIG_STM32_RNG=y
+ +CONFIG_STM32_RNG=n
+
+ -CONFIG_DEV_RANDOM=y
+ +CONFIG_DEV_RANDOM=n
+
+ 12. This configuration requires that jumper JP22 be set to enable RS-232
operation.
nsh2:
diff --git a/nuttx/configs/stm3240g-eval/nsh/defconfig b/nuttx/configs/stm3240g-eval/nsh/defconfig
index 80f5ec167c..653538b45a 100644
--- a/nuttx/configs/stm3240g-eval/nsh/defconfig
+++ b/nuttx/configs/stm3240g-eval/nsh/defconfig
@@ -69,7 +69,6 @@ CONFIG_STM32_BUILDROOT=n
#
# JTAG Enable settings (by default JTAG-DP and SW-DP are disabled):
#
-CONFIG_STM32_DFU=y
CONFIG_STM32_JTAG_FULL_ENABLE=y
CONFIG_STM32_JTAG_NOJNTRST_ENABLE=n
CONFIG_STM32_JTAG_SW_ENABLE=n
@@ -100,7 +99,7 @@ CONFIG_STM32_OTGHS=n
CONFIG_STM32_DCMI=n
CONFIG_STM32_CRYP=n
CONFIG_STM32_HASH=n
-CONFIG_STM32_RNG=n
+CONFIG_STM32_RNG=y
CONFIG_STM32_OTGFS=n
# AHB3:
CONFIG_STM32_FSMC=n
@@ -306,6 +305,7 @@ CONFIG_SCHED_WORKSTACKSIZE=2048
CONFIG_SIG_SIGWORK=4
CONFIG_SCHED_WAITPID=y
CONFIG_SCHED_ATEXIT=n
+CONFIG_DEV_RANDOM=y
#
# System Logging
diff --git a/nuttx/configs/stm3240g-eval/src/Makefile b/nuttx/configs/stm3240g-eval/src/Makefile
index 80225ea1fb..ffcf719aba 100644
--- a/nuttx/configs/stm3240g-eval/src/Makefile
+++ b/nuttx/configs/stm3240g-eval/src/Makefile
@@ -100,8 +100,8 @@ OBJS = $(AOBJS) $(COBJS)
ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
ifeq ($(WINTOOL),y)
CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}" \
- -I "${shell cygpath -w $(ARCH_SRCDIR)/common}" \
- -I "${shell cygpath -w $(ARCH_SRCDIR)/armv7-m}"
+ -I "${shell cygpath -w $(ARCH_SRCDIR)/common}" \
+ -I "${shell cygpath -w $(ARCH_SRCDIR)/armv7-m}"
else
CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(ARCH_SRCDIR)/armv7-m
endif
diff --git a/nuttx/drivers/Kconfig b/nuttx/drivers/Kconfig
index ea218a5925..1d263ec145 100644
--- a/nuttx/drivers/Kconfig
+++ b/nuttx/drivers/Kconfig
@@ -11,6 +11,14 @@ config DEV_ZERO
bool "Enable /dev/zero"
default n
+config ARCH_HAVE_RNG
+ bool
+
+config DEV_RANDOM
+ bool "Enable /dev/random"
+ default n
+ depends on ARCH_HAVE_RNG
+
config LOOP
bool "Enable loop device"
default n
From 14b3f41aa6613f94616d7d6bcba5454c7f8caf8a Mon Sep 17 00:00:00 2001
From: patacongo
Date: Wed, 3 Oct 2012 23:36:54 +0000
Subject: [PATCH 11/43] Delete the apps/vsn directory (moved commands to
apps/system)
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5208 42af7a65-404d-4744-a932-0658087f49c3
---
apps/ChangeLog.txt | 3 +
apps/Kconfig | 4 -
apps/Makefile | 3 +-
apps/README.txt | 2 +-
apps/system/Kconfig | 20 +-
apps/system/Make.defs | 17 +
apps/system/Makefile | 2 +-
apps/system/free/free.c | 82 +--
apps/system/install/install.c | 626 +++++++++++++----------
apps/system/poweroff/Kconfig | 16 +
apps/{vsn => system}/poweroff/Makefile | 2 +-
apps/{vsn => system}/poweroff/README.txt | 0
apps/{vsn => system}/poweroff/poweroff.c | 39 +-
apps/{vsn => system}/ramtron/Kconfig | 8 +-
apps/{vsn => system}/ramtron/Makefile | 2 +-
apps/{vsn => system}/ramtron/README.txt | 0
apps/{vsn => system}/ramtron/ramtron.c | 19 +-
apps/{vsn => system}/sdcard/Kconfig | 4 +-
apps/{vsn => system}/sdcard/Makefile | 2 +-
apps/{vsn => system}/sdcard/README.txt | 0
apps/{vsn => system}/sdcard/sdcard.c | 93 ++--
apps/{vsn => system}/sysinfo/Kconfig | 5 +-
apps/{vsn => system}/sysinfo/Makefile | 2 +-
apps/{vsn => system}/sysinfo/README.txt | 0
apps/{vsn => system}/sysinfo/sysinfo.c | 38 +-
apps/vsn/Kconfig | 11 -
apps/vsn/Make.defs | 51 --
apps/vsn/Makefile | 71 ---
apps/vsn/poweroff/Kconfig | 14 -
nuttx/Documentation/NuttX.html | 2 +-
30 files changed, 572 insertions(+), 566 deletions(-)
create mode 100644 apps/system/poweroff/Kconfig
rename apps/{vsn => system}/poweroff/Makefile (99%)
rename apps/{vsn => system}/poweroff/README.txt (100%)
rename apps/{vsn => system}/poweroff/poweroff.c (64%)
rename apps/{vsn => system}/ramtron/Kconfig (55%)
rename apps/{vsn => system}/ramtron/Makefile (99%)
rename apps/{vsn => system}/ramtron/README.txt (100%)
rename apps/{vsn => system}/ramtron/ramtron.c (92%)
rename apps/{vsn => system}/sdcard/Kconfig (84%)
rename apps/{vsn => system}/sdcard/Makefile (99%)
rename apps/{vsn => system}/sdcard/README.txt (100%)
rename apps/{vsn => system}/sdcard/sdcard.c (65%)
rename apps/{vsn => system}/sysinfo/Kconfig (84%)
rename apps/{vsn => system}/sysinfo/Makefile (99%)
rename apps/{vsn => system}/sysinfo/README.txt (100%)
rename apps/{vsn => system}/sysinfo/sysinfo.c (75%)
delete mode 100644 apps/vsn/Kconfig
delete mode 100644 apps/vsn/Make.defs
delete mode 100644 apps/vsn/Makefile
delete mode 100644 apps/vsn/poweroff/Kconfig
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt
index 75f02754b5..2d7b2eb9f5 100644
--- a/apps/ChangeLog.txt
+++ b/apps/ChangeLog.txt
@@ -350,3 +350,6 @@
feature of the NxWidgets/NxWM unit tests.
6.23 2012-xx-xx Gregory Nutt
+
+ * vsn: Moved all NSH commands from vsn/ to system/. Deleted the vsn/
+ directory.
diff --git a/apps/Kconfig b/apps/Kconfig
index 5543ba72dd..ea9bd2d314 100644
--- a/apps/Kconfig
+++ b/apps/Kconfig
@@ -34,7 +34,3 @@ endmenu
menu "System NSH Add-Ons"
source "$APPSDIR/system/Kconfig"
endmenu
-
-menu "VSN board Add-Ons"
-source "$APPSDIR/vsn/Kconfig"
-endmenu
diff --git a/apps/Makefile b/apps/Makefile
index 3a59fd6b44..d2b0ecdab5 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -49,7 +49,7 @@ APPDIR = ${shell pwd}
# list can be extended by the .config file as well
CONFIGURED_APPS =
-SUBDIRS = examples graphics interpreters modbus namedapp nshlib netutils system vsn
+SUBDIRS = examples graphics interpreters modbus namedapp nshlib netutils system
# There are two different mechanisms for obtaining the list of configured
# directories:
@@ -78,7 +78,6 @@ include namedapp/Make.defs
include netutils/Make.defs
include nshlib/Make.defs
include system/Make.defs
-include vsn/Make.defs
# INSTALLED_APPS is the list of currently available application directories. It
# is the same as CONFIGURED_APPS, but filtered to exclude any non-existent
diff --git a/apps/README.txt b/apps/README.txt
index f9c9ececd7..7a379254e7 100644
--- a/apps/README.txt
+++ b/apps/README.txt
@@ -107,7 +107,7 @@ NuttX is configured. .config is included in the toplevel apps/Makefile.
As a minimum, this configuration file must define files to add to the
CONFIGURED_APPS list like:
- CONFIGURED_APPS += examples/hello vsn/poweroff
+ CONFIGURED_APPS += examples/hello system/poweroff
Named Start-Up main() function
------------------------------
diff --git a/apps/system/Kconfig b/apps/system/Kconfig
index 44bf5a2e64..d4d4346652 100644
--- a/apps/system/Kconfig
+++ b/apps/system/Kconfig
@@ -3,7 +3,7 @@
# see misc/tools/kconfig-language.txt.
#
-menu "Custom free memory command"
+menu "Custom Free Memory Command"
source "$APPSDIR/system/free/Kconfig"
endmenu
@@ -15,6 +15,22 @@ menu "FLASH Program Installation"
source "$APPSDIR/system/install/Kconfig"
endmenu
-menu "readline() support"
+menu "readline()"
source "$APPSDIR/system/readline/Kconfig"
endmenu
+
+menu "Power Off"
+source "$APPSDIR/system/poweroff/Kconfig"
+endmenu
+
+menu "RAMTRON"
+source "$APPSDIR/system/ramtron/Kconfig"
+endmenu
+
+menu "SD Card"
+source "$APPSDIR/system/sdcard/Kconfig"
+endmenu
+
+menu "Sysinfo"
+source "$APPSDIR/system/sysinfo/Kconfig"
+endmenu
diff --git a/apps/system/Make.defs b/apps/system/Make.defs
index a4aea2d318..3d10f84e55 100644
--- a/apps/system/Make.defs
+++ b/apps/system/Make.defs
@@ -49,3 +49,20 @@ endif
ifeq ($(CONFIG_SYSTEM_READLINE),y)
CONFIGURED_APPS += system/readline
endif
+
+ifeq ($(CONFIG_SYSTEM_POWEROFF),y)
+CONFIGURED_APPS += system/poweroff
+endif
+
+ifeq ($(CONFIG_SYSTEM_RAMTRON),y)
+CONFIGURED_APPS += system/ramtron
+endif
+
+ifeq ($(CONFIG_SYSTEM_SDCARD),y)
+CONFIGURED_APPS += system/sdcard
+endif
+
+ifeq ($(CONFIG_SYSTEM_SYSINFO),y)
+CONFIGURED_APPS += system/sysinfo
+endif
+
diff --git a/apps/system/Makefile b/apps/system/Makefile
index 73eb60d152..d64bb54c6e 100644
--- a/apps/system/Makefile
+++ b/apps/system/Makefile
@@ -37,7 +37,7 @@
# Sub-directories containing system task
-SUBDIRS = free i2c install readline
+SUBDIRS = free i2c install readline poweroff ramtron sdcard sysinfo
# Create the list of installed runtime modules (INSTALLED_DIRS)
diff --git a/apps/system/free/free.c b/apps/system/free/free.c
index 3d9698ecbe..c44cd5e225 100644
--- a/apps/system/free/free.c
+++ b/apps/system/free/free.c
@@ -33,57 +33,65 @@
*
****************************************************************************/
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
#include
#include
#include
#include
-
/****************************************************************************
* Private Functions
****************************************************************************/
-
-/* \todo Max block size only works on uniform prog mem */
-
-void free_getprogmeminfo(struct mallinfo * mem)
-{
- uint16_t page = 0, stpage = 0xFFFF;
- uint16_t pagesize = 0;
- int status;
-
- mem->arena = 0;
- mem->fordblks = 0;
- mem->uordblks = 0;
- mem->mxordblk = 0;
-
- for (status=0, page=0; status >= 0; page++) {
-
- status = up_progmem_ispageerased(page);
- pagesize = up_progmem_pagesize(page);
-
- mem->arena += pagesize;
-
- /* Is this beginning of new free space section */
- if (status == 0) {
- if (stpage == 0xFFFF) stpage = page;
- mem->fordblks += pagesize;
- }
- else if (status != 0) {
- mem->uordblks += pagesize;
- if (stpage != 0xFFFF && up_progmem_isuniform()) {
- stpage = page - stpage;
- if (stpage > mem->mxordblk)
- mem->mxordblk = stpage;
- stpage = 0xFFFF;
+/* TODO Max block size only works on uniform prog mem */
+
+static void free_getprogmeminfo(struct mallinfo * mem)
+{
+ uint16_t page = 0, stpage = 0xFFFF;
+ uint16_t pagesize = 0;
+ int status;
+
+ mem->arena = 0;
+ mem->fordblks = 0;
+ mem->uordblks = 0;
+ mem->mxordblk = 0;
+
+ for (status=0, page=0; status >= 0; page++)
+ {
+ status = up_progmem_ispageerased(page);
+ pagesize = up_progmem_pagesize(page);
+
+ mem->arena += pagesize;
+
+ /* Is this beginning of new free space section */
+
+ if (status == 0)
+ {
+ if (stpage == 0xFFFF) stpage = page;
+ mem->fordblks += pagesize;
+ }
+ else if (status != 0)
+ {
+ mem->uordblks += pagesize;
+
+ if (stpage != 0xFFFF && up_progmem_isuniform())
+ {
+ stpage = page - stpage;
+ if (stpage > mem->mxordblk)
+ {
+ mem->mxordblk = stpage;
+ }
+ stpage = 0xFFFF;
}
}
}
-
- mem->mxordblk *= pagesize;
-}
+ mem->mxordblk *= pagesize;
+}
/****************************************************************************
* Public Functions
diff --git a/apps/system/install/install.c b/apps/system/install/install.c
index 2f11c64340..fd14b7a6f2 100644
--- a/apps/system/install/install.c
+++ b/apps/system/install/install.c
@@ -33,6 +33,10 @@
*
****************************************************************************/
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
#include
#include
#include
@@ -43,9 +47,8 @@
#include
#include
-
/****************************************************************************
- * Definitions
+ * Pre-processor Definitions
****************************************************************************/
#define ACTION_INSTALL 0x01
@@ -55,12 +58,11 @@
#define INSTALL_PROGRAMBLOCKSIZE 1024
-
/****************************************************************************
* Private data
****************************************************************************/
-const char *install_help =
+static const char *install_help =
"Installs XIP program into flash and creates a start-up script in the\n"
"destination directory.\n\n"
"Usage:\t%s [options] source-file.xip destination-directory\n\n"
@@ -72,341 +74,397 @@ const char *install_help =
"\t--force\t\t\tReplaces existing installation\n"
"\t--start \t\tInstalls application at or after \n"
"\t--margin \tLeave some free space after the kernel (default 16)\n";
-
-const char *install_script_text =
+
+static const char *install_script_text =
"# XIP stacksize=%x priority=%x size=%x\n";
-
-const char *install_script_exec =
+
+static const char *install_script_exec =
"exec 0x%x\n";
-
-
+
/****************************************************************************
* Private functions
****************************************************************************/
-int install_getstartpage(int startpage, int pagemargin, int desiredsize)
+static int install_getstartpage(int startpage, int pagemargin, int desiredsize)
{
- uint16_t page = 0, stpage = 0xFFFF;
- uint16_t pagesize = 0;
- int maxlen = -1;
- int maxlen_start = 0xFFFF;
- int status;
-
- for (status=0, page=0; status >= 0; page++) {
-
- status = up_progmem_ispageerased(page);
- pagesize = up_progmem_pagesize(page);
-
- /* Is this beginning of new free space section */
- if (status == 0) {
- if (stpage == 0xFFFF) stpage = page;
+ uint16_t page = 0, stpage = 0xffff;
+ uint16_t pagesize = 0;
+ int maxlen = -1;
+ int maxlen_start = 0xffff;
+ int status;
+
+ for (status=0, page=0; status >= 0; page++)
+ {
+ status = up_progmem_ispageerased(page);
+ pagesize = up_progmem_pagesize(page);
+
+ /* Is this beginning of new free space section */
+
+ if (status == 0)
+ {
+ if (stpage == 0xffff) stpage = page;
}
- else if (status != 0) {
+ else if (status != 0)
+ {
+ if (stpage != 0xffff)
+ {
+ if ((page - stpage) > maxlen)
+ {
+ if (maxlen==-1)
+ {
+ /* First time found sth? */
- if (stpage != 0xFFFF) {
-
- if ( (page - stpage) > maxlen) {
+ stpage += pagemargin;
+ maxlen = 0;
+ }
- if (maxlen==-1) { /* First time found sth? */
- stpage += pagemargin;
- maxlen = 0;
+ if(stpage < startpage)
+ {
+ stpage = startpage;
}
-
- if(stpage < startpage)
- stpage = startpage;
-
- if (page > stpage) {
- maxlen = page - stpage;
- maxlen_start = stpage;
+
+ if (page > stpage)
+ {
+ maxlen = page - stpage;
+ maxlen_start = stpage;
}
-
- if (maxlen*pagesize >= desiredsize) {
- /* printf("Found page at %d ... %d\n", stpage, page); */
- return maxlen_start*pagesize;
+
+ if (maxlen*pagesize >= desiredsize)
+ {
+ /* printf("Found page at %d ... %d\n", stpage, page); */
+ return maxlen_start*pagesize;
}
}
-
- stpage = 0xFFFF;
+
+ stpage = 0xffff;
}
}
}
-
- /* Requested space is not available */
-
- return -1;
+
+ /* Requested space is not available */
+
+ return -1;
}
-
-int install_programflash(int startaddr, const char *source)
+static int install_programflash(int startaddr, const char *source)
{
- int status;
- int count;
- int totalsize = 0;
- char *buf;
- FILE *fp;
-
- if ( (buf = malloc(INSTALL_PROGRAMBLOCKSIZE)) == NULL )
- return -errno;
-
- if ( (fp=fopen(source, "r")) ) {
- do {
- count = fread(buf, 1, INSTALL_PROGRAMBLOCKSIZE, fp);
-
- if ( (status = up_progmem_write(startaddr, buf, count)) < 0) {
- totalsize = status;
- break;
- }
-
- startaddr += count;
- totalsize += count;
- }
- while(count);
+ int status;
+ int count;
+ int totalsize = 0;
+ char *buf;
+ FILE *fp;
+
+ if ((buf = malloc(INSTALL_PROGRAMBLOCKSIZE)) == NULL)
+ {
+ return -ENOMEM;
}
- else totalsize = -errno;
-
- fclose(fp);
- free(buf);
-
- return totalsize;
+
+ if ((fp = fopen(source, "r")))
+ {
+ do
+ {
+ count = fread(buf, 1, INSTALL_PROGRAMBLOCKSIZE, fp);
+
+ if ((status = up_progmem_write(startaddr, buf, count)) < 0)
+ {
+ totalsize = status;
+ break;
+ }
+
+ startaddr += count;
+ totalsize += count;
+ }
+ while(count);
+ }
+ else
+ {
+ totalsize = -errno;
+ }
+
+ fclose(fp);
+ free(buf);
+
+ return totalsize;
}
-
-void install_getscriptname(char *scriptname, const char *progname, const char *destdir)
+static void install_getscriptname(char *scriptname, const char *progname, const char *destdir)
{
- const char * progonly;
+ const char * progonly;
- /* I.e. as /usr/bin */
- strcpy(scriptname, destdir);
-
- /* extract from i.e. /sdcard/demo -> /demo, together with / */
- progonly = strrchr(progname, '/');
- strcat(scriptname, progonly);
+ /* I.e. as /usr/bin */
+
+ strcpy(scriptname, destdir);
+
+ /* extract from i.e. /sdcard/demo -> /demo, together with / */
+
+ progonly = strrchr(progname, '/');
+ strcat(scriptname, progonly);
}
-
-int install_getprogsize(const char *progname)
+static int install_getprogsize(const char *progname)
{
- struct stat fileinfo;
-
- if ( stat(progname, &fileinfo) < 0 )
- return -1;
-
- return fileinfo.st_size;
+ struct stat fileinfo;
+
+ if (stat(progname, &fileinfo) < 0)
+ {
+ return -1;
+ }
+
+ return fileinfo.st_size;
}
-
-int install_alreadyexists(const char *scriptname)
+static int install_alreadyexists(const char *scriptname)
{
- FILE *fp;
-
- if ( (fp=fopen(scriptname, "r"))==NULL )
- return 0;
-
- fclose(fp);
+ FILE *fp;
+
+ if ((fp = fopen(scriptname, "r")) == NULL)
+ {
+ return 0;
+ }
+
+ fclose(fp);
return 1;
}
-
-int install_createscript(int addr, int stacksize, int progsize,
- int priority, const char *scriptname)
+static int install_createscript(int addr, int stacksize, int progsize,
+ int priority, const char *scriptname)
{
- FILE *fp;
-
- if ( (fp=fopen(scriptname, "w+"))==NULL )
- return -errno;
-
- fprintf(fp, install_script_text, stacksize, priority, progsize);
- fprintf(fp, install_script_exec, addr);
-
- fflush(fp);
- fclose(fp);
+ FILE *fp;
- return 0;
+ if ((fp = fopen(scriptname, "w+")) == NULL)
+ {
+ return -errno;
+ }
+
+ fprintf(fp, install_script_text, stacksize, priority, progsize);
+ fprintf(fp, install_script_exec, addr);
+
+ fflush(fp);
+ fclose(fp);
+
+ return 0;
}
-
-int install_getlasthexvalue(FILE *fp, char delimiter)
+static int install_getlasthexvalue(FILE *fp, char delimiter)
{
- char buf[128];
- char *p;
-
- if (fgets(buf, 127, fp)) {
- if ( (p = strrchr(buf, delimiter)) ) {
- return strtol(p+1, NULL, 16);
+ char buf[128];
+ char *p;
+
+ if (fgets(buf, 127, fp))
+ {
+ if ((p = strrchr(buf, delimiter)))
+ {
+ return strtol(p+1, NULL, 16);
}
}
- return -1;
+
+ return -1;
}
-
-int install_remove(const char *scriptname)
+static int install_remove(const char *scriptname)
{
- FILE *fp;
- int progsize, addr, freedsize;
- uint16_t page;
- int status = 0;
-
- /* Parse script */
-
- if ( (fp=fopen(scriptname, "r")) ) {
- progsize = install_getlasthexvalue(fp,'=');
- addr = install_getlasthexvalue(fp,' ');
- freedsize = progsize;
+ FILE *fp;
+ int progsize, addr, freedsize;
+ uint16_t page;
+ int status = 0;
+
+ /* Parse script */
+
+ if ((fp = fopen(scriptname, "r")))
+ {
+ progsize = install_getlasthexvalue(fp,'=');
+ addr = install_getlasthexvalue(fp,' ');
+ freedsize = progsize;
}
- else return -errno;
-
- fclose(fp);
-
- /* Remove pages */
-
- if (progsize <= 0 || addr <= 0)
- return -EIO;
-
- do {
- if ((page = up_progmem_getpage(addr)) < 0) {
- status = -page;
- break;
+ else
+ {
+ return -errno;
+ }
+
+ fclose(fp);
+
+ /* Remove pages */
+
+ if (progsize <= 0 || addr <= 0)
+ {
+ return -EIO;
+ }
+
+ do
+ {
+ if ((page = up_progmem_getpage(addr)) < 0)
+ {
+ status = -page;
+ break;
}
-
- if ( up_progmem_erasepage(page) < 0) {
- status = -page;
- break;
+
+ if (up_progmem_erasepage(page) < 0)
+ {
+ status = -page;
+ break;
}
-
- addr += up_progmem_pagesize(page);
- progsize -= up_progmem_pagesize(page);
-
- } while(progsize > 0);
-
- if (status < 0) return status;
-
- /* Remove script file */
-
- if (unlink(scriptname) < 0) return -errno;
-
- return freedsize;
+
+ addr += up_progmem_pagesize(page);
+ progsize -= up_progmem_pagesize(page);
+
+ }
+ while(progsize > 0);
+
+ if (status < 0)
+ {
+ return status;
+ }
+
+ /* Remove script file */
+
+ if (unlink(scriptname) < 0)
+ {
+ return -errno;
+ }
+
+ return freedsize;
}
/****************************************************************************
- * Start
+ * Public Functions
****************************************************************************/
int install_main(int argc, char *argv[])
{
- int i;
- int progsize;
- int scrsta;
- int stacksize = 4096;
- int priority = SCHED_PRIORITY_DEFAULT;
- int pagemargin = 16;
- int startpage = 0;
- int startaddr = 0;
- int action = ACTION_INSTALL;
- char scriptname[128];
-
- /* Supported? */
-
- if ( !up_progmem_isuniform() ) {
- fprintf(stderr, "Error: install supports uniform organization only.\n");
- return -1;
- }
-
- /* Parse arguments */
-
- for (i=1; i argc-1) {
- action = ACTION_INSUFPARAM;
- break; /* are there sufficient parameters */
- }
- if ( (scrsta=install_remove(argv[i])) < 0) {
- fprintf(stderr, "Could not remove program: %s\n", strerror(-scrsta) );
- return -1;
- }
- printf("Removed %s and freed %d bytes\n", argv[i], scrsta);
- return 0;
-
-
- case ACTION_INSTALL:
- if (i > argc-2) {
- action = ACTION_INSUFPARAM;
- break; /* are there sufficient parameters */
- }
-
- install_getscriptname(scriptname, argv[i], argv[i+1]);
-
- // script-exists?
- if (install_alreadyexists(scriptname)==1) {
-
- if (action != ACTION_REINSTALL) {
- fprintf(stderr, "Program with that name already exists.\n");
- return -EEXIST;
- }
-
- if ( (scrsta=install_remove(scriptname)) < 0) {
- fprintf(stderr, "Could not remove program: %s\n", strerror(-scrsta) );
- return -1;
- }
-
- printf("Replacing %s\n", scriptname);
- }
-
- startaddr = install_getstartpage(startpage, pagemargin, install_getprogsize(argv[i]) );
- if (startpage < 0) {
- fprintf(stderr, "Not enough memory\n");
- return -ENOMEM;
- }
-
- if ( (progsize = install_programflash(startaddr, argv[i])) <= 0) {
- fprintf(stderr, "Error writing program memory: %s\n"
- "Note: Flash pages are not released, so you may try again and program will be\n"
- " written in other pages.\n", strerror(-progsize) );
-
- return -EIO;
- }
- if ( (scrsta = install_createscript(startaddr, stacksize, progsize,
- priority, scriptname)) < 0) {
- fprintf(stderr, "Error writing program script at %s: %s\n",
- argv[i+1], strerror(-scrsta) );
- return -EIO;
- }
-
- printf("Installed application of size %d bytes to program memory [%xh - %xh].\n",
- progsize, startaddr, startaddr + progsize);
+ int i;
+ int progsize;
+ int scrsta;
+ int stacksize = 4096;
+ int priority = SCHED_PRIORITY_DEFAULT;
+ int pagemargin = 16;
+ int startpage = 0;
+ int startaddr = 0;
+ int action = ACTION_INSTALL;
+ char scriptname[128];
- return 0;
+ /* Supported? */
+
+ if (!up_progmem_isuniform())
+ {
+ fprintf(stderr, "Error: install supports uniform organization only.\n");
+ return -1;
}
-
- fprintf(stderr, install_help, argv[0], argv[0]);
- return -1;
+
+ /* Parse arguments */
+
+ for (i=1; i argc-1)
+ {
+ action = ACTION_INSUFPARAM;
+ break; /* are there sufficient parameters */
+ }
+
+ if ((scrsta=install_remove(argv[i])) < 0)
+ {
+ fprintf(stderr, "Could not remove program: %s\n", strerror(-scrsta));
+ return -1;
+ }
+
+ printf("Removed %s and freed %d bytes\n", argv[i], scrsta);
+ return 0;
+
+ case ACTION_INSTALL:
+ if (i > argc-2)
+ {
+ action = ACTION_INSUFPARAM;
+ break; /* are there sufficient parameters */
+ }
+
+ install_getscriptname(scriptname, argv[i], argv[i+1]);
+
+ /* script-exists? */
+
+ if (install_alreadyexists(scriptname) == 1)
+ {
+ if (action != ACTION_REINSTALL)
+ {
+ fprintf(stderr, "Program with that name already exists.\n");
+ return -EEXIST;
+ }
+
+ if ((scrsta = install_remove(scriptname)) < 0)
+ {
+ fprintf(stderr, "Could not remove program: %s\n", strerror(-scrsta));
+ return -1;
+ }
+
+ printf("Replacing %s\n", scriptname);
+ }
+
+ startaddr = install_getstartpage(startpage, pagemargin, install_getprogsize(argv[i]));
+ if (startpage < 0)
+ {
+ fprintf(stderr, "Not enough memory\n");
+ return -ENOMEM;
+ }
+
+ if ((progsize = install_programflash(startaddr, argv[i])) <= 0)
+ {
+ fprintf(stderr, "Error writing program memory: %s\n"
+ "Note: Flash pages are not released, so you may try again and program will be\n"
+ " written in other pages.\n", strerror(-progsize));
+ return -EIO;
+ }
+
+ if ((scrsta = install_createscript(startaddr, stacksize, progsize,
+ priority, scriptname)) < 0)
+ {
+ fprintf(stderr, "Error writing program script at %s: %s\n",
+ argv[i+1], strerror(-scrsta));
+ return -EIO;
+ }
+
+ printf("Installed application of size %d bytes to program memory [%xh - %xh].\n",
+ progsize, startaddr, startaddr + progsize);
+ return 0;
+ }
+
+ fprintf(stderr, install_help, argv[0], argv[0]);
+ return -1;
}
diff --git a/apps/system/poweroff/Kconfig b/apps/system/poweroff/Kconfig
new file mode 100644
index 0000000000..ae8eac450f
--- /dev/null
+++ b/apps/system/poweroff/Kconfig
@@ -0,0 +1,16 @@
+#
+# For a description of the syntax of this configuration file,
+# see misc/tools/kconfig-language.txt.
+#
+
+config SYSTEM_POWEROFF
+ bool "Power-Off command"
+ default n
+ ---help---
+ Enable support for the NSH poweroff command. NOTE: This option
+ provides the NSH power-off command only. It requires board-specific
+ support to actually implement the power-off.
+
+if SYSTEM_POWEROFF
+endif
+
diff --git a/apps/vsn/poweroff/Makefile b/apps/system/poweroff/Makefile
similarity index 99%
rename from apps/vsn/poweroff/Makefile
rename to apps/system/poweroff/Makefile
index e58ecfa860..40465e957d 100644
--- a/apps/vsn/poweroff/Makefile
+++ b/apps/system/poweroff/Makefile
@@ -1,5 +1,5 @@
############################################################################
-# Makefile
+# apps/system/poweroff/Makefile
#
# Copyright (C) 2011 Uros Platise. All rights reserved.
# Author: Uros Platise
diff --git a/apps/vsn/poweroff/README.txt b/apps/system/poweroff/README.txt
similarity index 100%
rename from apps/vsn/poweroff/README.txt
rename to apps/system/poweroff/README.txt
diff --git a/apps/vsn/poweroff/poweroff.c b/apps/system/poweroff/poweroff.c
similarity index 64%
rename from apps/vsn/poweroff/poweroff.c
rename to apps/system/poweroff/poweroff.c
index ca3f056e80..dd08b177a1 100644
--- a/apps/vsn/poweroff/poweroff.c
+++ b/apps/system/poweroff/poweroff.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * poweroff/poweroff.c
+ * apps/system/poweroff/poweroff.c
*
* Copyright (C) 2011 Uros Platise. All rights reserved.
* Author: Uros Platise
@@ -33,22 +33,31 @@
*
****************************************************************************/
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
#include
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
int poweroff_main(int argc, char *argv[])
{
-/* TODO:
- * - replace this by sending general system signal to shutdown, where i.e. nsh
- * must issue down script (it may check whether nsh is running before spawning
- * a new process with nsh poweroff)
- * - wait for some time (~0.5 second for VSN), that SDcard is flashed and synced
- * - call poweroff
- *
- * TODO on boot:
- * - if external key is pressed, do not start the nsh! but wait until it is released
- * (to get rid of bad mounts of the sdcard etc.) this could be handled in the
- * button driver immediately on system boot
- */
- board_power_off();
- return 0;
+ /* TODO:
+ * - replace this by sending general system signal to shutdown, where i.e. nsh
+ * must issue down script (it may check whether nsh is running before spawning
+ * a new process with nsh poweroff)
+ * - wait for some time (~0.5 second for VSN), that SDcard is flashed and synced
+ * - call poweroff
+ *
+ * TODO on boot:
+ * - if external key is pressed, do not start the nsh! but wait until it is released
+ * (to get rid of bad mounts of the sdcard etc.) this could be handled in the
+ * button driver immediately on system boot
+ */
+
+ board_power_off();
+ return 0;
}
diff --git a/apps/vsn/ramtron/Kconfig b/apps/system/ramtron/Kconfig
similarity index 55%
rename from apps/vsn/ramtron/Kconfig
rename to apps/system/ramtron/Kconfig
index 14f358921c..53d547e5f1 100644
--- a/apps/vsn/ramtron/Kconfig
+++ b/apps/system/ramtron/Kconfig
@@ -3,12 +3,12 @@
# see misc/tools/kconfig-language.txt.
#
-config VSN_RAMTRON
- bool "NSH ramtron command"
+config SYSTEM_RAMTRON
+ bool "RAMTRON command"
default n
---help---
- Enable support for the NSH ramtron command.
+ Enable support for the NSH RAMTRON command.
-if VSN_RAMTRON
+if SYSTEM_RAMTRON
endif
diff --git a/apps/vsn/ramtron/Makefile b/apps/system/ramtron/Makefile
similarity index 99%
rename from apps/vsn/ramtron/Makefile
rename to apps/system/ramtron/Makefile
index d930aa92cf..030ef6d5c4 100644
--- a/apps/vsn/ramtron/Makefile
+++ b/apps/system/ramtron/Makefile
@@ -1,5 +1,5 @@
############################################################################
-# Makefile
+# apps/system/ramtron/Makefile
#
# Copyright (C) 2011 Uros Platise. All rights reserved.
# Author: Uros Platise
diff --git a/apps/vsn/ramtron/README.txt b/apps/system/ramtron/README.txt
similarity index 100%
rename from apps/vsn/ramtron/README.txt
rename to apps/system/ramtron/README.txt
diff --git a/apps/vsn/ramtron/ramtron.c b/apps/system/ramtron/ramtron.c
similarity index 92%
rename from apps/vsn/ramtron/ramtron.c
rename to apps/system/ramtron/ramtron.c
index f1e8db100c..cd4012787a 100644
--- a/apps/vsn/ramtron/ramtron.c
+++ b/apps/system/ramtron/ramtron.c
@@ -63,6 +63,7 @@ int ramtron_start(int spino)
printf("RAMTRON: Failed to initialize SPI%d\n", spino);
return -ENODEV;
}
+
printf("RAMTRON: Initialized SPI%d\n", spino);
mtd = (struct mtd_dev_s *)ramtron_initialize(spi);
@@ -71,7 +72,8 @@ int ramtron_start(int spino)
printf("RAMTRON: Device not found\n");
return -ENODEV;
}
- printf("RAMTRON: FM25V10 of size 128 kB\n");
+
+ printf("RAMTRON: FM25V10 of size 128 kB\n");
//printf("RAMTRON: %s of size %d B\n", ramtron_getpart(mtd), ramtron_getsize(mtd) );
retval = ftl_initialize(0, mtd);
@@ -85,15 +87,18 @@ int ramtron_main(int argc, char *argv[])
{
int spino;
- if (argc == 3) {
- spino = atoi(argv[2]);
+ if (argc == 3)
+ {
+ spino = atoi(argv[2]);
- if (!strcmp(argv[1], "start")) {
- return ramtron_start(spino);
+ if (!strcmp(argv[1], "start"))
+ {
+ return ramtron_start(spino);
+ }
}
- }
- // todo: write protect
+ /* todo: write protect */
+
printf("%s: \n", argv[0]);
return -1;
}
diff --git a/apps/vsn/sdcard/Kconfig b/apps/system/sdcard/Kconfig
similarity index 84%
rename from apps/vsn/sdcard/Kconfig
rename to apps/system/sdcard/Kconfig
index 8e6c13264e..a1a8a1f324 100644
--- a/apps/vsn/sdcard/Kconfig
+++ b/apps/system/sdcard/Kconfig
@@ -3,12 +3,12 @@
# see misc/tools/kconfig-language.txt.
#
-config VSN_SDCARD
+config SYSTEM_SDCARD
bool "NSH sdcard command"
default n
---help---
Enable support for the NSH sdcard command.
-if VSN_SDCARD
+if SYSTEM_SDCARD
endif
diff --git a/apps/vsn/sdcard/Makefile b/apps/system/sdcard/Makefile
similarity index 99%
rename from apps/vsn/sdcard/Makefile
rename to apps/system/sdcard/Makefile
index 213021b257..fef049a59b 100644
--- a/apps/vsn/sdcard/Makefile
+++ b/apps/system/sdcard/Makefile
@@ -1,5 +1,5 @@
############################################################################
-# Makefile
+# apps/system/sdcard/Makefile
#
# Copyright (C) 2011 Uros Platise. All rights reserved.
# Author: Uros Platise
diff --git a/apps/vsn/sdcard/README.txt b/apps/system/sdcard/README.txt
similarity index 100%
rename from apps/vsn/sdcard/README.txt
rename to apps/system/sdcard/README.txt
diff --git a/apps/vsn/sdcard/sdcard.c b/apps/system/sdcard/sdcard.c
similarity index 65%
rename from apps/vsn/sdcard/sdcard.c
rename to apps/system/sdcard/sdcard.c
index a81e8432af..56ab74f445 100644
--- a/apps/vsn/sdcard/sdcard.c
+++ b/apps/system/sdcard/sdcard.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * sdcard/sdcard.c
+ * apps/system/sdcard/sdcard.c
*
* Copyright (C) 2011 Uros Platise. All rights reserved.
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
@@ -36,6 +36,10 @@
*
****************************************************************************/
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
#include
#include
@@ -48,15 +52,23 @@
# include
#endif
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
FAR struct sdio_dev_s *sdio_initialize(int slotno);
void sdio_mediachange(FAR struct sdio_dev_s *dev, bool cardinslot);
// TODO get the structure out from the slot number
static FAR struct sdio_dev_s *sdio = NULL;
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
/* Create device device for the SDIO-based MMC/SD block driver */
-int sdcard_start(int slotno)
+static int sdcard_start(int slotno)
{
int ret;
@@ -68,6 +80,7 @@ int sdcard_start(int slotno)
printf("SDIO: Failed to initialize slot %d\n", slotno);
return -ENODEV;
}
+
printf("SDIO: Initialized slot %d\n", slotno);
/* Now bind the SPI interface to the MMC/SD driver */
@@ -78,57 +91,71 @@ int sdcard_start(int slotno)
printf("SDIO: Failed to bind to the MMC/SD driver: %d\n", ret);
return ret;
}
+
printf("SDIO: Successfully bound to the MMC/SD driver\n");
-
+
/* Then let's guess and say that there is a card in the slot. I need to check to
* see if the VSN board supports a GPIO to detect if there is a card in
* the slot.
*/
sdio_mediachange(sdio, true);
-
+
return OK;
}
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
int sdcard_main(int argc, char *argv[])
{
- int slotno = 0;
-
- if (argc >= 2) {
-
- /* The 3rd argument is expected to be a slot number, if given */
- if (argc==3)
- slotno = atoi(argv[2]);
-
- /* Commands */
-
- if (!strcmp(argv[1], "start")) {
- return sdcard_start(slotno);
+ int slotno = 0;
+
+ if (argc >= 2) {
+
+ /* The 3rd argument is expected to be a slot number, if given */
+
+ if (argc==3)
+ {
+ slotno = atoi(argv[2]);
}
- else if (!strcmp(argv[1], "stop")) {
- fprintf(stderr, "Not implemented yet\n");
+
+ /* Commands */
+
+ if (!strcmp(argv[1], "start"))
+ {
+ return sdcard_start(slotno);
}
- else if (!strcmp(argv[1], "insert")) {
- if (sdio) {
- sdio_mediachange(sdio, true);
- return OK;
+ else if (!strcmp(argv[1], "stop"))
+ {
+ fprintf(stderr, "Not implemented yet\n");
+ }
+ else if (!strcmp(argv[1], "insert"))
+ {
+ if (sdio)
+ {
+ sdio_mediachange(sdio, true);
+ return OK;
}
}
- else if (!strcmp(argv[1], "eject")) {
- if (sdio) {
- sdio_mediachange(sdio, false);
- return OK;
+ else if (!strcmp(argv[1], "eject"))
+ {
+ if (sdio)
+ {
+ sdio_mediachange(sdio, false);
+ return OK;
}
}
- else if (!strcmp(argv[1], "status")) {
- printf("SDcard #%d Status:\n", slotno);
+ else if (!strcmp(argv[1], "status"))
+ {
+ printf("SDcard #%d Status:\n", slotno);
#ifndef CONFIG_MMCSD_HAVECARDDETECT
- printf("\t - Without SDcard detect capability\n");
+ printf("\t - Without SDcard detect capability\n");
#endif
- return 0;
+ return 0;
}
}
-
- printf("%s: {slotno}\n", argv[0]);
- return -1;
+
+ printf("%s: {slotno}\n", argv[0]);
+ return -1;
}
diff --git a/apps/vsn/sysinfo/Kconfig b/apps/system/sysinfo/Kconfig
similarity index 84%
rename from apps/vsn/sysinfo/Kconfig
rename to apps/system/sysinfo/Kconfig
index 38e0f16bec..1f106dc8a9 100644
--- a/apps/vsn/sysinfo/Kconfig
+++ b/apps/system/sysinfo/Kconfig
@@ -3,12 +3,11 @@
# see misc/tools/kconfig-language.txt.
#
-config VSN_SYSINFO
+config SYSTEM_SYSINFO
bool "NSH sysinfo command"
default n
---help---
Enable support for the NSH sysinfo command.
-if VSN_SYSINFO
+if SYSTEM_SYSINFO
endif
-
diff --git a/apps/vsn/sysinfo/Makefile b/apps/system/sysinfo/Makefile
similarity index 99%
rename from apps/vsn/sysinfo/Makefile
rename to apps/system/sysinfo/Makefile
index b4afc8a97f..ead9742779 100644
--- a/apps/vsn/sysinfo/Makefile
+++ b/apps/system/sysinfo/Makefile
@@ -1,5 +1,5 @@
############################################################################
-# Makefile
+# apps/system/sysinfo/Makefile
#
# Copyright (C) 2011 Uros Platise. All rights reserved.
# Author: Uros Platise
diff --git a/apps/vsn/sysinfo/README.txt b/apps/system/sysinfo/README.txt
similarity index 100%
rename from apps/vsn/sysinfo/README.txt
rename to apps/system/sysinfo/README.txt
diff --git a/apps/vsn/sysinfo/sysinfo.c b/apps/system/sysinfo/sysinfo.c
similarity index 75%
rename from apps/vsn/sysinfo/sysinfo.c
rename to apps/system/sysinfo/sysinfo.c
index 8625f9db71..019e910dba 100644
--- a/apps/vsn/sysinfo/sysinfo.c
+++ b/apps/system/sysinfo/sysinfo.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * sysinfo/sysinfo.c
+ * apps/system/sysinfo/sysinfo.c
*
* Copyright (C) 2011 Uros Platise. All rights reserved.
* Author: Uros Platise
@@ -32,18 +32,17 @@
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
-
-/** \file
- * \brief System Information
- * \author Uros Platise
- *
- * Collects and reports system information.
- *
- * \todo Gather information also from low-level devices, kernel/sched, clock,
- * and further reporting as: sysinfo rtc, or sysinfo sched, ... with
- * sysinfo help to report all of the options.
+
+/* Collects and reports system information.
*
- **/
+ * TODO: Gather information also from low-level devices, kernel/sched, clock,
+ * and further reporting as: sysinfo rtc, or sysinfo sched, ... with
+ * sysinfo help to report all of the options.
+ */
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
#include
#include
@@ -52,18 +51,19 @@
#include
#include
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
int sysinfo_main(int argc, char *argv[])
{
- printf("System Information:\n");
-
- printf("\tNuttX Version:\t" CONFIG_VERSION_STRING " Build: %d\n", CONFIG_VERSION_BUILD);
-
- printf("\tSystem Time:\t%d [s] UTC "
+ printf("System Information:\n");
+ printf("\tNuttX Version:\t" CONFIG_VERSION_STRING
+ " Build: %d\n", CONFIG_VERSION_BUILD);
+ printf("\tSystem Time:\t%d [s] UTC "
#ifdef CONFIG_RTC
"Hardware RTC Support"
#endif
"\n", time(NULL) );
-
- return 0;
+ return 0;
}
diff --git a/apps/vsn/Kconfig b/apps/vsn/Kconfig
deleted file mode 100644
index 1f0c25f167..0000000000
--- a/apps/vsn/Kconfig
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# For a description of the syntax of this configuration file,
-# see misc/tools/kconfig-language.txt.
-#
-
-comment "VSN board add-ons"
-
-source "$APPSDIR/vsn/poweroff/Kconfig"
-source "$APPSDIR/vsn/ramtron/Kconfig"
-source "$APPSDIR/vsn/sdcard/Kconfig"
-source "$APPSDIR/vsn/sysinfo/Kconfig"
diff --git a/apps/vsn/Make.defs b/apps/vsn/Make.defs
deleted file mode 100644
index 6d59ab8384..0000000000
--- a/apps/vsn/Make.defs
+++ /dev/null
@@ -1,51 +0,0 @@
-############################################################################
-# apps/vsn/Make.defs
-# Adds selected applications to apps/ build
-#
-# Copyright (C) 2012 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-# used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-############################################################################
-
-ifeq ($(CONFIG_VSN_POWEROFF),y)
-CONFIGURED_APPS += vsn/poweroff
-endif
-
-ifeq ($(CONFIG_VSN_RAMTRON),y)
-CONFIGURED_APPS += vsn/ramtron
-endif
-
-ifeq ($(CONFIG_VSN_SDCARD),y)
-CONFIGURED_APPS += vsn/sdcard
-endif
-
-ifeq ($(CONFIG_VSN_SYSINFO),y)
-CONFIGURED_APPS += vsn/sysinfo
-endif
diff --git a/apps/vsn/Makefile b/apps/vsn/Makefile
deleted file mode 100644
index 21901d96de..0000000000
--- a/apps/vsn/Makefile
+++ /dev/null
@@ -1,71 +0,0 @@
-############################################################################
-# apps/vsn/Makefile
-#
-# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-# used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-############################################################################
-
--include $(TOPDIR)/.config # Current configuration
-
-# Sub-directories
-
-SUBDIRS = poweroff ramtron sdcard sysinfo
-
-all: nothing
-.PHONY: nothing context depend clean distclean
-
-nothing:
-
-.context:
- @for dir in $(SUBDIRS) ; do \
- $(MAKE) -C $$dir context TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"; \
- done
- @touch $@
-
-context: .context
-
-depend:
- @for dir in $(SUBDIRS) ; do \
- $(MAKE) -C $$dir depend TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"; \
- done
-
-clean:
- @for dir in $(SUBDIRS) ; do \
- $(MAKE) -C $$dir clean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"; \
- done
-
-distclean: clean
- @for dir in $(SUBDIRS) ; do \
- $(MAKE) -C $$dir distclean TOPDIR="$(TOPDIR)" APPDIR=$(APPDIR); \
- done
-
--include Make.dep
-
diff --git a/apps/vsn/poweroff/Kconfig b/apps/vsn/poweroff/Kconfig
deleted file mode 100644
index d0059a0d38..0000000000
--- a/apps/vsn/poweroff/Kconfig
+++ /dev/null
@@ -1,14 +0,0 @@
-#
-# For a description of the syntax of this configuration file,
-# see misc/tools/kconfig-language.txt.
-#
-
-config VSN_POWEROFF
- bool "NSH poweroff command"
- default n
- ---help---
- Enable support for the NSH poweroff command.
-
-if VSN_POWEROFF
-endif
-
diff --git a/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html
index 0370a708df..ec6a8be24d 100644
--- a/nuttx/Documentation/NuttX.html
+++ b/nuttx/Documentation/NuttX.html
@@ -497,7 +497,7 @@
- RAMDISK, pipes, FIFO, /dev/null, /dev/zero, and loop drivers.
+ RAMDISK, pipes, FIFO, /dev/null, /dev/zero, /dev/random, and loop drivers.
From e6656c077c35341384d5474f0d7b65067b7997ec Mon Sep 17 00:00:00 2001
From: patacongo
Date: Thu, 4 Oct 2012 00:11:05 +0000
Subject: [PATCH 12/43] Delete the apps/vsn directory (moved commands to
apps/system)
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5209 42af7a65-404d-4744-a932-0658087f49c3
---
apps/system/i2c/Makefile | 2 +-
apps/system/ramtron/ramtron.c | 2 +-
apps/system/readline/readline.c | 2 +-
nuttx/Documentation/README.html | 19 +++--
nuttx/README.txt | 5 +-
.../configs/compal_e88/nsh_highram/appconfig | 2 +-
.../compal_e99/nsh_compalram/appconfig | 2 +-
.../configs/compal_e99/nsh_highram/appconfig | 2 +-
nuttx/configs/fire-stm32v2/nsh/defconfig | 39 +++++----
nuttx/configs/shenzhou/nsh/defconfig | 35 +++++---
nuttx/configs/shenzhou/nxwm/defconfig | 24 ++++--
.../configs/stm3240g-eval/discover/defconfig | 79 +++++++++++++++----
nuttx/configs/stm3240g-eval/xmlrpc/defconfig | 69 ++++++++++++----
nuttx/configs/vsn/nsh/appconfig | 10 +--
14 files changed, 209 insertions(+), 83 deletions(-)
diff --git a/apps/system/i2c/Makefile b/apps/system/i2c/Makefile
index 845c149f6c..00db91bb70 100644
--- a/apps/system/i2c/Makefile
+++ b/apps/system/i2c/Makefile
@@ -1,5 +1,5 @@
############################################################################
-# apps/system/i2c
+# apps/system/i2c/Makefile
#
# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt
diff --git a/apps/system/ramtron/ramtron.c b/apps/system/ramtron/ramtron.c
index cd4012787a..78773649cc 100644
--- a/apps/system/ramtron/ramtron.c
+++ b/apps/system/ramtron/ramtron.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * ramtron/ramtron.c
+ * apps/system/ramtron/ramtron.c
*
* Copyright (C) 2011 Uros Platise. All rights reserved.
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
diff --git a/apps/system/readline/readline.c b/apps/system/readline/readline.c
index ec2dc1c0a6..f64049ed73 100644
--- a/apps/system/readline/readline.c
+++ b/apps/system/readline/readline.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * lib/stdio/lib_fgets.c
+ * apps/system/readline/readline.c
*
* Copyright (C) 2007-2008, 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/nuttx/Documentation/README.html b/nuttx/Documentation/README.html
index 95102a004f..4d87f55a67 100644
--- a/nuttx/Documentation/README.html
+++ b/nuttx/Documentation/README.html
@@ -265,16 +265,15 @@
| `- README.txt
|- NxWidgets/
| `- README.txt
- |- system/
- | |- i2c/README.txt
- | |- free/README.txt
- | `- install/README.txt
- `- vsn/
- |- poweroff/README.txt
- |- ramtron/README.txt
- |- sdcard/README.txt
- |- sysinfo/README.txt
- `- README.txt
+ `- system/
+ |- i2c/README.txt
+ |- free/README.txt
+ |- install/README.txt
+ |- poweroff/README.txt
+ |- ramtron/README.txt
+ |- sdcard/README.txt
+ |- sysinfo/README.txt
+ `- README.txt