0.1.0 2007-03-09 Gregory Nutt * Initial Release * Support for Linux user mode simulation and TI TMS320C5471 (Arm7) provided 0.1.1 2007-03-14 Gregory Nutt * Corrected an error in interrupt level context switching for C5471 * Added fgets() and gets() logic; verified c5471 console read. * Corrected error in reading from the C5471 serial port: Improper use of semaphore can cause deadlock. * Fixed an error in the memory cleanup: The idle task cannot take sempahores (because it must always be ready to run). * Tasks can now accept a configurable maximum number of input parameters (argc) * _task_init() was divided into separate functions that require fewer parameters. This was necessary to keep the stack usage down for the 8051/2 (which has only 256 bytes of stack). * Attempts to use C5471 console from interrupt handlers can cause errors. Added a special path for this case. * Refuse calls to sem_wait and sem_trywait from interrupt handlers. This was happening because interrupt handlers were calling printf-like functions. * Added strtok() and strtok_r() * Added a simple shell called nsh (see examples/nsh). * Platform support for 8052 is complete but not stable when the timer interrupt is enabled. Seems to be an issue when SP enters indirect address space. * Documentation updates 0.1.2 2007-03-19 Gregory Nutt * Add dirent.h, opendir(), readdir(), closedir(), etc. * Add strerror() * Added 'ls' command to nsh * Added C5471 watchdog driver * Fixed another bug where free() is called from IDLE task. Can't do this; the caller must be able to wait for access to memory. * Fixed bugs associated with debug output: Cannot do dbg() in middle of context switch logic. because it may require use of semaphores and cause additional context switches. lldbg() is safe. * Interrupt must be disabled throughout all context switches. * Separated C5471 serial driver; a shareable part is in drivers/. ; the C5471 specific part is in arch/C5471. serial.h defines the interface. * Fixed mq_receive() and mq_send(): bad memcpy() * Fixed C5471 signal deliver logic: use of dbg() and other actions by use signal handler can alter errno. need to protect errno during signal handling. * Fixed uninitialized variable in filesystem that could cause various problems * Added a test for roundrobin scheduler. 0.2.1 2007-03-22 Gregory Nutt * Fix error in handing signed decimal in vsprintf(). * Major restructuring of header files to get closer to POSIX compliance. * Eliminate compilation warnings that crept into recent check-ins * Add kill() * Added support for POSIX timers * Some Documentation updates * Added support for the Neuros OSD / DM320 0.2.2 2007-03-26 Gregory Nutt * Created the configs/ directory; separated board configuration from processor architecture logic * Add memory leak detection test to examples/ostest * Corrected memory leak in OS pthread join logic * Corrected memory leaks in examples/ostest due to failures to join or detach from pthreads. * Added pthread_once(), pthread_kill(), pthread_sigmask() * Added pthread_barrierattr_*() APIs * Added pthread_barrier_init(), pthread_barrier_destroy(), and pthread_barrier_wait(); * Added pthread barrier test * Added protection so that errno cannot be modified from interrupt handling. * sched_setparam(), sched_setscheduler() now correctly set errno; pthread_setscheduler() now returns the correct errno. * Added pthread_setschedprio(). * Added directories to hold board-specific header files * Added directories to hold board-specific drivers 0.2.3 2007-03-29 Gregory Nutt * mq_receive and mq_send now return errno's appropriately * mq_receive and mq_send are now correctly awakened by signals. * Fixed an unmatched sched_lock/unlock pair in task_delete(). * sched_lock must be called in _exit() because operation of task_delete() can cause pending tasks to be merged and a context switch to occur. * Added mq_timedreceive() and mq_timedsend() * signal mask is now inherited by both child tasks and threads. * Improved sharebility of stdout among pthreads (only). Nothing was broken, but by moving the mutual exclusion logic to a higher level, the printf output is more readable. * Fixed a bug in file system cleanup: A list was being deleted before the buffers contained in the list. * Fixed a bug in the wait-for-message-queue-not-empty logic. * Added a test of timed mqueue operations; detected and corrected some mqueue errors. * Identified and corrected a race condition associated with pthread_join. In the failure condition, memory was being deallocated while still in use. 0.2.4 2007-04-28 Gregory Nutt * Verified c5471 build under Cygwin on WinXP * Makesystem changes to better support different SoCs. * Made arch/c5471/include and arch/dm320/include identical in preparation for merging into arch/arm * Logic from arch/c5471 and arch/dm320 combined into arch/arm. arch/c5471 and arch/dm320 are deprecated and will be removed when the new c5471 and dm320 logic is verified. 0.2.5 2007-05-19 Gregory Nutt * Corrected some build/configuration issues introduced with the last release. * Added support for the NXP 214x processor on the mcu123.com lpc214x development board (untested) * Added support for block devices. * Simulated target now exports a VFAT filesystem * Begin support for VFAT filesystem (missing functionality) * Added mount() and umount() * Fix bug in memcmp return value * Fix errors in timeslice calculation (several places) * Added missing irqrestore() in timer_deleteall(). * close() was not closing the underlying device. * Added fsync() * Added strspn() and strcspn() 0.2.6 2007-05-26 Gregory Nutt * Added unlink(), mkdir(), rmdir(), and rename() * Fixed several serious FAT errors with oflags handling (&& instead of &) * Added FAT support for unlink(), mkdir(), rmdir(), and rename * Added FAT support for opendir(), closedir(), readdir(), seekdir(), telldir(), rewindir(). * Fixed ARM compilation errors introduced in 0.2.5 (that is what I get for only testing on the simulation). 0.2.7 2007-06-09 Gregory Nutt * Added stat() to fs layer and to FAT * Fixed reference counting errors associated with mounted filesystems * Added fat_getattrib() and fat_setattrib() * Added statfs() to fs layer and to FAT * Correct file name extension in tools/zipme.sh * Fix error in dependencies in 8051/2 Makefile * sched/Makefile: Don't build sleep() or usleep() if signals are disabled * sched/sched_setparam.c: Remove redundant disabling of interrupts * sched/usleep.c: Fixed nsec calculation * lib/lib_strcspn.c: Function incorrectly named strspn(). * examples/ostest/main.c: Errors in SDCC version of a memcpy() call * examples/ostest/sighand.c: Don't call fflush() if streams are disabled * include/limits.h, include/time.h, sched/clock_internal.h: A support for using selectable system timer frequency. * Fixed error in mountpoint related conditional compilation introduced in 0.2.5 * Restructured some Makefiles to better handle enabling and disabling NuttX features without having so much conditional compilation in the source files. * tools/mkconfig.c: No longer depends on asprintf() and _GNU_SOURCE and so should now build in non-GNU, non-GLIBC environments. * include/nuttx/compiler.h: Fix for using SDCC with the Z80. * include/assert.h & arch/pjrc-8051/src/up_assert.c: SDCC does support __FILE__and __LINE__ (not tested) * examples/ostest/barrier.c: Don't call usleep() when signals are disabled. 0.2.8 2007-07-02 Gregory Nutt * tools/Makefile.mkconfig: Under Cygwin, executable has a different name * tools/mkdeps.sh & arch/arm/src/Makefile: Corrected a problem makeing dependencies * tools/zipme.sh: Force directory name to be nuttx-xx.yy.zz * fs/fs_opendir.c: Correct errors in semaphore usage that can cause deadlock. * lib/lib_getopt.c: Added getopt() support * examples/nsh/: NSH now supports cat, mount, umount, and mkdir. ls supports -l -s, and -R * Added basic OS support to manage environment variables: environment storage, cloning on task creation, sharing on pthread creation, destruction on thread/task exit. * Add environment variables APIs: environ, getenv, putenv, clearenv, setenv, unsetenv * Correct an error in realloc() when the block is extended "down" in memory. In this case, the old memory contents need to be copied to the new location and an allocated bit was not being set. * examples/ostest/: Added an environment variable test. * examples/nsh/: Break into several files. * lib/: Added strrchr, basename, dirname * examples/nsh/: Add cp, rm, rmdir, set, unset commands. echo will now print environment variables. 0.3.0 2007-11-06 Gregory Nutt * Imported uIP into the tree (see http://www.sics.se/~adam/uip/index.php/Main_Page) * Adding socket(), bind(), connect() * Added snprintf() * Added send() and sendto(); integrate write() and close() with socket descriptors. * Added recv() and recvfrom(). * Added getsockopt() and setsockopt() * Documentation updated to address socket interfaces. * Implemented receive timeouts via setsockopt(SO_RCVTIMEO). * Provide support for multiple network devices * Implement socket ioctl() calls to set addresses * Added listen() and accept() * Added DM90x0 Ethernet driver * ARP timer is now built into the network layer * Basic client functionality verified: TCP socket(), bind(), connect(), recv(), send(). 0.3.1 2007-11-19 Gregory Nutt * Separated net/uip/uip.c into several functions in several files. * Corrected a TCP problem where packets were dropped because there was no recv() in place but the packet was being ACKed. There are still TCP recv buffering issues, but this is part of a larger buffering issue. * Basic server functionality verified: TCP listen(), accept() * Fix DM90x0 driver problem that caused TX overruns * Add strncmp() * Added TCP/IP read-ahead buffer to minimize failed ACKs and packet loss. 0.3.2 2007-11-23 Gregory Nutt * Add strcat() and strncat() * Integrated uIP micro webserver * Corrected a serious bug in TCP queue management * Fix leak in socket close logic * Add TX notification to driver so that it can respond faster to the availability of TX data. * Moved urgent data info into device structure. * TCP and ICMP protocols can now be disabled. * Added UDP test in examples/udp * Verified/debugged UDP socket(), bind(), sendto() and recvfrom() logic using examples/udp * recvfrom() and accept() now correctly return the remote address. * Fixed computation error in ntohl(). 0.3.3 2007-11-28 Gregory Nutt * Removed unused uIP files * sched/, mm/, and net/ subsystem debug can not be selectively enabled/disabled * Correct socket close logic: needs to disconnect TCP socket on close * uIP webserver now seems to be fully functional * fs/ and lib/ subystem debug can not be selectively enabled/disabled * Added vsnprintf * Integrated uIP telnetd * Add missing logic to read-ahead buffer logic * examples/nettest uses larger buffers * Improved ACK handling in send() to better handler deferred acknowledgements and polling intervals. Greatly improves send performance. 0.3.4 2007-12-10 Gregory Nutt * Added and partially verified DHCP server logic (netutils/dhcpd) * Fix BROADCAST=y compilation problems * Fix UDP recvfrom timeout bug * Correct processing of input UDP broadcast packets. * Verfied basic DHCP client functionality (netutils/dhcpc) * Implemented send() timeout logic * Added and verified a TELNETD front end to NSH (examples/nsh) * Add a skeleton Ethernet device driver (drivers/net/skeleton.c) * Added C5471 Ethernet device driver (arch/arm/src/c5471/c5471_ethernet.c) * Found and fixed several problems in uIP when compiled for ARM with optimization. 0.3.5 2007-12-18 Gregory Nutt * Added inet_ntoa() and ether_ntoa() * Added netdev_foreach() to support traversal of registered network devices * Added support for 'ifconfig' command to NSH (examples/nsh) * Moved MAC and Ethernet definitions to net/ethernet.h * Fix sim and DM90x0 compilation errors introduced in 0.3.4 * Fixed errors in C5471 configuration files for examples/uip * Modified DHCPC (netutils/dhcpc) so that it should work in environments where there are more than one DHCPD server. * NSH ifconfig command now shows uIP status as well (examples/nsh) 0.3.6 2008-01-06 Gregory Nutt * Changes for use with SDCC compiler * Added a simulated z80 target * Fix deadlock errors when using stdio but with no buffering * Add support for Pascal P-Code interpreter 0.3.6.1 2008-01-07 Gregory Nutt * The initial 0.3.6 release including an error that prevented building successfully if the Pascal add-on was was not present. 0.3.7 2008-01-31 Gregory Nutt * Added support for the Zilog Z16F using the Zilog Z16F2800100ZCOG Development Kit. * Add support toolchains that do not support making of dependencies * Fix Cygwin build with spaces in directory names * Name make system changes to deal with non-GNU toolchains (i.e., Zilog) * Add support for Windows native toolchains that cannot follow Cygwin soft links * Modified serial driver interface to handle hardware with non-16550A-like interrupt architecture (like the Z16F) * Added a "dumb" serial console driver to simplify OS bringup * Corrected a bug that caused the errno value of one task to be clobbered when a different task exits. Affects all architectures. 0.3.8 2008-02-10 Gregory Nutt * Added a test case to verify the Pascal P-Code interpreter * Added /dev/zero * 'errno' is now defined to be *get_errno_ptr() with no name conflicts * Added lseek() and fseek() * Integrated Pascal interpreter test case on the simulation platform. Needs pascal-0.1.1. * Add Pascal test case on the z16f platform. Needs pascal-0.1.2 (does not yet work due to some tool issues). * C buffered I/O fixes: - Fix fflush() return value, - Add correct fflush behavior when the FILE argument is null. - Add logic to a correctly handle read/write access on the same FILE - fseek() flushes read/write data when before moving the file pointer - When read data is flushed, reposition the file pointer to account for buffered, but unread data * Pascal P-Code files are now standardized to big-endian for portability * Fix a build problem with z80 and SDCC 2.7.0 (format of a map file changed) (see bug 1887170) * Pascal P-Code runtime now compiles with the SDCC toolchain. * Added a generic CAN driver. This driver is untested as of this writing. * Corrected DM320 UART configuration problem 0.3.9 2008-03-09 Gregory Nutt * Began adding support for the ZiLOG Z8Encore! microcontroller for the Z8Encore000ZCO development board and the Z8F6403 part. * Fix broken 'clean' target on z80sim configurations * Re-structure arch/z80 to provide support for all ZiLOG 8-bit microcontrollers (ez8 in particular for now). * Add support for TRS80-Model 3 based on the xtrs emulation (http://www.tim-mann.org/xtrs.html) Per patch from Jacques Pelletier. * In all shell scripts, change #!/bin/sh to #!/bin/bash to resolve problems in Ubuntu where /bin/sh is a link to dash. * Z8Encore! port verified on ZDS-II instruction set/chip simulator. 0.3.10 2008-05-15 Gregory Nutt * Add support for the ZiLOG EZ80Acclaim microcontrooler (EZ80F91 chip). * Add configuration for the ZiLOG z8f64200100kit development kit, Z8F6423 part. * Add configuration for the ZiLOG ez80f0910200kitg development kit, EZ80F091 part. * Correct critical list handling errors in task shutdown logic: One in timer deletion logic (timer_delete.c) and one in stream logic (lib_init.c) reported by kwonsk. 0.3.11 2008-06-01 Gregory Nutt * Add support for recursive mutexes. * Eliminate a memory leak: contained watchdog instance was not being deleted with a POSIX timer was deleted reported by kwonsk. * Eliminate a deadlock condition in opendir() reported by kwonsk. * Fix several FAT filesystem problems reported by kwonsk (Changes not yet verified). * Host simulator no longer uses Linux system calls directly; Now works with Cygwin. * Fix an error that occurs when a POSIX timer is deleted by the timer signal handler. * Add logic to allow the examples/ostest to be run repetitively as an endurance test. * Add a ramdisk block driver 0.3.12 2008-08-10 Gregory Nutt * Improved solution to POSIX timer lifetime controls bug fixed in 0.3.11. * Add test for recursive mutexes * Correct bug in recursive mutex logic * Add mkfifo() * Add pipe() and test for both pipes and fifos * Attempts to open a FIFO will now block until there is at least one writer * Add test/Fixed errors in FIFO reader/writer interlocks * Removed limitation: task_create() was only dup'ing 3 file descriptors (now dups all open file descriptors). * Added a test for redirection of stdio through pipes * Fixed error in dup and dup2: Must call open/close methods in fs/driver so that driver can correctly maintain open reference counts. * Same issue on closing file descriptors in exit() * Fixed in error in stdio flush logic. Needed ssize_t vs size_t for error check. * Moved all FAT related files from fs to fs/fat * Implemented mkfatfs(), a non-standard API to create a FAT filesystem on a block device (not yet tested). * Added a test for mkfatfs() on a RAM disk in examples/mount and verified basic mkfatfs functionality for FAT12. 0.3.13 2008-09-01 Gregory Nutt * NSH: Added mkfatfs, mkfifo, sleep, usleep and nice commands * Fixed problem with console input in Cygwin-based simulator; NSH now works with simulator. * NSH will now execute commands in background * sched_get_priority_max/min returned error on SCHED_RR * Removed duplicate getenv() implementation in /lib * Correct detection of End-of-File in fgets * NSH: Implemented sh and crude script handler * Fix prototype of read() and write(). Need to use ssize_t and size_t, not int and unsigned int. * NSH now supports redirection of command output * NSH can now use both telnet and serial front ends together * NSH: $variable can be used for any command value * Fixed an error in opendir() that could cause an assertion to fail inappropriately. * Correct an error in the FAT that caused files opened for writing with O_APPEND to fail. The file was not being properly positioned to the end of the file in that case. * NSH now supports last exit status $? * NSH now supports if-then[-else]-fi construct * NSH now supports comments beginning with '#' * NSH now supports commands to inspect and modify memory * NSH cat command now supports multiple files on command line * Add chdir() and getcwd() * Fix error in getopt() when called with argc==1 * Fix error in stat() when used on the root directory * NSH: Add cd and pwd commands and current working directory to all NSH commands that refer to paths. * Fix errors and warnings introduced into Linux sim build because of recent Cygwin-based sim changes * NSH: Add mem command to display heap usage * Added telnet NSH configuration for Neuros OSD. * Basic integration of concurrent telnet/serial NSH functional on Neuros OSD. * Fixed a critical bug that affects the way that environment variables are shared amongst pthreads. * uIP port enhance to support multi-threaded, concurrent socket access. So, for example, one thread can be reading from a socket while another is writing to the socket. 0.3.14 2008-09-08 Gregory Nutt * FAT FS now uses position variable in struct file. This simplifies operations like ftell(). * fseek() needs to discard bytes buffered by ungetc(). * Corrected ftell() return value. * Added fsetpos() and fgetpos(). * NSH: Now supports 'test' and '[' commands * Correct error in send() timeout logic. * Correct error in multi-threaded socket handling in send() and sendto(). Outgoing data could overwrite incoming data. * Add support to uIP for application access to ICMP protocol stacks; Add ping request logic. * NSH: Add ping command * Correct IP checksum calculation in ICMP and UDP message send logic. * NSH: Created an HTML document and a more detailed README file describing NSH. * Added basic TFTP client logic (netutils/tftpc). * NSH: Add get and put commands to support TFTP get and put operations. * NSH: Added a mkrd command that will create a RAMDISK that can be formatted and mounted. * Corrected a critical bug that prevent recvfrom from receiving packets from any remote UDP port. * NSH: Add hexadecimal dump command (xd) * Fixed several critical bugs with regard to fat reading and writing and FAT12 accesses. Basically the FAT FS only worked with my tiny test files and test cases. A lot of stronger FAT tested is needed!! * Fixed another FAT bug in implementation of FAT lseek; this prohibit correct random access to large files. 0.3.15 2008-09-20 Gregory Nutt * Added support for ROMFS filesystem. * Added a simple test the ROMFS filesystem (examples/romfs) * NSH: Use ROMFS to provide an option for a start-up script at /etc/init.d/rcS * Add definition of BIOC_XIPBASE ioctl and implement in RAM disk block driver. This is a low level requirement for eXecute In Place (XIP) support. * Add a FIOC_MMAP to perform memory mapping of a file and implemented the ioctl command in the ROMFS filesystem. This is a requirement for eXecute In Place (XIP) support. * Add mmap() API with restricted capability (only for XIP support) * Extend ROMFS test at /examples/romfs to verify mmap() and XIP support. * Add support for Intel Hex format output using objcopy * Completed the basic port of the NXP LPC2148 on the mcu123.com board. The basic port includes successful booting, timer interrupts, serial console, succesfully passing the examples/ostest, and a NuttShell (NSH) configuration. * ARM architectures now support drivers/lowconsole.c 0.3.16 2008-10-10 Gregory Nutt * Added header files defining a common USB device controller architecture * Added USB device side driver for the LPC214x * Correct the frequency of system timer interrupts in the NXP LPC214x port (off by 20x in nuttx-0.3.15) * Add an option to set aside a separate stack for interrupt handling (ARM only). This is useful when memory is constrained, there are multiple tasks, and the interrupt stack requirement is high (as when USB is enabled). * Added USB serial class device side driver (emulates Prolific PL2303 serial-to-USB adaptor) * Add LPC214x USB serial configuration; Add examples/usbserial test * Added USB device side driver for the DM320 (untested at initial release) * Fixed an error in a previous (post 0.3.15) check-in that broke the LPC214x system timer. * Fixed serial driver bugs related to (1) open counts and (2) recognizing O_NONBLOCK on read. * Fixed an error in read(); it was not setting the errno on errors returned from the driver. 0.3.17 2008-10-28 Gregory Nutt * Incorporate patch "[2164503] nuttx-0.3.16 does not build for ARM with USB disabled" * Reduced the amount of memory reserved for USB serial control requests. It was unnecessarily large. * Added LPC214x SPI1 driver to interface with MMC on mcu123.com board. * Added a simple SPI-based MMC/SD block driver * NSH: Add LPC214x-specific support to NSH; NSH now mounts any SD cards in the slot. * FAT: Fix access to unaligned 32-bit values in partion table (start sector & size) * Fixed a problem with a un-initialized variable in the USB serial driver. * Added USB storage NXP LPC214x configuration * Added a test for USB storage under examples/usbstorage * Fixed a bug in the LPC214x USB driver: It was not properly clearing a HALTed endpoints (other than EP) on receipt of CLEAR FEATURES request. * Added USB storage class device side driver (BBB) * Fixed a bug in the LPC214x USB driver: It was not properly handling request buffers larger then the endpoint's max packet (DM320 driver also fixed, untested) * Added logic to the USB device interface: A bit is needed to force the driver to to terminate an IN transfer with a short packet (zero-length if necessary). * Fix an error in the NXP LPC214x USB device driver that was causing corruption of the request queue (M320 driver also fixed, untested) * Correct another error in the NXP LPC214x USB device driver that caused read failures when the request buffer size was larger than maxpacket. * Numerous corrections/extensions to the USB tracing logic included in 0.3.16 (but not integrated until 0.3.17) * Fixed another bug in the NXP LPC214x USB device driver: After a stalled endpoint is resumed (view CLEAR FEATURE), we must restart the IN (outgoing) queue. 0.3.18 2008-11-16 Gregory Nutt * Added port for the STMicro STR71x processor and configuration for the Olimex STR-P711 board (STR71x testing is stalled because I have been unable to get OpenOCD to communicate with my JTAG wiggler on Linux). * Fix race condition workaround delay in LPC214X SPI logic. This was also the cause of the very bad MMC/SD performance. * Began port of the Hitachi SH-1 using the SH-1/US7032EVB1 board * Re-built all configurations that use SDCC and Zilog toolchains to make sure they still build (they didn't, but they do now). * Fixed several erroneous "list empty" checks in the CAN driver. * Hitachi SH-1 passes (reduced) examples/ostest; the examples/nsh test still fails. There are remaining instabilities that make the port un-usable. The nature of these is not understood; the behavior is that certain SH-1 instructions stop working as advertised. This could be a silicon problem, some pipeline issue that is not handled properly by the gcc 3.4.5 toolchain (which has very limit SH-1 support to begin with), or perhaps with the CMON debugger. At any rate, I have exhausted all of the energy that I am willing to put into this cool old processor for the time being. * Renamed configuration item CONFIG_PROC_STACK_SIZE as CONFIG_IDLETHREAD_STACKSIZE: It now only controls the size of the stack for the IDLE thread. Added CONFIG_USERMAIN_STACKSIZE: This is the size of stack used with the user_start() thread is created. The two stacks no longer have to be the same. * Add a loop device that converts a file into a block device. * Each NSH command can not be disabled through a configuration setting. All of these settings make the configuration of NSH potentially complex but also allow it to squeeze into very small memory footprints. * Added a block to character (BCH) driver. This is kind of the reverse of the loop device; it allows you access a block device like a character device. * Added strcasecmp() and strncasecmp() * NSH: Added the 'dd' command * NSH: Added the 'losetup' command * Fixed a FAT bug: After recent changes, it would mount a (invalid) FAT file system even if the medium is not formatted! * Corrected two important errors in FAT lseek implementation: (1) the sectors-per-cluster value was being reset to "1" and (2) important lseek logic was omitted when the seek position was zero. * Fixed a bug in getopt(). It would fail if on certain combinations of terminal argument types. 0.3.19 2008-11-26 Gregory Nutt * Add poll() and select() APIs (in the initial check-in, these work only with character devices) * Add poll() methods to /dev/null, /dev/zero, pipes, fifos, and serial drivers. * Add examples/poll for testing poll() and select() * Fix hostile behavior of getc, fgetc, getchar, etc.: the serial driver was waiting for a full buffer of read data before return. This means that getc would stall when it needed to refill the input buffer. The old behavior (read full blocks) might be useful in other contexts, so it is still available within the driver as a configuration option. * Implement poll() and select() support for TCP/IP sockets * Fixed an important bug in the TCP/IP buffering logic. When TCP/IP read-ahead is enabled and not recv() is in-place when a TCP/IP packet is received, the packet is placed into a read-ahead buffer. However, the old contents of the read-ahead buffer were not being cleared and old data would contaminate the newly received buffer. * Implemented support for connection backlog. The size of the backlog is specified by the second argument of the standard listen() API. Hooks are provided to support poll()/select() waiting for connections, with a subsequent call to accept() to use the backlogged connection. * Fixed a minor bug in accept(). It should allow the address and addresslen values to be NULL * Added first-cut definition for a framebuffer interface (and simulated framebuffer for testing purposes only) * Added fixed precision math support * Added some color converson routines into what may become a real graphics library someday. * Added a framebuffer driver for the DM320 (untested on initial check-in) * Network: add support for outgoing multicast addresses * Added some rasterizers to the graphics library 0.4.0 2008-12-06 Gregory Nutt * Initial release of a tiny windowing system for NuttX * Add fixed precision sin() and cos() (not well tested at initial check-in) * Add an X11-based simulated framebuffer driver * The simulated target now has an option (CONFIG_SIM_WALLTIME) that will let the simulation run in more-or-less realtime. * Added more extensive window support: frames, toolbars, etc. * Added support for bitmap fonts * Integrated the new font support with a font test in examples/nx * Add documentation for NX graphics subsystem 0.4.1 2009-02-06 Gregory Nutt * Added board support for the ZiLog eZ80Acclaim! ez80f910200zco Development Kit. * Fixed several compilation errors in fixed precision math library when built against toolchains that do not support 64-bit type 'long long'. * Fix errors in some function prototypes in dirent.h * Add eZ80F91 EMAC driver * Fix recvfrom() compilation error: only noted under ZDS * Updated all ARM Make.def files to work with gcc 2.4.2 (However, there are still some build issues associated with that toolchain in use of arm-elf-objcopy -- see the TODO.txt list for details) * Fix problems with Z16F and eZ80 compilation introduced with recent changes. 0.4.2 2009-02-28 Gregory Nutt * M16C: Add support for the Renesas M16C MCU and the SKP16C26 StarterKit. However, the target cannot be built because the GNU m16c-elf-ld link fails with the following message: m32c-elf-ld: BFD (GNU Binutils) 2.19 assertion fail /home/Owner/projects/nuttx/buildroot/toolchain_build_m32c/binutils-2.19/bfd/elf32-m32c.c:482 Where the reference line is: /* If the symbol is out of range for a 16-bit address, we must have allocated a plt entry. */ BFD_ASSERT (*plt_offset != (bfd_vma) -1); No workaround is known at this time. This is a show stopper for M16C. * eZ80Acclaim!: Fix interrupt vectors positioning; they were being positioned wrong by 64 bytes (Kevin Franzen). * eZ80Acclaim!: Corrected some stack handling errors during interrupt handling context save and restore (Kevin Franzen). * eZ80Acclaim!: Corrected vector intialization logic (Kevin Franzen). * eZ80Acclaim!: Corrected overflow problem in the calculation of UART baud rate divisor, the system timer divisor, and the EMAC poll timer. * eZ80Acclaim!: Fixed GPIO pin configuration get serial output * eZ80Acclaim!: Correct stack overflow in ostest example configuration * eZ80Acclaim!: Fixed restoration of interrupts state on interrupt level context swith. 0.4.3 2009-03-04 Gregory Nutt * z8Encore! and eZ80Acclaim!: Fixed the serial driver initialization sequence * eZ80Acclaim!: Fixed error in vector table: Missing space set aside for the "unused" vectors. As a result, all vectors above timer4 were skewed. * eZ80Acclaim!: Fixed logic error in UART interrupt handler. * Many fixes in FAT file system and in NSH for correct compilation with ZDS-II * eZ80Acclaim!: Added and verified a NuttShell (NSH) configuration. * eZ80Acclaim!: Correct endian-ness; defconfig files said BIG endian. * Restructured parts of the uIP port for correct compilation with ZDS-II * eZ80Acclaim!: Complete basic integration of the eZ80F91 EMAC driver. The driver is basically functional and should mature prior to the 0.4.3 release. * Implemented priority inheritance logic for POSIX semaphores. Because the pthread mutexes are built on semaphores, they will have this property as well. 0.4.4 2009-03-29 Gregory Nutt * examples/nsh: A debug option was left on that can (and does) cause infinite loops and stack overflows. * net/uip: Correct calculation of checksum on ICMP ping response. * examples/dchpd: Added a tiny DHCP server example * net/uip: Correct UDP bind behavior. It should select a valid port number if it receives a port number of zero. * netutils/dhcpd: Corrrect for ZDS compiler. Fix issue with re-use of a port number. Fixed a number of broadcast-related problems. * eZ80Acclaim!: Add a tiny webserver configuration * eZ80Acclaim!: Fixed an important bug in the EMAC Tx timeout logic. It was always timing out when the load was heavy and worse, for some reason, resetting the Tx function caused unexpected registers to be reset in the Rcv function was well. * Z80: Patch incorported: "[2696648] Z80: interrupt flag stored in parity bit" (submitted by JPelletier). The is the same fix that was needed for the eZ80 and fixed in 0.4.2. * netutils: Added logic to support a simple wget() function * examples/wget: Added a test for wget() (untested -- see NOTE) * lib/strncasecmp: Fix cut'n'paste error in function name. * NSH: Added wget command (untested -- see NOTE). * examples/sendmail: A simple sendmail example (untested -- see NOTE) NOTE: Features related to wget and sendmail are not tested on the target platform in this release and, hence, most likely have problems. I don't have the correct network setup to perform that testing now (I'm in a hotel). 0.4.5 2009-04-19 Gregory Nutt * Add an enumeration argument to the SPI chip select and status methods so that the interface can handle more than one device. * eZ80Acclaim!: Add a generic SPI driver for all eZ80 boards. * Add a setmode() method to the SPI interface to handle parts with differing mode requirements. * include/nuttx/i2c.h: Defined a standard I2C interface * eZ80Acclaim!: Add an I2C driver. * eZ8Encore!: Add an I2C driver. * Add support for the Freescale i.MX1/L architecture and a configuration for the Freescale MX1ADS development board. * examples/helloxx: Added a simple C++ hello world example * include/css: Added std header files * libxx: New C++-only directory provides support for minimal C++ applications 0.4.6 2009-05-19 Gregory Nutt * Change SPI interface so that is can accomodate interfaces where the number of bits per word is greater an 8 (such as with many 9-bit display interfaces). -- this might have broken a few things which will need to be retested! * arch/arm/src/imx: Added i.MX SPI driver * SPI: Add a method to set the number of bits per word. Also add an alternative interface for so that (eventually) I can phase the sndblock and recvblock methods and replace them with a single exchange method * Build: objcopy fails with toolchains that use newer GCC and binutils. The following arguments need to be included in the objcopy command line "-R .note -R .note.gnu.build-id -R .comment" This has been fixed in arch/arm/src/Makefile, but other architectures may have the same problem. Thanks to Dave Marples for verifying this. * configs/eagle100/ostest: Added support for the MicroMint Eagle100 board. This board has a Luminary LM3S6918 Cortex-M3. Added a configuration to build examples/ostest. * arch/arm/src/lpc214x: Add configuration option to enable fast GPIO (vs. legacy, "slow" GPIO) for LPC214x. * arch/arm: Restructured the arch/arm directory structure to better support ARM and Cortex-M3. * sched/: pthread_create() must return a (non-negated) errno value on failure. * configs/eagle100/nsh: Add a NuttShell (NSH) configuration for the Eagle-100 0.4.7 2009-05-29 Gregory Nutt * arch/arm/src/lm3s: Added an Ethernet driver for the LM3S6918 * configs/eagle100/nettest: Added an examples/nettest configuration for the Micromint Eagle100 board. * Documentation/NuttxPortingGuide.html: Added a section on NuttX device drivers. * configs/eagle100/httpd: Added an examples/uip configuration for the Micromint Eagle100 board. * arch/arm/src/lm3s: Added an SSI driver for the LM3S6918 * examples/nsh: Added MMC/SD support for the LM3S6918 * arch/arm/src/lm3s: Fix logic for setting and clearing output GPIOs (critical fix!). * drivers/mmcsd: Found numerous errors in current MMC/SD SPI driver. Bad frequency calculation based on CSD settings, inappropriate timeouts, odd code that looks like a bad search and replace. Also needs support for SDHC ver 2.x. New MMC/SD is largely redesigned and probably non-functional in the first check-in. * drivers/mmcsd: Changes verified on 4Gb Kingston microSHDC card and on a 2Gb SanDisk microSDC card on the Eagle100 platform. * fs/fat: With the 4Gb card, the first tests of FAT32 were (finally) performed. Found and corrected a problem that prevented use of FAT32: It was not updating the sector cache before checking the FAT32 FSINFO sector. * configs/eagle100/*/Make.defs: Added configuration options that should make it possible to build NuttX for the Eagle100 using CodeSourcery 2009q1 toolchain and the devkitARM GNU toolchain. * configs/mcu123-lpc214x/src: Corrected some logic in the LPC2148 SPI receive block logic. Re-verified SDC ver1.x support with 1Gb Toshiba SDC, 1Gb PNY SDC, and 4Gb Kingston SDHC. There are CMD0 issues with the 2Gb SanDisk SDC on this board. * fs/fs_mount.c: Corrected error handling that could cause a deadlock on certain mount() failures. 0.4.8 2009-06-13 Gregory Nutt * lib/lib_*stream.c: Extend internal stream logic to support incoming streams. * arch/arm/src/str71x: Serial output is now correct and timer interrupts are working. The test at configs/olimex-strp711/ostest passes. This means that the basic STR-P711 port is complete. * configs/olimex-strp711/nsh: Add and verified a NuttShell (NSH) configuration for the STR-P711. * arch/arm/str71x/str71x_serial.c: The STR711 interrupt driven serial driver finally works after some extradinary measures to handle missed interrupts. NSH is fully functional on the Olimex STR-P711 board. * example/nsh: Moved architecture specific files from NSH directory to board- specific directories. * config/olimex-strp711/src/up_nsh.c: Add an NSH board specific directory for for the Olimex STR7P11 board. * Fixed build of LM3X6918 using the CodeSourcery Windows native toolchain. There were lots of issues with Cygwin paths and Cygwin symbolic links. These changes may work with the devarmKIT as well, but that remains untested. * The NXP LPC2148 and STR711 targets can now also be built using the CodeSourcery or devkitARM Windows native toolchains. 0.4.9 2009-06-26 Gregory Nutt * Add strtoll() and strtoull(); Add macros for atol() and atoll(). * dup() and dup2() will now clone socket descriptors * All socket descriptors are now cloned when a new task is started via task_create(). * Add configuration options to suppress or eliminate cloning of file and/or socket descriptors when a new task is started by task_create(): CONFIG_FDCLONE_DISABLE, CONFIG_FDCLONE_STDIO, CONFIG_SDCLONE_DISABLE. * Use of C++ reserved word 'private' in C header files causes problems for C++ that include them. * Added 'binfmt' support to allow execution of programs in a file system, binding to NuttX symbols. A custom format call NXFLAT is used; this derives from http://xflat.sourceforge.net. At present is supports on XIP execution from ROMFS file systems. Initial check-in is untested and probably breaks many builds. * examples/lib: Added qsort() * examples/nxflat: Added support for symbol tables * Correct logic that creates compiler include paths. On Cygwin, the include paths for Cygwin-based GCC were being converted to windows native paths. That causes many problems -- breaking dependencies for one. * Fixed an important bug in ROMFS. The initial XIP offset was set incorrectly so if sector zero was read first, there was a bad read. I don't know how it worked before. * arch/arm/src/common/up_use_stack.c. Fixed a fatal stack setup error. This file has been around for a long time, but I don't think it has every been used before (i.e., prior to the NXFLAT logic) 0.4.10 2009-08-08 Gregory Nutt * lib/: Added some basic regex-subset, pattern matching functions * lib/: Greatly simplified mktime() and gmtime_r(). The Gregorian and Julian time calculations were interesting, but not necessary in the typical embeddd system. * sched/: Added gettimeofday(). This implementation is simply a thin wrapper around clock_gettimer(). * lib/: Add gmtime(), localtime(), and strftime() * binfmt/: Add exec(). This is just a wrapper that executes both load_ and exec_module() in a more familiar manner. It is not consistent with more standard exec() functions, however, because (1) it returns and (2) it requires symbol table arguments. * lib/: Add fileno() * examples/ostest: Several of the tests used a big, hard-coded stack size when creating test threads (16Kb stacksize). The stack size should be controlled by the .config file or the OSTest won't work on platforms with memory constraints. * netutils/thttpd: An initial port of Jeff Poskanzer's THTTPD HTTP server. See http://acme.com/software/thttpd/. * examples/thttpd: A basic test program for THTTPD * configs/eagle100/thttpd: A build configuration for THTTPD on the Micromint Eagle-100 LMS6918 (Cortex-M3) board. * configs/ntosd-dm320/thttpd: A build configuration for THTTPD on the Neuros DM320 platform. * lib/: Added strstr() and strpbrk(). * net/recvfrom.c and net/accept(): Sockets now support some non-blocking operations, specifically for (1) TCP/IP read operations when read-ahead buffering is enabled, and (2) TCP/IP accept() operations when TCP/IP connection backlog is enabled. * fs/fs_fcntl.c and net/net_vfcntl.c: Minimal support provided for fcntl(). It can, at least, be used to mark sockets as blocking or non-blocking. * net/net_close.c: Fix bug in close(). If reference count not set to zero then uip_tcpfree() will assert when DEBUG is enabled. * net/accept.c: Fix bug in accept(). The logic expected parts of the return address structure to be initialized or it would return an error. 0.4.11 2009-09-16 Gregory Nutt * fs/fs_read.c and fs/fs_write.c. read() and write() to socket is the same as recv() and send() with flags = 0. Fixed! * net/recvfrom.c: Fix errors in return value from non-blocking socket read. * lib/lib_strcasecmp.c and lib/lib_strncasecmp.c. Use of post-incremented argument to macro caused strcasecmp() and strncasecmp() to fail. * lib/lib_strstr.c: Length of substring off by one causes false alarm sub-string matches. * arch/arm/src/lm3s/lm3s_ethernet.c: Fix errors in LMS6918 FIFO length handling. (1) The incorrect size of the Ethernet header was being subtracted on outgoing messages (4 vs 14), which caused outgoing messages to be a little too long. (2) The size of incoming FIFO messages is 6 bytes larger than it expected (2 for the length and 4 for the FCS). The unhandled extra two bytes of length cause the driver to sometimes read one too many words from the received FIFO (corrupting the next queued receive packet, if any). * net/net_poll.c and net/uip/uip_tcpbacklog.c. Fixed an important race condition bug in polling for connections. The logic worked if the poll was inplace before the connection was received; but the poll failed to awaken if the connection was already pending in the backlog when poll() was called. * net/net_close.c. Fixed another important TCP/IP race condition bug: If the host closes the TCP connection just before the target calls close(), then the close operation may hang indefinitely! * net/net_tcppoll.c. Removed an unnecessary check for outstanding, un-ACKed data. The NuttX socket layer keeps track of ACKs and doesn't need this check; removing the check should improve write throughput * Add DEBUG configuration option to enable debug console output without disabling optimization (and vice versa) * Changed lots of occurrences of debug macro dbg() to lldbg(). dbg() uses stdout to output debug data. That works fine unless (1) the dbg() macro is interrupt logic and the interrupted task has redirected stdout! Most changes were in uIP. * net/uip/uip_tcpinput.c. Connection reference count was not being set correctly when a socket is created by accepting a new connection. Since the reference count is bad, such sockets are not successfully duplicated when being passed to new tasks. * net/net_clone.c. Similarly, after a socket is cloned, its reference count was not being initialized. * lib/lib_strstr.c. Improperly incremented pointer could cause comparison failures. * net/. Connection reference count must always be set to zero before calling uip_tcpfree() or it could trigger a DEBUGASSERT that verifies that the reference count is zero before freeing a connection structure. * net/uip/uip_listen.c. uip_accept() consulted the wrong list to find the listener on a socket. The previous logic worked most of the time, but occasionally picked the wrong listener. * net/net_close.c and net/net_sockets.c. Sockets were not being closed when a task exits. If many server tasks are created and exit without closing sockets (such as with CGI tasks), then eventually, you will run out of sockets. * netutils/thttpd. Basic functionality of THTTPD is complete. This includes serving up files from a file system and executing NXFLAT-based CGI programs and pipe the stdout back to the HTTP client. 0.4.12 2009-10-17 Gregory Nutt * arch/arm/src/stm32 and configs/stm3210e-eval. Added basic support for the STMicro STM32, Cortex-M3 MCU. The specific port is to the STMicro STM3210E-EVAL development board based around the STM32F103ZET6 MCU. * configs/stm3210e-eval/RIDE. Added a basic STMicro RIDE7 project that can be used to perform basic STM32 board bring-up (due to RIDE7 size limitations, it cannot be used for the full NuttX bring-up). * configs/stm3210e-eval/ostest. The STM32 now passes the basic NuttX OS test at examples/ostest. The rest should be a piece of cake. * configs/stm3210e-eval/nsh. Added NuttShell (NSH) example. * configs/stm3210e-eval/src/stm32102e-internal.h. Fix on-board LED GPIO definitions. * arch/arm/src/stm32/src/stm32/stm32_dma.c. Added DMA channel support for the STM32 * arch/arm/src/stm32/src/stm32/stm32_spi.c. Added a DMA-based SPI driver for the STM32. * arch/arm/src/stm32/src/stm32/stm32_serial.c. Finished interrupt-driven, USART console driver. This makes NSH work perfectly. * Things left to do for the STM32 deferred to the 0.4.13 release: USB device driver, LCD driver and NX bringup on the eval board's display and MicroSD support. An SPI driver was included in the 0.4.12 release, but is not yet tested. 0.4.13 2009-11-04 Gregory Nutt * include/nuttx/mtd.h. Added a simple interface definition to support some FLASH, EEPROM, NVRAM, etc. devices. * driver/mtd/m25px.c. Added a driver for SPI based FLASH parts M25P64 and M25P128. * configs/stm3210e-eval/usbserial. Add a USB serial configuration for the STM32. Depends on the STM32 USB driver. * arch/arm/src/cortexm3/up_switchcontext.S & up_svccall.c. Made an improvement to context switching. There are two types of context switches: interrupt context switches and background/user context switches. This change should improve the performance of those background/user context switches by a factor of about two. * arch/arm/src/stm32/: fix several typos in the serial logic. It turns out that these typose don't make any difference as long as you use only one serial port and all uarts are configured the same. But the typos are bugs waiting to happen in any other configuration. * arch/arm/src/stm32/: You have to configure CTS/RTS function pins for USART 2 and USART 3 even if you are not using flow control. * arch/arm/src/stm32/stm32_usbdev.c: Added a USB device-side driver for the STM32. NOTE: This is an early release of the USB driver. There is at least one known issue. The examples/usbserial test only executes correctly under certain conditions (see the full bug description in the TODO list). * arch/arm/src/stm32/stm32_rcc.c: Fixed an error in clock initialization. On some boards (none of mine), the HSE (high speed external clock) delay loop times out if the optimization level is high. The STM32 then falls back to the HSI (internal clock), and the system clock is too slow by a factor of 11.1%. This was fixed by simply add the volatile storage class to the timeout loop counter * arch/arm/src/stm32/stm32_irq.c: Fixed a critical bug in the interrupt control logic. The wrong register was being used for interrupts in a certain range. Worked fine until you try to use an interrupt in that range! 4.14 2009-12-02 Gregory Nutt * arch/arm/src/stm32/stm32_gpio.c: Add support for configure an input GPIO to generate an EXTI interrupt. * config/stm3210e-eval/src/up_buttons.c: Add support for on-board buttons. * include/nuttx/rwbuffer.h: Add generic support for read-ahead buffering and write buffering that can be used in any block driver. * include/nuttx/wqueue.h: Added a generic worker thread that can used to defer processing from an interrupt to a task. * include/nuttx/sdio.h: Defines a generic SD/SDIO interface can can be bound to a MMC/SD driver to provide SDIO-based MMC/SD support. * drivers/mmcsd/mmcsd_sdio.c: Provides an SDIO-based MMC/SD driver. * arch/arm/src/stm32/stm32_sdio.c: Provides an STM32 implementation of the SDIO interface defined in include/nuttx/sdio.h. * fs/fs_mount.c: Correct error handling logic. If the bind() method fails, then a reserved node is left in the tree. This causes subsequent attempts to mount at the location to fail (reporting that the node already exists). This is a problem for block drivers for removable media: The bind method could fail repeatedly until media is inserted. * arch/arm/src/stm32/chip.h & stm32_dma.c: Fixed several definitions that can cause compilation errors when DMA2 is enabled. * arch/arm/src/stm32/stm32_dma.c: Integrated and debugged STM32 DMA functionality that was added in 0.4.12. * configs/stm3210e-eval/usbstorage: Add a configuration to exercise the STM32 with the USB mass storage device class example (examples/usbstorage). * configs/mcu123-lpc214x/up_usbstrg: Move LPC-specific code from examples/usbstorage to configs/mcu123-lpc214x. * configs/stm321e-eval/up_usbstrg: Add STM32-specific logic for the examples/usbstorage test. * arch/arm/src/stm32/stm32_usbdev.c: Fix bugs in STM32 USB device-side driver: (1) Need to disconnect after reset received, (2) Status setup to recover from stall on TX endpoint. 5.0 2009-12-21 Gregory Nutt * arch/hc: Adding framework to support m68hc11/12 * configs/demo9s12ne64: Configuration to support Freescale DEMO9S12NE64 development board (MC9S12NE64 m68hcs12 processor). * drivers/mtd/ftl.c: A FLASH translation layer (FTL) has been implemented. This layer will convert a FLASH MTD interface into a block driver that can be used with any file system. Good performance of this layer will depend upon functioning write buffer support! NOTE: FTL support is untested as of the initial check-in. * Numerous minor changes for m68hc12 to eliminate compilation errors and warnings due to the fact that it uses 16-bit integer types and for casts between uint32 (32-bits) and an mc68hc12 pointer (16-bits). * sys/types: Size of off_t and blkcnt_t should not depend on size of int in the architecture; Removed non-standard type STATUS * include/: Added header files stdint.h, stdbool.h, cxx/cstdint, and cxx/cstdbool * Changed ALL references to non-standard fixed-size types (like uint32, ubyte, etc.) to standard types (like uint32_t, uint8_t, etc.) from stdint.h. Use type bool and {true, false} from stdbool. This effected most of the files in the system! Almost all configurations have been re-built and many have been re-verified in order to get confidence in these changes. * graphics/ and examples/nx: Fix numerous build errors that have been introduced lately. NXGL has suffered some bit-rot from not being used in some of the most recent ports. * The misc/pascal NuttX add-on package has been updated to use the new standard types from stdint.h and stdbool.h and re-integrated with NuttX. The released pascal-2.0 will be the first version that contains the compatible changes. * arch/arm/src/lm3s/lm3s_ethernet.c: Fixed an important bug in the LM3S Ethernet driver: If full packet is received, the packet-too-big check will fail because it needs to subtract 6 from the packet size (to account for the 2-byte packet length and the 4-byte packet FCS in the FIFO). * net/accept.c: Fixed a bad assertion (only happens when debug is enabled). * net/send.c net/uip/uip_tcpseqno.c: Fixed a critical error in the TCP/IP logic. The NuttX port of uIP imcludes logic to send data ahead without waiting for ACKs from the recipient; this greatly improves throughput. However, the packet sequence number was not being updated correctly and, as a result, packets were not be ACKed by the recipient and transfers would sometimes stall. This is a very important bug fix (in fact, I don't understand how TCP/IP worked at all without this fix???) * include/nuttx/arch.h and arch/*/common/up_udelay.c: Change argument of up_udelay() to type useconds_t to avoid warnings when sizeof(int) is 16-bits. * drivers/mmcsd/*: Add casts in constant expressions to avoid warnings when sizeof(int) is 16-bits. 5.1 2010-01-30 Gregory Nutt * arch/arm/src/lpc313x and arch/arm/include/lpc313x: Added framework to support the NXP LPC3131. * Add configs/ea3131. The LPC3131 port for the Embedded Artist EA3131 (LPC3131) is code complete and waiting for me to get hardware in hand. * arch/arm/src/sam3u, arch/arm/include/sam3u, and configs/sam3u-ek - Added the basic framework needed to begin a port for the SAM3U-EK development board. * lib/lib_crc32.c: Add CRC32 logic by Gary S. Brown to lib/. This is the larger (but faster) table look-up version of the CRC32 algorithm. * confgs/ea3131/tools: Added a tool to create a image suitable for use with the LPC313x bootloader. * configs/sam3u-3k/ostest: Completed verification of the basic NuttX OS test for the SAM3U. * arch/arm/src/common/up_createstack: stack was always been cleared when it was allocated. This is a good feature for monitoring the stack during debug, but really hurts thread start-up performance. Clearing is now done if CONFIG_DEBUG=y only. Changes was only made for arm, but really should be made for all architectures. * configs/sam3u/nsh: Added NSH configuration for SAM3U 5.2 2010-03-18 Gregory Nutt * arch/arm/src/sam3u/sam3u_pio.c: Fix an address calculation error that caused ports B & C to get mapped to the PIOA base address. This is an important bugfix! (a patch is available) * arch/arm/src/lpc313x/lpc313x_boot.c: Fix an error in the vector initialization was causing a memory fault. * lib/lib_strtod.c: Add strtod() * lpc3131/ea3131: Several bring fixes submitted by David Hewson. The lpc3131 is almost there! Thanks David! * arch/arm/src/arm/up_head.S: Corrected backward conditional compilation that selects if vectors are located at 0x0000:0000 or 0xffff:f000. This fixes the last show stopper bug in the lpc313x bring-up. * configs/ea3131/nsh: Added a NuttShell (NSH) configuration for the EA3131. 5.3 2010-04-11 Gregory Nutt * arch/arm/src/lpc313x/lpc313x_usbdev.c: USB driver for the LPC313x contributed by David Hewson. * configs/ea3131/src/up_ubstrgc.c, configs/ea3131/usbserial, configs/ea3131/usbstorage: USB storage and USB serial example support contributed by David Hewson. * Several important compilation error fixes in lpc313x and (dualspeed) USB code also contributed by David Hewson. * arch/arm/src/sam3u/sam3u_dmac.c: DMA support for the AT90SAM3U. * arch/arm/src/sam3u/sam3u_hsmci.c: SD memory card support for AT90SAM3U (Neither the DMA nor the HSMCI driver are functional on the initial checkin). * drivers/usbdev: Several important fixes to the USB mass storage driver submitted by David Hewson. * configs/olimex-lpc2378, arch/arm/include/lpc2378, and arch/arm/src/lpc2378 - Basic port of the NXP 2378 on the Olimex board contributed by Rommel Marcelo. * arch/arm/src/sam3u/sam3u_internal.h: Fixed a critical bug in the AT91SAM3U PIO decoding. No PIOs greater than 15 could be used on any port! Obviously, no one has been using this port. 5.4 2010-04-23 Gregory Nutt * include/nuttx/lcd.h: Defines an LCD interface. * graphics/nxglib/fb and lcd: Support LCD and framebuffer rasterizers for NX. * configs/sam3u-ek/src/up_lcd.c: LCD driver for LCD on SAM3U-EK development board. * configs/sam3u-ek/nx: NX graphics configuration for the SAM3U-EK 5.5 2010-05-09 Gregory Nutt * drivers/net/enc28j60.c: Microchip ENC28J60 SPI Ethernet chip driver. (untested on original check-in). * configs/olimex-str7p11/nettest: examples/nettest configuration using the ENC28J60 driver on the Olimex STMicro STR-P711. (unverified on original check-in) * configs/olimex-str7p11/src/up_enc28j60.c: Add ENC28J60 initialization logic. * configs/olimex-str7p11/src/up_spi.c: Fixed some bugs; added support for ENC28J60. * arch/arm/src/str7x/str7x_xti.c: Add basic XTI support (external interrupts). * arch/arm/src/lm3s and arch/arm/include/lm3s: Add definitions for LM3S6965 * configs/lm3s6965-ek: Add configuration for Stellaris LM3S6965 Evaluation Kit (including basic examples/ostest configuration) * lib/lib_dtoa.c and lib/lib_dtoa.c: printf will not print floating point values if you select CONFIG_LIBC_FLOATINGPOINT in your configuration file. Contributed by Yolande Cates. NOTE: these floating point operations have not been well tested and may not be portable to all floating point implementations. * configs/lm3s6965-ek/nsh: Added NuttShell (NSH) configuration for the LM3S6965 Evaluation Kit. Includes both serial and telnet interfaces. * net/net_close.c: Correct a UDP reference counting error 5.6 2010-06-05 Gregory Nutt * drivers/lcd/p14201.c: Driver for RiT P14201 series 128x96 4-bit OLED. * configs/lm3s6965-ek/nx: NX graphics configuration for the LM3S6965 Ethernet Evaluation Kit. * graphics/: Numerous fixes to get the P14201 4-bpp grayscale display working (there may still be some minor issues .. see the TODO list). * arch/arm/include/lpc17xx and arch/arm/src/lpc17xxx: Began port for NXP LPC1768. As of the 5.6 release, there is a complete set of LPC17xx header files defining all bits in all LPC17xx registers, but little else (I still do not have hardware in hand). * drivers/mtd/m25px.c: Add support for M25P1 flash part (See NOTE) * include/nuttx/i2c.h: Extended I2C interface definition to handle multiple transfers (See NOTE). * include/nuttx/usbdev.h: Corrected an important macro definition needed to correctly handle USB null packet transfers (See NOTE). * arch/arm/src/lpc313x: New drivers: I2C and SPI. Plus several important LPC313x USB bug fixes (See NOTE). NOTE: Contributed by David Hewson. 5.7 2010-06-22 Gregory Nutt * configs/nucleus2g: Add ostest configuration for the Nucleus 2G LPC1768 board from 2G Engineering (http://www.2g-eng.com/) * arch/arm/src/lpc17xx: Added basic LPC17xx boot-up logic, interrupt handling, and GPIO configuration. * configs/nucleus2g/ostest: Completed bring-up of LPC1768 on the Nucleus2G board using the examples/ostest * configs/nucleus2g/nsh: Added and verified a NuttShell (NSH) configuration for the LPC1768 on the Nucleus2G board. 5.8 2010-07-18 Gregory Nutt * configs/nucleus2g/src/up_nsh.c and up_ssp.c: Add support for SPI-based MMC/SD cards and integrate into the NSH example. * arch/arm/src/lm3s/lm3s_vectors.S: Correct vectors for GPIOC & D interrupts. * arch/arm/src/lpc17xx/lp17_clockconfig.c: Power was not being provided to GPIO module. This is a critical bugfix! * arch/arm/src/lpc17xx/lpc17_serial.c: Improved logic to handle missed TX interrupts. * arch/arm/src/lpc17xx/lpc17_ssp.c: Fix a hard fault during SSP initialization. * configs/nucleus2g/src/up_led.c: Change how LEDs are controlled so that they can be used both for NuttX instrumentation and by application software. * include/net/uip/igmp.h and uip-igmp.h: Add header files ini preparation for NuttX IGMP support * net/uip/uip_igmp*.c: Add IGMP support (untested on initial checkin). * examples/igmp: Add a trivial test for IGMP (much more is needed) * configs/nucleus2g/usbserial and usbstorage: Add USB configurations for testing purposes. * arch/arm/src/common/up_internal.h, cortexm3/up_assert.c, */*_vectors.S: Correct compilations errors when CONFIG_ARCH_INTERRUPTSTACK is enabled (feature still not tested) 5.9 2010-08-25 Gregory Nutt * examples/nsh/nsh_telnetd.c: Fix compilation errors that happen when both DHCPC and TELNETD are enabled in the Nuttshell. * graphics/nxglib/fb/nxglib_moverectangle.c: Fix a logic error that caused an uninitialized variable warning. I still don't have a test to prove that the changes are correct. * configs/olimex-lpc2378: Add support for the CodeSourcery toolchain under Linux (contributed by Alan Carvalho de Assis). * arch/arm/src/lpc17xx/lpc17_gpio.c: Fix an important GPIO configuration bug: When attempting to set no pull-up or pull-down (floating), it would, instead, select pull-down. * arch/arm/src/lm3s/lm3s_gpioirq.c: Fix warning for returning a value from functions returning void (contributed by Tiago Maluta). * netutils/dhcpc/dhcpc.c: lease_time was not in host order * examples/uip/main.c: if DHCPC is selected, this example now shows the assigned IP address. * arch/arm/src/lm3s and arch/arm/include/lm3s: Definitions for the TI LM3S9B96 contributed by Tiago Maluta. * arch/arm/src/lm3s/lm3s_gioirq.c: Fix a logic error in the address table lookup. * arch/arm/src/lm3s/lm3s_gioirq.c: Also needs to enable the global GPIO interrupts. * arch/arm/src/lm3s/lm3s_internal.h and lm3s_gpio.c: Fixed the encoding of GPIO port number that limited support for GPIO ports to 8 * sched/pg_*.c and *.c and include/nuttx/page.h: Implemented the common, core logic for on-demand paging. See http://www.nuttx.org/NuttXDemandPaging.html for details. * drivers/usbdev/usbdev_serial.c: Correct compilation errors that occur if CONFIG_USBDEV_DUALSPEED is selected. * configs/ea3131/pgnsh: Add an NSH configuration with on-demand paging enabled. This is not expected to be a functionality configuration (at least not yet); it was created in order to debug the on-demand paging feature. * configs/ntosd-dm320/*/Make.defs: Codesourcery and devkitARM toolchains now supported for the Neuros OSD. * configs/ntosd-dm320 and arch/arm/src/dm320: Add support for the Neuros production OSD (changes contributed by bf.nuttx). 5.10 2010-09-07 Gregory Nutt * configs/ea3131/locked: Create logic to support a two pass build process: The first pass forces critical logic into the locked text region, the second pass builds the NuttX executable more-or-less as normal. * Makefile, arch/arm/src/Makefile, configs/ea3131: Add logic to support a two-pass final link. This logic is only in place in the arch/arm/src/Makefile for now. * arch/arm/src/lpc17xx/lpc17_internal.h: Add missing parentheses in macros definitions (patch submitted by Tiago Maluta). * Documents/NuttxPortingGuide.html, configs/README.txt, etc. - Replaced CONFIG_EXAMPLE with CONFIG_APP_DIR (see documents for desciption). This allows NuttX application code to be built outside of the examples/ directory. For people who have their own configurations and/or Makefiles, you will need to make a couple of changes: - Replace all occurrences of CONFIG_EXAMPLE=foobar with CONFIG_APP_DIR=examples/foobar in all of the configuration files. - Replace any occurrences of examples/$(CONFIG_EXAMPLE) with $(CONFIG_APP_DIR) - Replace any occurrences of lib$(CONFIG_EXAMPLE)$(LIBEXT) with libapp$(LIBEXT) in your Makefiles. - Check any other occurrences of CONFIG_EXAMPLE. * arch/arm/src/lpc313x/lpc313x_spi.c: Fix compilation error when when CONFIG_DEBUG is enabled. * arch/arm/src/lm3s and arch/arm/include/lm3s: Support for the lm3s8962 contributed by Larry Arnold. * configs/lm328962-ek: Support for the TI/Stellaris EKC-LM3S8962 board (also contributed by Larry Arnold). * arch/arm/src/lpc313x/lpc313x_boot.c: The call to lpc313x_boardinitialized() should not be conditioned on CONFIG_ARCH_LEDs being defined! * arch/arm/src/lpc313x/: APB0 and APB1 cannot lie in different sections; they are too close together. * arch/arm/src/lpc313x/lpc13x_boot.c: Resetting all of the clocking had a side effect of wiping out the first 6 words of memory where the interrupt vectors are located (and also not resetting the fractional dividers). This is not usually noticeable because the IRQ vectors are after this point, but really causes problems if you want to handle data and prefectch aborts which are within this zeroed region. 5.11 2010-10-01 Gregory Nutt * configs/ea3131/src/up_fillpage.c: Added new configuration item CONFIG_PAGING_BINPATH. If CONFIG_PAGING_BINPATH is defined, then it is the full path to a file on a mounted file system that contains a binary image of the NuttX executable. Pages will be filled by reading from offsets into this file that correspond to virtual fault addresses. up_fillpage.c implements logic to perform page files using the CONFIG_PAGING_BINPATH file. * configs/mbed: Add configuration to support the mbed.org LPC1768 board (Contributed by Dave Marples). * sched/sem_wait.c and sem_waitirq.c: Eliminate a race condition that can occur when a semaphore wait is interrupt by a signal. (see email thread: http://tech.groups.yahoo.com/group/nuttx/message/530) * drivers/mtd/at45db.c: Add a driver for the Atmel AT45DB161D 4Mbit SPI FLASH part (untested on initial check-in). * arch/arm/src/lm3s and arch/arm/include/lm3s: Corrections for the lm3s8962 port contributed by Larry Arnold. That port is purported to work correctly with these changes in place. * examples/ostest/prioinherit.c: Need to reinitialize globals if test is ran repeatedly in a loop. * configs/ez80f910200zco: Updated to used ZDS-II 4.11.1 5.12 2010-10-26 Gregory Nutt * arch/avr: Add a place to support AVR family processors. * arch/avr/include/avr32 and arch/avr/src/avr32: Add support for AVR32 (all of the AVR32 is a work in progress). * arch/avr/include/at32uc3 and arch/avr/src/at32uc3: Add support for the AVR32 UC3A/B family of AVR32 MCUs. * confgs/avr32dev1: Add support for the Atmel AVR32DEV1 board featuring the AT32UC3B0256 MCU. This board is produced by www.mcuzone.com. * include/stdlib.h, lib/Makefile, lib/lib_abs.c, lib/lib_labs.c, lib_labs.c, lib_llabs.c, lib_imaxabs.c: Add abs(), labs(), llabs(), and imaxabs(). * Add include/inttypes.h * arch/hc/src/mc9s12ne64: This hcs12 port grew a few more files. But it is still a long way from complete. * arch/*/src/*/*_sigdeliver.c: Fixed a serious error in the signal trampoline logic. Essentially, interrupts are re-enabled while the signal handler executes, but the logic to re-disable the interrupts before returning from the signal handler trampoline was missing. Under certain circumstances, this can cause stack corruption. This was discovered by David Hewson on an ARM9 platform, but since the code has been leveraged, the bug has been propogated from ARM to Cortex-M3, AVR32, M16C, SH1, ZNEO, eZ80, Z8, and Z80 -- almost every architecture. The correction has been incorporated for all architectures but only verified on a few. 5.13 2010-11-09 Gregory Nutt * lib/lib_strnlen.c: Added POSIX 2008 strnlen() function. Contributed by Michael Hrabanek. * Fix wild, consistent naming error. For some reason, I called the at32uc3* parts at91uc* everywhere. Fixed by changing lots of files and directories. * configs/avr32dev1/ostest: The AVR32 port now successfully passes the examples/ostest. We have a good AVR32 port! * configs/avr32dev1/nsh: Added a configuration to support the NuttShell (NSH). As of this writing, here is a problem receiving serial data (this is, very likely, my hardware setup). * lib/lib_open.c: Fix an error in fdopen when a valid file desciptor does not refer to an open file. * configs/olimex-lpc1766stk: Add support for the Olimex LPC1766-STK development board. The OS test and NSH configurations (only) have been verified. 5.14 2010-11-27 Gregory Nutt * configs/olimex-lpc1766stk/nettest: Add examples/nettest configuration to verify the LPC17xx Ethernet driver currently under development. * arch/arm/src/lpc17xx/lpc17xx_ethernet.c/.h: Began development of the LPC17xx Ethernet driver. Driver in CVS functional after 2010-11-23. * sched/timer_settime.c: Fix an error in set-up of a one-shot POSIX timer. It was using the repititive timer value (which is zero in the one-shot case), always resulting in a 10Ms timer! Found and fixed by Wilton Tong. * arch/arm/src/lpc17xx/lpc17_vector.S, stm32/stm32_vector.S, lm3s/lm3s_vector.S, sam3u/sam3u_vector.S: Fixed a hard fault problem that can occur if certain types of interrupts are pending at the time another interrupt returns (SYSTICK). This has not been verified on all plaforms, but is a critical fixed that is needed by all Cortex-M3 NuttX users. * configs/olimex-lpc1766stk/thttpd: Add a THTTPD configuration for the Olimex LPC2766-STK board. Verified successfully. * net/uip/uip_tcpappsend.c: Correct an important logic bug in some uIP state data the is used to manage retransmissions. The uIP logic was incompatible with the retransmission logic of net/send.c in one place. The final error was that the final packet in a sequence of packets was too large! In the THTTPD example, this would leave some garbage at the bottom of the display (or worse). I don't know why I haven't see this bug before??? * net/uip/uip_tcpinput.c: The change to uip_tcpappsend.c unmasked an additional error in the TCP sequence number handling. This sympom was that the send() function would hang with outstanding, unacknowledged data (with no re-transmit requests). The was due to differences in sequence number handling in send() and in uip_tcpinput.c; uip_tcpinput.c thought (incorrectly) that all of the bytes were acknowledged; send.c knew that they were not. 5.15 2010-12-12 Gregory Nutt * net/uip/uip_tcpaddsend.c and net/send.c: Another place where the TCP sequence number problem "fixed" in 5.14 might occur. * net/send.c: Check if the destination IP address is in the ARP table. If not, then don't consider the packet sent. It won't be, an ARP packet will go out instead. This improves behavior, for example, on the first GET request from a browser. * arch/arm/src/lpc17xx/lpc17_emacram.h and lpc17_allocateheap.c: The Ethernet logic was using all of AHB SRAM Bank0 for Ethernet packet buffers (16Kb). An option was added to limit the amount of SRAM used for packet buffering and to re-use any extra Bank0 memory for heap. configs/olimex-lpc1766stk/nettest now uses only 8Kb at the beginning of Bank0; the 8Kb at the end of Bank0 is included in the heap * arch/arm/src/lpc17xx/lpc17_ssp.c: Fix compilation errors when SSP1 is selected. * configs/olimex-lpc1766stk/nsh: Enable network and SD/MMC card support in NSH. Networking and telnetd interface as well as SPI-based microSD are now functional. * examples/nsh/nsh_netinit.c: Fix NSH bug. If CONFIG_NET is selected, but CONFIG_EXAMPLES_NSH_TELNETD is not selected, then the network is never initialized and bad things happen if you try to ping. * drivers/lcd: Add header files for the Phillips PCF8833 LCD controller and for the Epson S1D15G10 LCD controller. A driver for the Nokia 6100 LCD is coming. * include/nuttx/spi.h and almost all other SPI files: Added an optional cmddata() method to the SPI interface. Some devices require an additional out-of-band bit to specify if the next word sent to the device is a command or data. This is typical, for example, in "9-bit" displays where the 9th bit is the CMD/DATA bit. The cmddata method provides selection of command or data. * drivers/lcd/p14201.c: Now uses the cmddata() method of the SPI interface. * arch/arm/src/lpc17xx/lpc17_usbdev.c: LPC17xx USB driver now appears to to be fully functional. examples/usbstorage configuration verified (the examples/usbserial configuration is untested). * drivers/usbdev/usbserial.c and usbstorage.c: All USB class drivers need to call DEV_CONNECT() when they are ready to be enumerated. That is, (1) initially when bound to the USB driver, and (2) after a USB reset. * drivers/lcd/nokia6100.c: A driver for the Nokia 6100 LCD. This driver has not be verified as of the initial check-in. * configs/olimex-lpc1766stk/nx: A NX graphics configuration for the Olimex LPC1766-STK board using the Nokia 6100 LCD driver. This configuration has not been verified as of the initial check-in. * include/nuttx/spi.h: the SPI_SETBITS macro was calling the setmode method. This is a very important bug-fix in some usages. 5.16 2011-01-10 Gregory Nutt * include/nuttx/usb: Created new directory. Moved all usb-related header files to this new directory. Created a skeleton for a new USB host header file * drivers/usbhost: Add USB host "registry" where connect devices can be matched with the correct USB class driver. * arc/arc/src/lpc17xx/lpc17_usbhost.c: Add a simple USB host driver for the NXP lpc17xx. * drivers/usbhost: Add generic USB device enumeration logic. * drivers/usbhost: Add a USB host class driver for the (Bulk-Only) USB Mass Storage Class. 5.17 2011-01-19 Gregory Nutt * include/nuttx/usb: rename usb_storage.h to storage.h. * arch/arm/src/lpc17xx/lpc17_usbhost.c: Add support for low-speed devices. * drivers/usbhost/usbhost_skeleton.c: Template for new class drivers * include/nuttx/usb/hid.h and drivers/usbhost/usbhost_hidkbd.c: New files for HID keyboard support. * arch/arm/src/lpc17xx/lpc17_usbhost.c: Will now handle multiple concurrent transfers on different endpoints (still only one TD per endpoint). All methods are protected from re-entrancy; lots of re- structuring in preparation for interrupt endpoint support. * arch/arm/src/lpc17xx/lpc17_usbhost.c: Add support for periodic interrupt transfers. * examples/hidkbd: Added a simple test for the USB host HID keyboard class driver. * configs/olimex-lpc1766stk/hidkbd: Added a configuration to build the USB host HID keyboard class driver test for the LPC17xx. * Ran the tool CppCheck (http://sourceforge.net/apps/mediawiki/cppcheck) and fixed several errors in the code identified by the tool. 5.18 2011-02-27 Gregory Nutt * Incorporate several uIP patches from http://gitweb.aeruder.net/?p=uip.git;a=summary. - Lost SYNACK causes connection reset - Fix missing UDP stats for sent/received packets - Added support for Cygwin as development/test platform. * configs/demo9s12ne64: Integrate new buildroot-1.9 m8s12x toolchain. * 'uname -o' is used throughout the build logic in bash scripts and also in Make.defs files in order to distinguish between Cygwin and Linux. However, the -o option is not standard and is not supported under, for example, OS-X or Solaris. This was solved by changing all 'uname -o' references to the more complex: 'uname -o 2>/dev/null || echo "Other"' * drivers/usbhost/usbhost_enumerate.c: Add logic to get the VID and PID. This is necessary in order to support vendor-specific USB devices. * examplex/wlan, configs/olimex-lpc1766stk/wlan, drivers/usbhost/usbhost_rtl8187.c, Add infrastructure to support RTL18187 wireless USB. * configs/nucleus2g: backed out USB host changes... wrong board. * Renamed arc/hc/include/mc9s12ne64 and src/mc9s12ne64 to m9s12. That name is shorter and more general. * The NuttX repository has been converted to SVN and can now be found here http://nuttx.svn.sourceforge.net/viewvc/nuttx/ * configs/mbed/hidkbd: Added USB host support for the mbed LPC1768 board; add a USB host HID keyboard configuraion. * drivers/usbhost/hid_parser.c: Leverages the LUFA HID parser written by Dean Camera. * examples/nsh: Correct an usage of getopt(): If you stop calling getopt() before all parameters are parsed, you can leave getopt() in a strange state. * include/nuttx/fb.h: Restore missing RGB type that was accidentally removed when Nokia 6100 support was added. * Rename arch/pjrc-8051 to arch/8051 * configs/ne64badge: Add a configuration for the Future Electronics Group NE64 Badge development board (Freescale MC9S12NE64) * Changes contributed by Uros Platise: - Add support for the STM32F103RET6 - configs/vsn: Support for the ISOTEL NetClamps VSN V1.2 ready2go sensor network platform * arch/hc, configs/ne64badge: Development is complete for the Freescale mc9s12ne64 on the Future Electronics Group NE64 /PoE Badge board. Howeve, this port remains untested until I figure out this BDM / Code Warrior and paged build thing * Added a new 'kill' command to NSH that will support sending signals to running NuttX tasks. 5.19 2011-03-12 Gregory Nutt * arch/arm/stm32/stm32_idle.c: During idle times, the STM32 now uses the WFI instruction to sleep in a reduced power mode until the next interrupt occurs (Contributed by Uros Platise). * NSH: 'mem' command renamed to 'free'. Output is now more similar to the Linux 'free' command. * NSH: Correct a redirection bug in NSH. The following would not work; it resulted in a hang after the 'cat /dev/fifo': nsh> mkfile /dev/fifo nsh> cd /tmp # /tmp is a mounted RAM disk nsh> cat /dev/fifo > test.txt & nsh> echo "This is a test" > /dev/fifo The error was caused because (1) there was a path that resulted in stdout being closed (the "hang") and also (2) the 'cat' command was always outputting to stdout, not to the redirected file descriptor. Now: nsh> cat test.txt This is a test * drivers/pipes/pipe_common.c: Driver open method was not returning an EINTR error when it received a signal. Instead, it just re-started the wait. This makes it impossible to kill a background pipe operation from NSH. * include/stdint.h: Correct some errors in conditional compilation (submitted by Johannes Hampel). * arch/arm/lpc17xx/lp17_idle.c: Uses the same logic as the STM32: uses the WFI instruction to sleep in a reduced power mode until the next interrupt occurs. * configs/olimex-lpc1766stk: Added an LED encoded to indicate if the LPC1766 is in sleeping. * examples/mm: This is a simplified version of the "built-in" memory manager test of mm/mm_test.c. It is simplified because it does not have access to the internals of the memory manager as does mm/mm_test.c, but it has the advantage that it runs in the actual NuttX tasking environment (the mm/mm_test.c only runs in a PC simulation environment). * drivers/mmcsd_sdio.c/h: Several corrections submitted by Uros Platise. * arch/x86: Provide support for x86 architectures. Support for the i486 architecture under QEMU is provided under arch/x86/include/i486, arch/x86/include/qemu, arch/x86/src/i486, and arch/x86/src/qemu. * configs/qemu-i486: "Board" support configurations for verifying the QEME i486 port. * arch/arm/src/stm32/stm32_spi.c: Correct base address of SPI3 (reported by Uros Platise). * drivers/mmcsd/mmcsd_sdio.c: Correct a loop termination condition (also reported by Uros Platise). * drivers/mtd/ramtron.c: Driver for SPI-based RAMTRON NVRAM devices FM25V10 (and others). Contributed by Uros Platise. * examples/nsh and tools/mkromfsimg.sh: Add support for platform-specific ROMFS-based NSH start-up scripts. * drivers/serial/uart_16550.c and include/nuttx/serial/uart_16550.h: Support for a generic 16550 UART. * configure/qemu-i486/nsh: QEMU NSH example. * ../apps: The apps directory add-on was created by Uros Platise. It supports a set of end-user applications than can be executed on top of NSH. Think of it this way: In a buckled-up embedded application, your end-user programs will probably have their own dedicated start-up logic. But, during development, you might want to have you applications available and executable from the NSH command line. This apps/ addon (and NSH hooks) was contributed by Uros to accomplish just that. * sched/sched_waitpid() and include/sys/wait.h: Provides a simple and very incomplete implementation of waitpid(). waitpid() is only available if CONFIG_SCHED_WAITPID is defined in your configuration file. * sched/atexit.c and sched/exit.c: The atexit function is not frequently used. In order to save a few bytes, it is now conditioned on CONFIG_SCHED_ATEXIT. It your application is currently using atexit(), you will need to add CONFIG_SCHED_ATEXIT to your configuration file. * drivers/net/slip.c: Add a SLIP driver (untested on initial check-in). * configs/olimex-lpc1766stk/slip-httpd: An example that uses SLIP to provide a serial-port based THTTPD web server. 6.0 2011-03-21 Gregory Nutt * lib/lib_fopen(): fopen() was not returning the correct errno value when the underlying open() failed. * include/net/uip/uip-arch.h: The uIP interface has been extended slightly so that drivers can be concurrenly filling and sending packet buffers. This capability was needed by the SLIP driver. * drivers/net/slip.c: Several corrections and some re-design of of the driver. * apps/ChangeLog.txt: the apps/ directory now has its own ChangeLog. * configs/vsn: - IDLE LED blinking fix - Added board power off function * arch/arm/src/stm32/stm32_gpio.c and stm32_internal.h: Fixed PullUp/Down Input Configuration. * arch/arm/src/lpc17xx/lpc17_serial.h: Now supports Auto-RTS and Auto-CTS modes. This is needed to support SLIP. * drivers/net/slip.c: SLIP is now basically functional on the LPC17xx with some caveats as described in the TODO list under LPC17xx. * arch/x86/include/i486/irq.h: Fix irqrestore() macro... it was not correctly re-enabling interrupts. * arch/x86/src: Fix numerous problems with i486/QEMU context switching. Basically, the logic was missing the cases to handle the differing stack frames when a priority change occurs and when no priority change occurs. * configs/qemu-i486/ostest and nsh: The QEMU i486 port is complete. it now passes the OS test and supports the NuttShell (NSH). * misc/drivers: Created a new directory to hold non-BSD licensed drivers that may be added into NuttX via an installation script. * drivers/usbhost/usbhost_rtl8187.c: A decision was made to incorporate code taken from the Linux kernel. That changes the licensing on this module to GPL. To avoid licensing contamination, this driver was moved to misc/drivers/rtl8187x *prior* to adding any of the GPL logic. There is an INSTALL.sh script at the location where the GPL driver(s) can be re-installed into the NuttX source tree. By re-installing the driver, you agree to the GPL licsensing and all of its implications. * Makefile, apps/Makefile, tools/configure.sh: add logic to copy configs///appdir to apps/.config and to simply the application configuration logic. * examples/nsh and apps/nshlib: Move the core NuttShell (NSH) logic out of the exemples directory and into the apps/ directory where it belongs. * apps/Makefile and configs/*/appconfig: Use '=' as the delimiter instead of '/' so that sub-directories in apps/ can be used. * apps/vsn: Move all VSN apps to apps/vsn. * nuttx/examples moved to apps/examples 6.1 2011-04-11 Gregory Nutt * arch/arm/include/lpc17xx/irq.h and arch/arm/src/lpc17xx/lpc17_gpio*.c: Fix several bugs in the GPIO interrupt logic. Submited by Decio Renno. * Initialization for the CONFIG_APPS_DIR is now supported during the earlier, 'context' build phase. * arch/arm/src/lpc17_gpioint.c: Finish coding of the LPC17xx GPIO interrupt logic. * net/netdev_unregister.c: Add capability to un-register a network device. * drivers/mmcsd/mmcsd_sdio.c: extra effort to correctly handle cases without the SDcard (but one issue still exists in STM32) * arch/arm/src/stm32/stm32_tim.*: Added basic timer support TIM1..TIM8 with output PWMs and interrupt logic * config/vsn/src: added basic support for Sensor Interface (GPIO and PWM Power Output, and the sif utility program) * fs/: Reorgnize header so that file systems can be built outside of the nuttx source tree * apps/namedapp/binfs.c: Create a tiny filesystem that can be used to show the internal named apps under /bin. * fs/fs_opendir.c: Correct an error that occurs when a file system is mounted in the root directory. This was discovered while mounting the named app's /bin directory. * lib/: Move all source files into a subdirectory of lib/ named after the header file in which the library function is prototyped. * sched/ and lib/pthread/: Move pthread attribute-related interfaces from sched/ to lib/pthread where they more appropriately belong. * sched/ and lib/semaphore/: Move some semaphore-related interfaces from sched/ to lib/pthread where they more appropriately belong. * syscall/: The beginnings of an optional syscall kernal interface. * tools/mksyscall.c: Add a tool that will auto-generate syscall proxies and stubs from a comma-separated-value (CSV) data file. * arch/arm/src/cortexm3/mpu.h: Add a header file describing the Cortex-M3 MPU registers. * Numerous modifications to the build system. Various people have reported build problems since the re-organization and release of NuttX-6.0. I am unable to replicate the build problems in my environment, but the changes have be incorporated in hope of correcting the build issues in other environments. * drivers/i2c/st_lis331dl.c: I2C-based driver for the LIS331DL MEMS motion sensor. Contributed by Uros Platise. * Makefile: The NuttX build system will now supported building NuttX as two separately linked images: (1) a kernel-mode RTOS image, and (2) a user- mode application image that communicates to the RTOS kernel via system calls. A lot more still must be done. * user_initialize(): Eliminated the user_initialize() initialization hook. It is difficult to maintain and redundant: Board level initialization an up_initialize() provide the same kind of capability. * arch/*/include/*/type.h: On some compilers, char defaults as unsigned. Explicitly add signed to integer types if signed is what is required. * arch/*: For all architectures -- Global register state save structure (usually called current_regs) should be marked volatile; Added general capability to support nested interrupts (not fully realized for all architectures). * sched/task_create.c: Add support for starting kernel-mode thread. * drivers/usbdev/usbdev_serial.c: Fix reported by Sheref Younan. USB was being reset after serial driver was closed. As a result, you could no reopen the serial driver. * configs/lpcxpresso-lpc1768: Add a board configuration for the Embedded Artists LPCXpresso LPC1768 board. 6.2 2011-05-06 Gregory Nutt * arch/arm/src/lpc17xx/lpc17_gpioint.c: Correct errors in logic that maps and IRQ number into a register bit number. * Makefile: Fix an error introduced in the top-level Makefile in NuttX-6.1. This error only shows up if you have a /tftpboot directory. Then the make will fail with an obscure error about not being able to stat pass2. * configs/lpcxpresso-lpc1768/nsh: Add an NSH configuration for the LPCXpresso board. * configs/*/ld.script: Removed 'sh_link not set for section .ARM.edix' for a few of the builds. In you have this warning, it can be removed with the following change to the ld.script file: + __exidx_start = ABSOLUTE(.); .ARM.exidx : { - __exidx_start = ABSOLUTE(.); *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); } >sram + __exidx_end = ABSOLUTE(.); * arch/arm/src/lpc17xx: Correct some typos/bugs in configuration of LPC17xx UART2 and UART3. * nuttx/clock.h: Replace all references to the global variable g_system_timer with clock_systemtimer() (currently just a macro that that returns g_system_timer). * lib/string/strrch.c: Would fail if the searched-for character were the first character in the string. * tools/version.sh and mkversion.c: Tools to manage a NuttX version number file * sched/clock_getutc() and lib/time/lib_time.c: Add support for 1 second UTC interface. * net/net_dup2.c and include/nuttx/net.h: The conditional compilation for '#if CONFIG_NFILE_DESCRIPTOR > 0' was wrong in both of these files. It should be '#if CONFIG_NFILE_DESCRIPTORS > 0'. This causes a dup2() failure in THTTPD and a failure to get a CGI page. The consequence can be a very serious bug! * configs/lpcxpresso-lpc1768/usbstorage, thttpd, and dhcpd: Add an USB storage, THTTPD web server, and DHCP server configurations for the NXP LPCXpresso board. * drivers/lcd/ug-9664hswag01.c and ssd1305.h: Add support for Univision UG-9664HSWAG01 OLED with Solomon Systech SD1305 LCD controller. * configs/lpcxpresso-lpc1668/nx: Add a NX graphics configuration for the LPCXPRESO board. * graphics/nxglib/nxglib_nonintersecting.c: Fix some single bit errors in calculation of non-intersecting regions. This was causing an anomaly in examples/nx in column 0. * drivers/mtd/rammtd.c: Added a RAM based MTD driver. This RAM driver simulates FLASH and is useful for testing purposes. * arch/arm/src/arm/up_head.S: Fix backward conditional compilation. This cause the configs/mx1ads configuration to fail to build but does not appear to affect any other ARM9 build. * fs/nxffs: Adding a tiny, wear-leveling FLASH file system for NuttX. This file system is intended to be small and will have some limitations. The implementation is incomplete on initial checkin. * apps/examples/nxffs and configs/sim/nxffs: Add a test a a configuration that will be used to verify NXFFS. * fs/fat/fs_fat32.c and fs_fat32util.c: Incorpated two bugs with fixed provided by Sheref Younan. Thanks! * fs/nxffs: After a couple of weeks of testing and bug fixes, NXFSS appears stable and functional. 6.3 2011-05-15 Gregory Nutt * Remove clock_getutc(). It is replaces with clock_gettime(CLOCK_ACTIVETIME). Add other RTC related changes provided by Uros Platise. * arch/arm/src/stm32/stm32_flash.c: Add support for access to on-chip STM32 FLASH; beginning of integration with NXFFS (Uros Platise). * arch/mips: Added directory structure for PIC32 support * configs/pcblogic-pic32mx: Add directory structure for PCB Logic PIC32MX board * apps/include: Move include/apps to apps/include. A symbolic link is created at build time * Makefile: Removed support for Pascal pcode interpreter. Support for that interpreter has been moved to apps/interpreter/Makefile. * tools/mkdep.sh: Should not report an error if there are no files on the command line. This happens normally in certain configurations. * drivers/usbhost: Sheref Younan reported an error in the error handling when connection to a USB device fails. In certain fail cases, the logic would try to free the device class instance twice, the first was okay, but the second caused a crash. * graphics/nxbe/nxbe_colormap.c: Fix error noted by Bassem Fahmy. The function nxbe_colormap was change to nxbe_configure... apparently "search-and-replace" error. This error was not noticed before because most NX platforms do not use colormapping. * arch/rgmp and configs/rgmp. Add architecture support and build configuration for RGMP. RGMP is a project for running GPOS and RTOS simultaneously on multi-processor platforms. See http://rgmp.sourceforge.net/wiki/index.php/Main_Page for further information about RGMP. * lib/stdio/lib_fclose.c: Must flush all buffered data when the file is closed. Instead, it was discarding the buffered data. * lib/stdio: All output stream logic was modified to support CONFIG_STDIO_LINEBUFFER. If standard C buffered I/O is enabled (CONFIG_STDIO_BUFFER_SIZE > 0), then this option may be added to force automatic, line-oriented flushing the output buffer for putc(), fputc(), putchar(), puts(), fputs(), printf(), fprintf(), and vfprintf(). When a newline is encountered in the output string, the output buffer will be flushed. This (slightly) increases the NuttX footprint but supports the kind of behavior that people expect for printf. 6.4 2011-06-06 Gregory Nutt * lib/drivers/cc1101: Add initial, functional CC1101 wireless driver (contributed by Uros Platise) * arch/mips and configs/pcblogic-pic32mx: The MicroChip PIC32MX port is now code complete and ready to begin testing. Unfortunately, it looks like testing will be delayed due to tool issues (My PICkit 2 will not work the the MPLAB debugger on PIC32; I will need to get a PICkit 3). * drivers/net/e1000.c/h: A PCI-based E1000 Ethernet driver submitted by Yu Qiang. * lib/net/lib_inetaddr.c: An implementation of the inet_addr() function submitted by Yu Qiang. * arch/arm/src/lpc31xx and arch/arm/include/lpc31xx: Renamed from lpc313x to make name space for other famiy members. * arch/arm/*/lpc31xx: Added support for the LPC315x family (untested). * sched/task_exithook.c: Functionality performed when a task exits or is deleted has been moved to a common file task_exithook.c. Now exit() functionality (like flushing I/O and calling registered atexit() functions, etc.) will be performed when a task is deleted as well. * mm/: Added support for CONFIG_MM_SMALL. Each memory allocation has a small allocation overhead. The size of that overhead is normally determined by the "width" of the address support by the MCU. MCUs that support 16-bit addressability have smaller overhead than devices that support 32-bit addressability. However, there are many MCUs that support 32-bit addressability *but* have internal SRAM of size less than or equal to 64Kb. In this case, CONFIG_MM_SMALL can be defined so that those MCUs will also benefit from the smaller, 16- bit-based allocation overhead. * lib/string/lib_strndup.c: Add standard strndup() library function. * net/getsockname.c: Added standard getsockname() to return the local address associated with a socket. * lib/stdio/lib_asprintf.c: Add asprintf() * configs/olimex-lpc1766stk/ftpc: Add a configuration to support testing of the FTP client shell. * fd/fs_fdopen.c and net/net_checksd.c: Add support so that fdopen may be used with socket descriptors. * net/recvfrom.c: Fix an error found in receiving small files via FTP: The small file is received a buffered in the readahead buffer, then the socket is disconnected. When the app calls recvfrom, the socket is already disconnected and the buffered data is stranded. Now, recvfrom will continue to return success after the socket is disconnected until the readahead buffer is drained. * olimex-lp1766stk/ftpc/defconfig: Many configurations have the MTU (CONFIG_NET_BUFSIZE) set to very small numbers, less then the minimum MTU size that must be supported -- 576. This can cause problems in some networks: CONFIG_NET_BUFSIZE should be set to at least 576 in all defconfig files. This has only been fixed in this defconfig file. 6.5 2011-06-21 Gregory Nutt * arch/avr/src/avr and arch/avr/include/avr: Adds general support for the Atmel 8-bit AVR family. * arch/avr/src/atmega and arch/avr/include/atmega: Adds support for the Atmel AVR ATMega family. * arch/avr/src/at90usb and arch/avr/include/at90usb: Adds support for the Atmel AVR AT90USB family. * configs/micropendous3: Adds a board configuration for the Opendous Micropendous 3 board. This board may be populated with several different members of the Atmel AVR AT90USB family. * configs/amber: This is a placehold for the Atmel ATMega128 Amber Web Server from SoC Robotics. Not much present in this directory on initial check-in. * configs/teensy: Adds a board configuration for the PJRC Teensy++ 2.0 board that features an Atmel AT90USB1286 MCU. * fs/fat: Offsets, sector numbers, etc. need to be off_t, not size_t. size_t is intended to be the maximum size of a memory object, not a file offset. This does not make any difference except on systems (like the AVR) where size_t is only 16-bits. 6.6 2011-07-11 Gregory Nutt * drivers/mtd/ramtron.c, net/net_checksd.c, fs/fs_fdopen.c, and include/nuttx/mii.h: Several structural changes made to get a clean compile under the ez80 ZDS-II toolchain (no design changes). * drivers/usbhost/usbhost_storage.c: Incorpated bugfixes reported by Sheref H. Younan: (1) Read capacity logic read largest block, not the number of blocks and was, therefore, off by one, and (2) Some devices stall of get Max LUN request if they support only a single LUN. Logic now assumes a single LUN if the get Max LUN request fails. * include/nuttx/arch.h, lib/stdio/lib_libvsprintf.c, lib/stdio/lib_fputs.c: Add a new configuration option to support extracting strings from FLASH or EEPROM or other memories where the string data cannot be accessed by simply de-referencing a string pointer. * arch/sim/src/up_romgetc.c: Used to test the basic logic to access strings without directly de-referencing a string pointer. * arch/avr/src/avr/up_romget.c: Used to access strings that lie in the first 64Kb of FLASH (But I still haven't figured out how to get strings to reside in FLASH without using the PROGMEM attribute). * configs/teensy/src/up_spi.c: Correct reading of SD CD and WP pins (was reading the wrong register. AVR SPI now appears to be functional. * arch/avr/src/at90usb/at90usb_usbdev.c: Correct USB initialization. Interrupts were being enabled BEFORE the interrupt handler was attached. * configs/sure-pic32mx: Add a configuration for the Sure Electronics, "Advanced USB Storage Demo Board," Model DB-DP11215 (http://www.sureelectronics.net/goods.php?id=1168). This board features the MicroChip PIC32MX440F512H MCU. (Untested on initial check-in). * configs/stm3210e-eval/nsh2: Add another NSH configuration for the STM32 with some different properties. * CONFIG_NSH_CONDEV: Add a configuration option to allow using a different character device (such a a different UART) for the NSH interface. This allows, for example, debug output to come from the console device while using another device for NSH. There are some issues on initial check-in: NuttX doesn't have termios and the console device has special properties that make using NSH awkward. Examples: No CR-LF expansion, no character echoing, no command line editting. * arch/arm/src/stm32/stm32_lowputc.c and stm32_serial.c. Correct seversl bugs involving serial port configuration. These bugs are only critical if you are trying to using multiple UARTs on STM32. * configs/stm3210e-eval/src/up_lcd.c: Add a driver for the STM3210E-EVAL's LCD. * configs/stm3210e-eval/nx: Add NX configuration for the STM3210E-EVAL. * configs/nuttx/arch.h (and arch/arm/src/stm32, configs/*/src/up_buttons.c): Standardize interfaces exported for button support and button interrupts. * configs/stm3210e-eval/src/up_buttons.c: Add interrupting button support. Also fixes a few errors in STM3210E-EVAL button decoding. * configs/stm3210e-eval/buttons: Add a configuration to exercise STM3210E-EVAL buttons. * arch/arm/src/stm32/stm32_gpio.c: GPIO interrupt handling for pin numbers were being aliased: 5-9 together and 10-15 together. Extended the logic to peform decoding of GPIO interrupts and unique dispatching for all 16 pins. * configs/stm3210e-eval/nxtext: Add a configuration for the apps/examples/nxtext example. This example focuses on placing text on the background while pop-up windows occur. Text should continue to update normally with or without the popup windows present. * arch/arm/src/common/up_checkstack.c: ARM stack overflow checking submitted by Hal Glenn. * arch/arm/src/lpc17xx: Changes to compile successfully with no serial console (also submitted by Hal Glenn). * graphics/nxfonts/nxfonts_convert.c: Fixed a critical bug that caused when renderer some fonts with bits-per-pixel > 8 * graphics/nxbe/nxbe_move.c: Fixed an error in the graphics move logic (This was a previously untested interface). Basically, there is some confusion between use of (x,y) as a relative offset or as an absolute position. * graphics/nxbe/nxbe_close.c: Fixed an important graphics system bug: When a window is closed, the display was not being updated. The old window graphic was left on the display for a time. 6.7 2011-08-02 Gregory Nutt * Makefile: Added a export target that will bundle up all of the NuttX libraries, header files, and the startup object into an export-able tarball. * arch/arm/src/lpc17xx/lpc17_can.h: Correct some typos in the CAN register definitions. * drivers/serial/serialirq.c: Correct an error that can occur if the serial RX buffer becomes full. Data is now discarded in that case; before, leaving data in the hardware would cause infinite interrupts one most MCUs since you must read the data in order to clear the interrupt. * arch/arm/src/lpc17xx/lpc17_can.c: Added a CAN driver contributed by Li Zhuoyi (Lzyy). * include/stddefs.h and sys/types: Added type wchar_t. * fs/fat/fat_fat32dirent.c: Move all FAT directory operations to this new file; Implement VFAT long file name support. * fs/fat/fat_fat32dirent.c: The configuration CONFIG_FAT_LCNAMES has been around for some time but never tested until now. This setting will mimic the NT 8.3 file name behavior: File names or extensions may be all upper or all lower case (but not mixed). If CONFIG_FAT_LCNAMES is not selected, all filenames are strictly upper case. * configs/stm3210e-eval/nsh2: Console is back on UART1; Added examplex/nx as an NSH "built-in" command as a demonstration. * fs/fat/fs_fat32dirent.c: Fix an important bug in the directory allocation (fat_allocatedirentry()). I looks like it could be initializing the wrong sectors! NOTE: This function was in fs_fat32utils.c in earlier releases. * arch/arm/src/stm32_sdio.c: Correct an important DMA-related bug; SDIO transfer completion events and DMA completion eventes were not being coordinated correctly. * configs/stm3210e-eval/nsh2: Enable FAT long file name support * sched/sem_timedwait.c: Add the standard sem_timedwait() interface. * graphics/nxfonts/nxfonts_getfont.c, nxfonts_bitmap.c, Makefile.source, and include/nuttx/nxfonts.h: Support for multiple fonts included. A new interface, nxf_getfonthandle() takes a font ID and returns a handle that is now used at all other font interfaces to specify which of the multiple fonts to use. * arch/arm/src/lpc17xx/lpc17_syscon.h: Fix typo (reported by Li Zhuoyi). * configs/stm3210e-eval/nsh2: Extended to support two new commands: 'msconn' will connect the USB mass storage device; 'msdis' will disconnect the USB storage device. * tools/bdf-converter.c. This C file is used to build the bdf-converter program. The bdf-converter program be used to convert fonts in Bitmap Distribution Format (BDF) into fonts that can be used in the NX graphics system. * include/nuttx/nx: Move all NX header files from include/nuttx to include/nuttx/nx. * drivers/usbdev/usbdev_usbstorage.c and arch/arm/src/stm32/stm32_usbdev.c: Correct a memory leak when the USB mass storage driver is connected and then disconnected from the target. The write requests were not being freed. NOTE that the unregister logic in the STM32 needed to call stm32_reset() in order to return the write requests to the USB mass storage driver; it is possible that a similar but could exist for other architectures. * graphics/nxfonts/nxfonts_*.h: Add serveral more new fonts * arch/z80/src/ez80/ez80_serial.c: Fix some errors in serial driver setup for UART1 (submitted by Paul Osmialowski). * drivers/input/tsc2007.c and include/nuttx/input/*: Add a generic NuttX touchscreen interface. Add a driver for the TI TSC2007 touchscreen controller. * graphics/nxglib/lcd and fb: Add low level routines to set single pixels. * lib/math/lib_b16atan2.c: Add a fixed precision atan2() function * graphics/nxglib/nxglib_splitline.c: Add logic to divide a wide line into trapezoidal components. * graphics/nxmu/nx_drawline.c, graphics/nxsu/nx_drawline.c, graphics/nxtk/nxtk_drawlinewindow.c, graphics/nxtk/nxtk_drawlinetoolbar.c: Add new line drawing interfaces (untested). 6.8 2011-08-19 Gregory Nutt * arch/arm/src/lpc17xx/chip.h: Fix some chip memory configuration errors for the LPC1764, LPC1756, and LPC1754 (submitted by Li Zhuoy (Lzyy)) * arch/arm/src/lpc17xx/lpc17_can.h: Revised CAN driver submitted by Li Zhuoy (Lzyy). The driver now supports both CAN1 and CAN2. * arch/arm/sim/up_lcd.c: Add a simulated LCD driver. * configs/stm3210e-eval/nxlines: Added a configuration to build examples/nxlines. * arch/graphics: Used apps/examples/nxlines to (finally) verify the NX trapezoid drawing functions and (wide) line drawing functions. * arch/rgmp and configs/rgmp. Yu Qiang has ported RGMP to the OMAP4430 (arm) pandaboard and release the new RGMP 0.3 version. The main changes are: (1) Separate configs/rgmp/x86 and configs/rgmp/arm configuration directory, and (2) Extract architecture dependent code in arch/rgmp/include and arch/rgmp/src into corresponding x86/ and arm/ directories. * arch/arm/src/kinetis, arch/arm/include/kinetis, configs/kwikstick-k40: Add a directory structure to support the port to the Kinetis KwikStik-K40. There is no real substance in the initial check-in; only the directory structure and skeleton files (Code complete on 8/15/11). * arch/arm/include/armv7-m, arch/arm/src/armv7-m, etc.: Rename all cortexm3 directories and files to armv7-m; Change name of of all CORTEXM3 constants to ARMV7M. This is a major namespace change needed to cleanly support the ARM Cortex-M4 which is also in the ARMv7 M Series (specifically, ARMv7E-M). * sched/sig_initialize.c, sig_received.c, and mq_waitirq.c. Fixed several critical bugs related to signal handling initialization and for signals the wake up tasks that are waiting to send or receive message queues. In the first two files, errors would prevent proper allocation of signal-related structures from interrupt handlers. In the second, there was missing "clean-up" logic after a signal occurred, leaving the message queue in a bad state and resulting in PANICs. All are important. (submitted by hkwilton). * arch/arm/src/kinetis: Added header files defining all Kinetis registers and bit fields within all Kinetis registers. * configs/twr-k60n512: Add support for the Kinetis K60 Tower board (TWR-K60N512). * drivers/can.c: Fixed a semaphore overflow problem in the CAN driver (reported by Li Zhouy (Lzyy)). * 8/18/2011: The basic port to the FreeScale Kinetics TWR-K60N512 board is now functional. * confgs/twr-k60n512: Add Kinetics TWR-K60N512 NSH configuration. * drivers/analog and include/nuttx/analog: Add ADC driver infrastructure and TI ADS1255 driver developed and submitted by Li Zhouy (Lzyy)). * arch/arm/stm32/stm32_sdio.h and drivers/mmcsd/mmcsd.c: Add logic to multiplex usage of the GPIO pins (contributed by Uros Platise). * configs/twr-k60n512/nsh: Added and verified a NuttShell (NSH) configuration for the Freescale, Kinetis TWR-K60N512 board. 6.9 2011-09-11 Gregory Nutt * arch/arm/src/kinetis/kinetis_sdhc.c: SDHC driver for Kinetis parts. Initially check-in is just a crude port of the STM32 SDIO driver. Much more work is needed. * graphics/, include/nuttx/nx: Add new NX interfaces for drawing circles -- both circular outlines and filled circles. * graphic/nxglib/nxglib_spitline.c: Add a "fudge factor" that eliminates some problems for rendering nearly horizontal, wide lines. Hmm... but I suspect this fudge factor also leads to new problems rendering very thin, nearly horizontal lines. More tuning is needed. * drivers/analog, include/nuttx/analog, arch/arch/src/lpcxx: (1) Add updates to the ADS1255 driver, (2) fix errors from my last merge (sorry), (3) Add DAC infrastructure, (4) add AD5410 DAC driver, and (5) add LPC17xx ADC and DAC drivers. All contributed by Li Zhuoyi (Lzyy). * tools/mkexport.sh: Extended the script that implements the top-level 'make export' logic. The script now also finds and bundles up all of the architecture-specific header files as well. * drivers/arch/arm/src/stm32/stm32_i2c.c: Add a reset to the I2C initialization logic to prevent spurious interrupts when the I2C interrupts are enabled (submitted by Uros Platise). * Scripts/makefiles/documents. Several adjustments, corrections and typo fixes so that NuttX will build correctly on FreeBSD using the ASH shell (submitted by Kurt Lidl). * drivers/mtd/flash_eraseall.c: Add a callable function that accepts the path to a block driver and then erases the underlying FLASH memory (assuming that the block driver is an MTD driver wrapped in the FTL layer). Hmmm... this is probably not the best long term solution; flash_eraseall() should be a user-callable function that operates one driver interfaces; not an internal, OS function that operates on directly on block drivers. * drivers/bch: Fixed some important bugs in the BCH driver (noted by Li Zhuoyi (Lzyy)). This would have effected any large reads or writes (larger than the hardware sector size). * arch/*/src/Makefile: Use of -print-libgcc-file-name to get path to libgcc.a may select the wrong libgcc.a if a multilib toolchain (like CodeSourcery) is used. This can be a serious problem and can cause crashes on Cortex-M3 if the ARM libgcc is used, for example. The fix is to include ARCHCPUFLAGS on the gcc command line when asking it to -print-libgcc-file-name. * lib/time/lib_gmtimer.c: Correct several calculations that could lead to errors in dates. * drivers/pm: Add the beginnings of a NuttX power management sub-system. * arch/arm/src/stm32/stm32_irq.c: Fix a error introduced in 6.8. Timeout calculation uses clock_settime() instead of clock_gettime(). Pretty gross error, but actually it works with the side effect of setting a bad time. * drivers/mtd/at24xx.c: Driver for I2C-based at24cxx EEPROM submitted by Li Zhuoyi (Lzyy). * arch/arm/src/lpc17xx/lpc17_i2c.c: I2C driver for the NXP LPC17xx family submitted by Li Zhuoyi (Lzyy) * arch/arm/src/stm32_i2c.c: Correct two issues with the STM32 I2C driver: (1) Clocking needs to be based on PCLK1, not HCLK and fast speed settings need some additional bits; and (2) Correct a hang that will occur on I2C1 if FSMC is also enabled. * drivers/sensors/lm75.c and include/nuttx/sensors/lm75.h: Add an LM-75 temperature sensor driver. * configs/stm3210e-eval/src/up_lm75.c: Add support for the LM-75 on the STMicro STM3210E-EVAL board. * sched/clock_gettime.c: Correct an error in the tv_nsec calculation that happens only config CONFIG_RTC is enabled. * arch/arm/src/stm32/stm32_i2c.c: Correct some bugs related to waiting for the I2C STOP condition to be cleared. 6.10 2011-10-06 Gregory Nutt * lib/stdio/lib_fopen.c: Fix an error in fopen(); the file pointer was not being positioned at the end of the file when the "a" and "a+" modes are used. There are other issues with the "a+" modes (see the top-level TODO list). * drivers/usbdev/cdc_serial.c and include/nuttx/usb/cdc.h and cdc_serial.h: Add support for the CDC ACM serial device class. * fs/fat/fs_fat32.c: Fix a critical bug in the write logic: It a tiny write cross a sector boundary, then two sector writes will occur. The first part in the first sector may be written to the wrong sector number. * fs/fat/fs_fat32util.c: Fix a stray write into the FAT (always sector 964 on FAT32). This bug will cause some lost chains. I'm sure this bug could corrupt files but at present, the only thing I have seen is that before fixing this bug, the Windows chkdsk utility would report these lost chains. * arch/arm/src/stm32/stm32_i2c.c: Driver can now operate in a faster polled mode (at the expense of using more cpu cycles). * arch/arm/src/stm32/stm32_i2c.c: Add trace debug capability. Enabled with CONFIG_I2C_TRACE. * arch/arm/src/stm32/stm32_i2c.c: Fix another bug where I2C conflicts with FSMC being enabled. That time at the tail end of the transaction where there is an unfinished stop condition. * sched/mq_timedreceive.c and sched/mq_timedsend.c: The count of threads waiting on the message queues was not being decremented after a timeout. This would cause the accounting logic to become out of sync and the, perhaps, an assertion to be triggered. This is an important bug and fixes a potential crash when using mq_timedreceived() and mq_timedsend(). * sched/mq_sndinternal.c: Related to the above, the send logic was incrementing the wrong counter when it waited as part of the mq_timedsend.c logic. * fs/fat: Fix an error in the long file name logic: If the long file name is an even multiple of 13 bytes in length, then it should not include a NULL terminating character. Fix contributed by Kaushal Parikh. * configs/sim/nx11: Created a separate configuration to build the NX example using the a simulated framebuffer driver on an X11 window. This example has been verified on Ubuntu 9.09 (it does not work on Cygwin). * arch/sim/src/up_touchscreen.c and up_x11eventloop.c: Adds support for a simulated NuttX touchscreen device using mouse/pointer feedback from an x11 window. * configs/sim/touchscreen: Adds a configuration to verify the simulated touchscreen driver (Does not work on Cygwin). * configs/sam3u/touchscreen: This is the configuration that I plan to use to verify the SAM3U-EK touchscreen driver. However, as of this writing, there is no touchscreen driver for the board. * CONFIG_RTC_HIRES: Add an option to support either a high-resolution RTC that completely replaces the system timer tick but may overflow and lose time when the MCU is off and also for a low-resolution (1 sec/tick) RTC that can run until 2106 with no overflow. But in this latter case, higher resolution time must come from the system timer. * CONFIG_SYSTEM_UTC: Removed support for the UTC system timer. It just doesn't do enough to be worth the CPU cycles or the complexity. * CONFIG_SYSTEM_TIME16: Added support for an optional 64-bit system timer. * fs/fat/fs_fat32util.c: Add support for FAT date/time stamps; Enabled via CONFIG_FS_FATTIME. * arch/arm/src/sam3u/sam3u_spi.c: Add an SPI driver for the AT91SAM3U. * drivers/input/ads7843e.c and include/nuttx/input/ads7843e.h: Add a driver for the TI ADS7843E touchscreen controller. * fs/nxffs/nxffs_open.c: Fix an error when a file is open for writing; since the file will get deleted it is already exists, there must be a check if there are other open references to the file. * arch/arm/src/stm32/stm32_sdio.c: Fixed an error where during SDHC initialization interrupts were not being re-enabled. Caused more subtle errors than you would think. * arch/arm/src/stm32/stm32_i2c.c: Fixed an error where I2C timeouts appeared to be successful transfers. * configs/sim/nsh2: Add another simulated NSH configuration. This one supports X11 graphics, C++, and exercises graphic functions as built-in commands. 6.11 2011-11-12 Gregory Nutt * arch/arm/stm32/Make.defs: Don't build stm32_rtc.c if CONFIG_RTC is not selected. Doing so will cause errors if other configuration dependencies are not met. * configs/stm3210e-eval/src/up_lcd.c: Color corrections for SPFD5408B LCD do not work with R61580 LCD. * configs/pic32-starterkit: Beginning of a configuration for the Microchip PIC32 Ethernet Starter Kit. Hmmm.. I don't have a clue how to test this with no serial port?! * lib/stdio/lib_fclose.c: fclose() always returns an error (EOF) when it closes a read-only file. This is because it calls flush() which will fail on read-only files. No harm is done other that a bad value is returned. * arch/sim/src/Makefile: Correct build issue for sim/nsh2 target. Old libboard.a was not being cleaned. * arch/mips/src/pic32mx/pic32mx-gpio*.c: Add GPIO support for the PIC32MX. * configs/sure-pic32mx/src/up_leds.c and up_buttons.c: Add button and LED support for the Sure Electronics PIC32MX board. * configs/ea3152: Add a configuration for the Embedded Artists LPC3152 daughter board (with the same base-board used with configs/ea3131) * graphics/nxmu/nx_getrectangle.c, graphics/nxsu/nx_getrectangle.c, graphics/mxtk/nx_getwindow.c, graphics/nxmu/nx_gettoobar.c: New interfaces to read from graphics memory * graphics/nxbe/nxbe_bitmap.c: Fix an error in the error handling that can cause valid bitmaps to fail to render. * include/nuttx/rgbcolors.h: Fix errors in some 16- and 8-bit color conversion macros. * tools/incdir.sh: Fix issues when g++ is used as the compiler. It was not being recognized and handled properly. * graphics/nxsu/nx_releasebkgd.c: Fix a bad cast that was causing problems with the background window was released. * fs/nxffs/nxffs_pack.c: Correct a critical bug in the NXFFS file system: When repacking the filesystem, there was a missing check to see if an inode structure would fit at the end of a block. This is a rare case if the block size is large, but can be common for tiny block sizes and results in a crash and file system corruption. * fs/nxffs/nxffs_initialize.c: Fix an initialize error. If the FLASH is full on power-up, NXFFS will fail to initialize correctly. * fs/nxffs/nxffs_write.c and nxffs_pack.c: Fix an error that can occur when attempt to write to FLASH volume that is completely full but has no value inodes on it. * drivers/mtd/at24xx.c: Now supports a configurable block size that supports using "clusters" of AT24 pages as blocks. This allows bigger block sizes and more efficient use of EEPROM when the AT24 is used to support a file system (such as NXFFS). (Contributed by Hal Glenn). * include/nuttx/rgbcolors.h: More fixes to RGB color conversion macros. * arch/arm/src/common/up_createstack.c and up_usestack.c: For ARM EABI the stack must be aligned to 8-byte boundaries. This is necessary for passing aligned floating point values under EABI. Fix contributed by David Sidrane. * Numerous changes and fixes to the PIC32 interrupt handing logic. The PIC32 port is almost complete but still not ready for prime time. 6.12 2011-12-06 Gregory Nutt * fs/fat/fs_fat32util.c and fs_fat32.h: Logic extended to look in up to four partitions for a valid FAT file system. * drivers/input/tsc2007.c: Add support for 8-bit conversions; make sure that A/D converters are active before requesting conversions. * drivers/mmcsd0/mmcsd_sdio.c: Increase capacity variable from size_t to uin64_t (if available) so that SD cards with capacities greater than 4Gb can be supported. * fs/fat/fs_fat32dirent.c: The root directory structure is different from other directories. When formatted by Windows, it is not initialized at all. Some additional special handling is required to initialize the root directory entry to interoperate correctly with windows. * fs/fat/fs_fat32util.c: In fat_systime2fattime(void) should be clock_gettime() and not clock_gettime(). Also, there is a place where FAT date is used instead of FAT time. (Thanks to David Sidrane). * arch/arm/src/stm32 and arch/arm/include/stm32: Add support for the STM32F40xxx family of MCUs. * configs/stm3240g-eval: Add framework for the STMicro STM3240G-EVAL board. * include/sys/types.h: wchar_t is a builtin type in C++ and its declaration can cause errors with certain C++ compilers. * sched/sig_timedwait.c: Fix signal handling when the returned info is NULL. Before this change, it would derefence a NULL pointer in this case. * graphics/nxfonts/nxfonts_sans17x22.h and nxfonts_sans20x26.h: Add some very small sans serif fonts. * graphics/nxfonts/nxfonts_sans17x23b.h and nxfonts_sans20x27b.h: Add corresponding sans serif bold fonts. * drivers/input/ads7843e.c and tsc2007.c: Fix some errors in the poll setup error checking that was cloned into both drivers. * sched/mq_notify.c: Set errno appropriately on failures. There are still several message queue functions that do not set errno! * arch/arm/src/stm32: Fixes to several STM32F40xxx files (contributed by Mikhail Bychek). * configs/stm3210e-eval/src/up_lcd.c: Fix banding problem on the R61580 LCD * configs/stm3240g-eval/ostest: The basic STM32F40xx bringup is functional (11/12/06) for the STM3240G-EVAL board and passes the OS test. * configs/stm3240g-eval/nsh: Adds a NuttShell (NSH) configure for the STM3240G-EVAL board. 6.13 2011-12-26 Gregory Nutt * arch/arm/src/stm32/stm32f40xxx_dma.c: Add DMA support for the STM32 F4 family (untested on initial check-in) * arch/arm/src/armv7-m/up_fpu.c: Add logic for saving an restoring VFP floating point registers on context switches (but also disable the FPU because CodeSourcery doesn't support hard flowing point!) * arch/arm/src/stm32/chip/stm32_eth.h: Add Ethernet register definitions for the STM32 F4. * arch/arm/srcm/stm32/stm32_eth.c: Adds an Ethernet driver for the STM32 F4. * arch/arm/srcm/stm32/stm32_dac.c and stm32_adc.c: "Skeleton" files for STM32 DAC and ADC drivers. The actual logic will come later. * arch/arm/srcm/stm32/stm32_eth.c: There may be a few more lurking bugs, but the STM32 Ethernet driver appears to be fully functional on the STM3240G-EVAL. * arch/arm/srcm/stm32/stm32_eth.c: Fix an error in clearing abnormal interrupt events. * configs/stm3240g-eval/dhcpd: Add a DCHP daemon configuration for the STM3240G-EVAL board. * configs/stm3240g-eval/nettest: Add a network test configuration for the STM3240G-EVAL board. * arch/arm/srcm/stm32/stm32_rtc.c, stm32f10xxx_rtc.c, and stm32f40xxx_rtc: Broke out separate drivers to handle the very different RTC implementations in the STM32 F1 and F4 family. * arch/arm/srcm/stm32/stm32f10xxx_rtc.c: STM32 F4 RTC is functional (12/14/2011) * net/uip-arp.c: Fix compilation issue with CONFIG_NET_ARP_IPIN * include/nuttx/pwm.h and drivers/pwm.c: Add an interface definition and a "upper half" driver for PWM output. * arch/arm/src/stm32/stm32_pwm.c: Added a PWM "lower half" driver for the STM32. The initial check-in is little more than a framework for the driver. * arch/arm/src/stm32/stm32_usbdev.c: Corrected two CRITICAL errors in the USB device-side driver: (1) Handling of data overrun condition was wrong. When there was no further memory to accept further OUT endpoint data, the driver would hang with infinite interrupts; (2) the logic in setting toggle bits was not correct. However, this driver has functioned for a long time until the particular condition that revealed the bug occurred. My impression is that this latter bugfix also fixes some STM32 USB performance problems. * configs/hymini-stm32v: A configuration for the HY-Mini STM32v board contributed by Laurent Latil. Theses changes also include support for the STM32F103VCT6. * arch/configs/stm3240g-eval/src/up_pwm.c: Add hooks needed to use the new apps/examples/pwm test of the STM32 PWM driver. * drivers/mtd/mp25x.c: Add ability to use different SPI modes and different manufacturers codes. Fix a error in the wait for not busy (submitted by Mohammad Elwakeel. * arch/arm/src/stm32/stm32_can.c: Add a low-level STM32 CAN driver. (Initial check is incomplete). Add loopback support to the driver. * arch/arm/src/stm32/stm32_adc.c: The ADC is now functional. A more complete driver would require DMA support. I have some questions still about the accuracy of the timer-driven sampling. * configs/sure-pic32mx/nsh: The PIC32 port is (finally) functional. Add an NSH configuration for the Sure PIC32MX board. * configs/sure-pic32mx/*/defconfig. Calibrated all PIC32 delay loops. * configs/pcblogic-pic32mx/nsh: Add an NSH configuration for the PCBLogic PIC32 board. * Both PIC32 OS test and NSH configurations have now been verified. 6.14 2012-01-15 Gregory Nutt * tools/Makefile.export, mkexport.sh, and configure.sh: Changes submitted by Mike Smith to support configuration and 'make export' on MAC OS. * arch/arm/src/stm32/stm32_gpio.c: Disabled interrupts while configuring GPIO pins so that we have exclusive access to the GPIO configuration registers. * arch/mips/src/pic32mx/pic32mx_usbdev.c: Add a USB device-side driver for the PIC32MX family. * arch/arm/src/stm32/stm32_gpio.c: Correct an error in some of the GPIO initialization logic. Fix submitted by Mike Smith. * configs/olimex-lpc1766stk/src/up_leds.c: Add new interfaces so that is CONFIG_ARCH_LEDS are not set, the LEDs may be controlled from application logic. * configs/olimex-lpc1766stk/src/up_buttons.c: Add support for the buttons on the Olimex LPC1766-STK board. * Makefile: Added 'apps_clean' and 'apps_distclean' target to simplify managing the state of the application directory while in the NuttX directory * Documentation/NuttXGettingStarted.html: Added a "Getting Started" Guide for NuttX. At present, this is just a stub and it refers to the NuttX top-level README.txt file which is the only, real "Getting Started" Guide that exists at the time being. * arch/arm/src/lpc17xx/lpc17_gpioint.c: Correct an value used as the lower end of an IRQ number range test. * arch/arm/src/lpc17xx/lpc17_gpio.c: Fix a integer flow problem in shift. This error would prevent pins > 15 from being used as interrupt sources. * arch/arm/src/stm32/stm32_can.c: The CAN driver has been verified in loopback mode on the STM3240G-EVAL board. * configs/stm3240g-eval/src/up_adc.c: Complete coding of ADC support for the potentiometer on board the STM3240G-EVAL. * arch/arm/src/lpc17_can.c: Several CAN driver improvements. Adds support for testing in loopback mode. now uses all three transmit buffers for better performance. * confgs/olimex-lpc1766stk/nsh: Now supports the CAN loopback test as an optional "built-in" application. * sched/irq_attach.c: Fix an issue with disabling interrupts when they are detached. For the PIC32, this can't be done because there is a 1-to-many relationship between vector numbers and interrupt numbers or different. Added a new configuration option CONFIG_ARCH_VECNOTIRQ to at least flag the architectures that have this issue and to (at least) avoid doing something too wrong. * drivers/can.c: Fix a test for buffer full in the generic, "upper half", can driver. * arch/arm/src/lm3s: Add support for the LM3S6432S2E (Contributed by Mike Smith) * configs/lm3s6432-s2: Add support for the TI RDK-S2E (LM3S6432S2E) board (Contributed by Mike Smith) * configs/stm3240g-eval/src: Add APIs support to support user access to the LEDs * arch/arm/src/lpc17xx/lpc17_can.c: Add logic to change the CAN bit rate based on the NuttX configuration. * arch/arm/src/lpc17xx/lpc17_can.c: PCLK divisor is now a configuration option. * arch/arm/src/stm32/stm32_serial.c and stm32_lowputc.c: Support for UART4-5 and USART6 added by Mike Smith. Also includes a more flexible way of managing UART pin configurations. * include/nuttx/pwm.h, drivers/pwm.c, arch/arm/src/stm32/stm32_pwm.c: Add support for pulse count in order to better support stepper motors. * arch/arm/src/stm32/stm32_dumpgpio.c: Checking wrong register to see if GPIO is enabled. Also not adding the GPIO base address to several offsets. * configs/stm32f4discovery: Port to the STMicro STM32F4Discovery board (Contributed by Mike Smith). * fs/fat/fs_fat32util.c: On a failure to recognize a FAT file system, the mount logic should return -EINVAL, not -ENODEV. * arch/arm/src/stm32/stm32_tim.c: Support for STM32 F4 32-bit timers (Contributed by Mikhail Bychek) * lib/stdio/lib_vsprintf.c: Add support for fixed-size fields with floating point numbers (Contributed by Mikhail Bychek) 6.15 2012-02-12 Gregory Nutt * arch/arm/src/stm32/stm32_pwm.c: Pulse count was limited to 128; now is (essentially) unlimited. * configs/stm3240g-eval/include/board.h: Input frequencies wrong for all but one APB2 timer. * arch/mips/src/pic32mx/pic32mx-ethernet.c: The PIC32 Ethernet driver is code complete, but still untested. * confgs/sim/*/Make.defs and arch/sim/src/Makefile: Add support for building a 32-bit executable on a 64-bit Linux target. * configs/sure-pic32mx/src/up_leds.c: Correct GPIOs used for LEDs. The wrong pins were being used. * arch/arm/src/stm32/chip/stm32f10xxx_gpio.h: Correct offset to one AFIO EXICR register. * arch/arm/src/lpc17xx/lpc17_can.c: Added "advanced" configuration options to specify the CAN TSEG1 and TSEG2 clock counts specifically. * include/nuttx/can.h and drivers/can.c: Add support for extended (29-bit) CAN IDs. * arch/arm/src/lpc17xx/lpc17_can.c: Add support for extended (29-bit) CAN IDs. * arch/arm/src/stm32/stm32_can.c: Add support for extended (29-bit) CAN IDs. * include/nuttx/power/pm.h: Move include/nuttx/pm.h into a sub-directory named power. * drivers/power: Rename the drivers/pm directory to power * include/power/battery.h and drivers/battery.c: Add the interface definitions for an upper and lower half battery driver. Add the implementation of the common upper half battery driver. * drivers/power/max1704x.c: Add a driver for MAX17040x battery "fuel gauge" * arch/arm/src/stm32/stm32_i2c.c: Add support for I2C3 * drivers/usbdev/: Lots of name changes: cdc_serial->cdcacm, usbstrg->usbmsc, usbser->pl2303 * drivers/usbdev/composite: Fleshed out support for a composite USB device. * drivers/stm3210e-eval/composite and drivers/stm3210e-eval/src/up_composite.c: Add a configuration test the USB composite device. * include/nuttx/usb/usb.h, drivers/usbdev/composite_descriptors.c, and drivers/usbdev/cdcacm_descriptors.c: Add support for the USB Interface Association Descriptor (IAD) * arch/arm/src/stm32/stm32_i2c.c: Correct a typo in STM32 I2C3 support (submitted by Mike Smith) * arch/*/src/Makefile: Candidate solution for dependency issue in the board sub-directory: By making libboard.a a "phony" target, libboard.a should always rebuilt (the end result is worth the small increase in build time) (submitted by Mike Smith). * include/net/psock.h: Added a new low level socket interface that allows the OS to use the socket interface without having a socket descriptor. * include/net/psock.h: Removed psock.h. The new interfaces are moved into nuttx/net.h which already has similar logic. * include/nuttx/usb/usb.h: Can't use 'class' as a field name in USB structures. This upsets C++ if usb.h is included. 'class' -> 'classid' in this header file and all places that referenced 'class' * drivers/usbdev/usbmsc.c: Fixed some backward conditional compilation. * sched/on_exit.c: Add support for the on_exit() function., * sched/exit.c, task_exithook.c, task_delete.c, sched_releasetcb.c: Move the logic that closes file descriptors sooner in the task shutdown sequence. When drivers are closed, they may need to do things that require a fully up-and-running task. Some things cannot be done later when the task is crippled. * lib/dirent: Moved readdir_r() and telldir() from lib/misc to this new directory where they belong. * lib/termios. Implemented tcsetattr() and tcgetattr(). * lib/stdio/lib_fgets.c: The old fgets includes some terminal related functionality: It handles VT-100 commands, includes a command line editor and echo characters back to the terminal. This old, overloaded fgets() was renamed readline() and moved to apps/system/readline. The version of fgets() in lib/stdio was them simplified and stripped down so that it *only* gets a string -- as its description implies. * arch/arm/src/lpc214x/lpc214x_usbdev.c: Add corrections suggested by David Hewson many, many months ago. * configs/mcu123-lpc214x/composite and configs/mcu123-lpc214x/src/up_composite.c: Add a configuration to test the USB composite device. * configs/stm3240g-eval/Telnetd: Add a configuration for testing the Telnet daemon. * configs/stm3240g-eval/nsh2: This is another NSH configuration. It differs from the original nsh configuration because it does not have an RS-232 console (only a Telnet console) and SDIO is enabled. This configuration is required because the STM3240G-EVAL board cannot simultaneously support RS-232 and SDIO due to pin conflicts. * lib/string/lib_strcasestr.c: Add strcasestr(). * lib/stdio/lib_avsprintf.c: Add avsprintf(). * lib/net/lib_inetntop.c: Add inet_ntop(). * lib/net/lib_inetpton.c: Add inet_pton(). * include/pthread.h: Correct PTHREAD_MUTEX_INITIALIZER. * fs/fat/fs_fatfs.c: Fix an error in the FAT statfs() implementation that was causing some block counts to be reported incorrectly (reported by David Sidrane). * drivers/ramlog.c: Add a character driver that can substitute for /dev/console and or be used for logging debug output when there is no serial port available (such as when a Telnet console is used). * lib/stdio/lib_syslogstream: Add a stream object that will be used to re-direct all debug output to the RAM log if CONFIG_SYSLOG and CONFIG_RAMLOG_SYSLOG are defined. * lib/misc/lib_dbg.c: Add an interface enabled with CONFIG_DEBUG_ENABLE that can be used to turn debug output on and off. 6.16 2012-03-10 Gregory Nutt * drivers/sensors/qencoder.c and include/nuttx/sensors/qencoder.h: Add an implementation for a quadrature encoder upper half driver. * arch/arm/src/stm32/stm32_qencoder.c/.h: Add a initial implementation of a lower-half quadrature encoder driver for the STM32. On initial check-in, this is little more than a "skeleton" file. * Various files: CAN ISO-11783 support contributed by Gary Teravskis. * net/recv.c and net/recvfrom.c: Correct a bug in return value: The the peer gracefully closes the connections, needs to return zero and not ENOTCONN. * arch/arm/src/stm32/stm32_eth.c: Fix an error in the STM32 ethernet driver. The received buffer size must be two bytes larger to account for the two byte checksum that is appended to the packet. Otherwise, the last two bytes of real data in the packet will get clobbered. * arch/arm/src/stm32f40xx_dma.c: The STM32 F4 DMA has (finally) been verified * arch/arm/src/stm32_sdio.c: STM32 F4 SDIO DMA is now supported * configs/stm3240g-eval/nsh/defconfig: This configuration now supports SDIO with DMA (see configs/stm3240g-eval/README.txt for some issues). * arch/arm/src/armv7-m/up_vectors.S and arch/arm/src/armv7-m/up_vectors.S: New, streamlined Cortex-M exception handling (with FPU supported). Contributed byh Mike Smith * net/accept.c, connect.c,and net_monitor.c: Correct an error in the accept logic. After a new connection is made via accept(), monitoring for losses of TCP connection must be set up (just as with connect()). The new file net_monitor.c holds the common TCP connection monitoring logic used by both the accecpt() and connect() logic. Contributed by Max Nekludov. * net/recvfrom.c and net/uip/uip_tcpcallback.c: Fix a leak in the TCP read-ahead logic. This is a *critical* bug fix! * net/uip/uip_tcpinput.c: Correct an error in the TCP stack. It was incrementing the received sequence number BEFORE determining if the incoming data could be handled. If the data was dropped (usually because there is insufficient buffering space), then no ACK will be sent and the sequence number will be wrong. The end consequence of the bad sequence number was that the when the dropped packet was re-transmitted, it was was ignored because its sequence number looked wrong. Fix was, obviously, to only increment the recevied sequence number if the TCP data was accepted. * configs/stm3240g-eval, configs/stm32f40discovery, and arch/*/src/Makefile: Add changes to support building with the Atollic "Lite" toolchain. * fs/fs_select.c: Correct select(), in the case of loss of network connection (POLLHUP), select() must report a read-ready event. This is how the standard select() interface is supposed to work: In the case of loss-of-connection, select() reports read-ready. The next time you read from the socket, you detect the end-of-connection event. Change submitted by Max Nekludov. * arch/arm/src/armv7-m/up_fpu.S and arch/arm/src/stm32/stm32_vectors.S: Fix lazy FPU register saving with CONFIG_ARCH_FPU is set in the configuration. * arch/arm/src/armv7-m: Lazy saving of floating point registers on context switches now seems to be functional. * net/uip/uip_tcpinput.c: Fix a TCP protocol error reported by Max Nekludov. * configs/stm3240g-eval, configs/stm32f40discovery: Add changes to support building with the Atollic "Pro" toolchain. * Makefile: Use the more common .hex extension for Intel hex files instead of more precise .ihx extension. This change has ripple effects to many build- related scripts and programs and could cause some short-term problems. * configs/stm3240g-eval/, arch/arm/src/stm32/up_allocateheap.c: Add support for the 16-mbit SRAM on-board the STM3240G-EVAL board. * drivers/usbdev/cdcacm.c and include/nuttx/usbdev/cdcacm.h: The CDC/ACM driver can now be dynamically connected and disconnected from the host under software control. * include/nuttx/arch.h, configs/stm3240g-eval/src/up_cxxinitialize.c, and configs/stm3240g-eval/src/up_cxxinitialize.c: Add support for C++ static initializers. * net/setsockopt.c, net/getsockopt.c, net/bind.c, net/socket.c: Add more low level, thread-independent socket interfaces for use within the OS. Some of these are currently used by the FTP controlling terminal. More will be used to support the NFS file system currenly underwork. * include/nuttx/net/: Major re-organization of networking headerf files. Moved all non-standard, NuttX-specific header files from include/net and include/nuttx into include/nuttx/net. * arch/mips/src/pic32mx/pic32mx_usbdev.c: The PIC32 USB driver now appears to be fully functional. * configs/sure-pic32mx/usbnsh and configs/sure-pic32mx/src: Add support for NSH using only USB serial I/O to support the console. This is useful on devices that have USB, but no serial port. * arch/mips/src/pic32mx/pic32mx_spi.c: Add a PIC32 SPI driver. Initial checkin is primitive, incomplete (lacks interrupt logic), and untested. * configs/pic32-startkit/nsh: Completed verification of the PIC32 Ethernet Starter Kit port. Added and verified the NuttShell (NSH) on the PIC32 Ethernet Starter Kit. I can now (finally) claim to have complete the basic port to this board. * configs/pic32-startkit/nsh/up_usbdev, up_nsh.c, and up_usbterm.c: Verified the USB (device) driver on the PIC32 Ethernet Starter Kit. * arch/mips/src/pic32mx/pic32mx_ethernet.c: Verified the PIC32 Ethernet driver on the PIC32 Starter Kit. Status: It is occasionally functional but not stable enough for use. * arch/arm/include/stm32, arch/arm/src/stm32: Add general support for the STM32 F2 family. Contributed by Gary Teravskis, * configs/stm3220g-eval: Add support for the STMicro STM3220G-EVAL board. Contributed by Gary Teravskis, 6.17 2012-04-14 Gregory Nutt * configs/sure-pic32mx: Add support for the Sure DB-DP11212 PIC32 General Purpose Demo Board * arch/arm/src/stm32/stm32_usbhost.c/.h: Add files that will (eventually) hold an STM32 USB host driver (the initial check-in is the NuttX LPC17 USB host driver with name changes only). * arch/arm/src/stm32/chip/stm32_otgfs.h: STM32 USB OTG FS register definitions (not complete on initial check-in). * net/connect.c: Add another low level, thread-independent socket interface for use within the OS. * arch/mips/src/pic32mx/pic32mx_ethernet.c: The PIC32 Ethernet driver is now stable on the PIC32 Starter Kit. * configs/pic32-starterkit/nsh2: Add a PIC32 Ethernet Starter Kit NSH configuration that has no serial console; all interaction is done via Telnet. * net/netdev_sem.c: Correct a deadlock condition by making a seamphore recursive. To my knowledge this deadlock only occurs when running the NSH command ifconfig over Telnet. In that case the function netdev_foreach takes the network device semaphore, but so does the telnet logic causing the deadlock. * arch/arm/src/stm32/stm32_pm*.c: Add basic STM32 power management logic that will eventually be used to implement low power states. * arch/arm/src/stm32/stm32f*0xx_rcc.c: In order to use CAN2, both CAN1 and CAN2 clocking must be enabled. * arch/mips/src/pic32mx/picm32mx-usbdev.c: Several stall-related fixes so that the USB device driver can used the the mass storage class (which does a LOT of stalling as part of its normal protocol). The PIC32 USB Mass Storage device is, however, still non-functional when debug is OFF. * include/nuttx/fs: Move all file-system related files from include/nuttx to include/nuttx/fs. * include/nuttx/serial: Move all serial-driver related files from include/nuttx to include/nuttx/serial. * include/nuttx/clock.h and sched/clock_initialize.c: Add a new OS interface called clock_sychronize() that can be used to re-synchronize the NuttX system time with a hardware RTC. This function is called normally at power up but may also need to be called when recovering from certain low-power usage states where the system time is no longer accurate. * arch/arm/src/calypso and arch/arm/include/calypso: Support for the TI "Calypso" phone processor. Contributed by Denis Carilki and includes the work of Denis, Alan Carvalho de Assis, and Stefan Richter. * configs/compal_e88 and configs/compal_e99: Support for Compal e88 and e99 phones Contributed by Denis Carilki and includes the work of Denis, Alan Carvalho de Assis, and Stefan Richter. * arch/arm/src/lpc17xx: Several fixes for error that have crept in for the LPC17xx DAC. Contributed by by Lzyy. * graphics/nxconsole: Add a character driver that can be used as a console output device for text output (still under development on initial check-in). * graphics/nxmu: Fix several compilation errors that have crept into the multi- user NX server because of lack of use. * graphics/nxconsole: The NX text console is basically function (in multi- user NX mode only). * arch/arm/src/stm32/stm32_i2c.c: Correct a bug in the STM32 I2C driver. The behavior of I2C status bits seems to be different between F1 and F4. * configs/stm3210e-eval/nxconsole: New STM32 F1 configuration that runs the NuttShell (NSH) within an NX window. * graphics/nxconsole/nxcon_sem.c: Add protection from re-entrance with debug is enabled. * include/nuttx/ascii.h and vt100.h: Header files to centralize ASCII and VT100 escape sequence definitions. * graphics/nxconsole/nxcon_vt100.c: Add add framework to support VT100 escape sequences in NxConsole. * fs/fs_read.c: Fix read() return value for attempt to read from write-only file or device. Was returning EBADF, should return EACCES. * graphics/nxconsole.c: NxConsole now supports backspace and a cursor. * Kconfig and arch/sim/Kconfig: Beginnings of support for a NuttX configuration tool. Currently using the kconfig parser 'kconfig-frontend' available at http://ymorin.is-a-geek.org/projects/kconfig-frontends (version 3.3.0-1 is also available in the NuttX SVN at trunk/misc/tools/kconfig-frontends-3.3.0-1.tar.gz). Contributed by Lzyy. * */Kconfig: Added skeleton Kconfig files to all directories that may need them. * include/nuttx/math.h: Moved include/math.h to include/nuttx/math.h because it conflicts too often with the system math.h (and people aren't inclined to read the documentation on how to handle this). Now, if CONFIG_ARCH_MATH_H=y is defined, the top-level makefile will copy the redirecting math.h header file from include/nuttx/math.h to include/math.h. So for the architectures that define CONFIG_ARCH_MATH_H=y, include/math.h will be in place as it was before; for the architectures that don't select CONFIG_ARCH_MATH_H, the redirecting math.h header file will stay out-of-the-way in include/nuttx/. * Kconfig, sched/Kconfig, lib/Kconfig, libxx/Kconfig, arch/sim/Kconfig, drivers/Kconfig, drivers/mtd/Kconfig, drivers/input/Kconfig drivers/analog/Kconfig, drivers/lcd/Kconfig: Updated kernel configuration support provided by Lzyy. * Kconfig: Many more Kconfig updates (no longer tracking in the ChangeLog) * arch/arm/src/Makefile, arch/x86/src/Makefile, arch/avr/src/Makefile, arch/mips/src/Makefile, arch/sim/src/Makefile, arch/hc/src/Makefile, arch/sh/src/Makefile: The libgcc.a in newer versions of GCC now have an dependency on an external implementation of abort(). This required modification to the Makefiles that do the final link: Now libgcc.a must be included within the group of libraries that are search recursively. * arch/arm/srm/stm32/stm32_otgfsdev.c: A USB OTG FS device-side driver for the STM32 F4 (and maybe F2 and F1 connectivity line). * tools/cmpconfig.c: A tool for comparing two configuration files. * include/nuttx/usb/usbdev.h, drivers/usbdev/*, arch/*/src/*/*usb*.c: Extend the USB device side interface so that EP0 OUT data can be passed with OUT SETUP requests. * include/nuttx/watchdog.h: Add the definition of a standard watchdog driver interface. * drivers/watchdog.c: The "upper half" watchdog timer driver. 6.18 2012-05-19 Gregory Nutt * Kconfig: Continued Kconfig file updates (no longer tracking on a per-file basis in the ChangeLog) * arch/arm/src/stm32/stm32_iwdog.c and stm32_wwdog.c: Add the STM32 IWDG and WWDIG watchdog timer driver. * configs/stm3240g-eval/src/up_lcd.c: Add LCD from for the STM3240G-EVAL (the initial check-in is just a stm3210e-eval driver with renaming). * sched/sched_setscheduler.c: Correct successful return value (Contributed by Richard Cochran). * include/fcntl.h and lib/stdio: Ignore CONFIG_STDIO_LINEBUFFER is the file was opened in binary mode. * lib/stdio/lib_fopen.c: Correct an error in parsing open mode string. The plus sign may not appear right after the basic mode. For example, "r+", "rb+", and "r+b" are all valid open strings and mean the same thing. * lib/stdio/lib_fopen.c: Correct return errno value from f_open() and f_fdopen() if the open mode string is invalid. * drivers/serial/serial.c: Do not disable Rx interrupts on each byte. Rather, only disable Rx interrupts when the Rx ring buffer may be empty. * include/nuttx/usb/audio.h: USB Audio 1.0 definitions (in progress). * arch/arm/src/stm32/stm32fxx_dma.c: STM32 F4 DMA now supports circular buffer mode (contributed by Mike Smith) * arch/arm/src/stm32/stm32_serial.c: The serial driver can now support Rx DMA into a circular buffer (contributed by Mike Smith) * configs/pic32mx7mmb: Beginning of a configuration for the Mikroelektronka PIC32MX7 Multimedia Board (MMB). * net/recvfrom.c: Fix a compilation problem. Some UDP logic was conditioned on TCP, not UDP. * drivers/usbdev/cdcacm.c: Fix an infinite loop that occurs when the serial device is unregisters. * arch/arm/src/stm32/stm32_otgfs.c: The driver needs to reset the software (in order to flush the requests) and to disable the software connection when the device is unregistered. * include/sys/prctl.h, sched/prctl.c, include/pthread.h: Add interfaces to support getting and setting of the thread or task name. * configs/ubw32: Added a configuration to support the Sparkfun UBW32 PIC32 board. * configs/ubw32/nsh: Added an NSH configuration for the Sparkfun UBW32 PIC32 board. * configs/ubw32/up_buttons.c: Added button support for Bit Whacker board. * configs/stm3240g-eval/nxconsole: Added a configuration to run the NSH shell in an NX window for the STM3240G-EVAL board. * include/cxx/cunistd: C++ header file to make sure that everything in unistd.h is in the std:: namespace. * configs/sim/nxwm: Added a configuration for testing the NuttX Window Manager (NxWM) * fs/fs_fcntl.h: On success, always returned OK. However, some fcntl commands require returning other values on success. * Various files. Fix warnings about variables that were initialized by not used. * configs/sim/*/defconfig: Changes to build a 32-bit simulation on a 32-bit platform did not make into all of the Make.defs files. * graphics/nxmu/nx_move.c: Wrong opcode was being used in the server message; Also there was an error in the offset calculation. * graphics/nxglib/fb/nxglib_moverectangle.c: Offset argument is really a position, not an offset. * graphics/nxtk/nxtk_drawframe.c: Framed windows are now drawn in three colors (instead of just two). * drivers/input/stmpe11_*: Added a driver to support the STMicro STMPE11 IO Expander and touchscreen driver. * configs/stm3240g-eval/nxwm: Added to configuration for testing the NxWM window manager on the STM3240G-EVAL board. * graphics/nxtk/nxtk_toolbarbounds.c: Added an interface to get the toolbar bounding box. * graphics/nxtk/nxtk_drawframe.c: Fix an error in drawing the window frame. * NX, NxConsole: Replace CONFIG_NXCONSOLE_NOGETRUN to CONFIG_LCD_GETRUN. The inability to read from the LCD is a property of the LCD, not of NxConsole. Then add CONFIG_NX_WRITEONLY which is the more generic way of saying that no NX component should try to read from the underlying graphic device (LCD or other). * configs/stm3240g-eval/src/up_stmpe11.c: Add board-specific support for the the STMPE11 I/O expander on the STM3240G-EVAL board. Verfied that the STM3240G-EVAL touchscreen is now fully functional. * include/cxx/cfcntl: Added std:: header file. * graphics/nxbe/nxbe_filltrapezoid.c and graphics/nxglib/fb/nxglib_filltrapezoid.c: Fix several errors in the trapezoid fill logic. * include/nuttx/input/touchscreen.h, configs/hymini-stm32, configs/stm3240g-evel, * configs/sam3u-ek, configs/sim, arch/sim/src/up_touchscreen.c, and apps/examples/touchscreen: Standardize the board-specific, touchscreen initialization interfaces. * drivers/input/stmpe11_base.c and configs/stm3240g-eval: The STMPE11-based touchscreen seems to work better with edge (vs. level) interrupts * drivers/input/stmpe11_tsc.c: Fix some status checks so that the touchscreen interrupt handling logic does not read data if the fifo is not at the threshold level. * include/nuttx/wqueue.h: Add macro work_available() to determine if the previously scheduled work has completed. * drivers/stmpe11_tsc.c: Correct errors: (1) Since all interrupt logic is done on the worker thread, disabling interrupts does not provide protected; Need to disable pre-emption. (2) Fix handling of touch ID and (2) add some logic to prevent certain kinds of data overrun. * include/nx/nxtk.h and graphics/nx/nxtk/nxtk_internal.h: Move setting of configuration defaults from the internal header file to a place where other logic can use the defaults. * graphics/nxtk/nxtk_events.c: Fixed an important but in the logic that translates the mouse/touchscreen position data for framed windows and toolbars. * drivers/input/stmpe11_tsc.c, tsc2007.c, and ads7843e.c: Need to keep track of when if positional data is valid. When the touch is released, the X/Y position of the release must be the same as the X/Y position of the last touch (se that the release occurs in the same window as the last touch). * graphics/nxtk/nxtk_events.c: Fix an error in mouse/touchscreen input logic: Was autoraising the window AFTER processing the mouse press. This raises havoc if the result of processing the mouse click was to raise some other window! * graphics/nxtk/nxtk_events.c: I had to disable the whole autoraise feature for multi-user case because it does not work correctly. In a scenario where (1) there are multiple queued touchscreen events for the same window and (2) the result of the first input was to switch windows, then the autoraise implementation will cause the window to revert to the previous window. Not good behavior. * sched/sched_mergepending.c: Add task switching instrumentation. There is a case here where instrumentation was missing. Contributed by Petri Tanskanen. * CONFIG_STMPE11_THRESHX, CONFIG_STMPE11_THRESHX, and drivers/stmpe11_tsc.c: Add some thresholding controls to all slow down processing of touchscreen samples. This is a problem with NX in multi-user mode: touchscreen data gets sent via a message and when the message queue gets full the sender blocks and touch events are lost. Basic data overrun. The badly effects touchscreen human factors. * include/sched.h: Fix a typo (missing semicolon) in prototype of on_exit(); * sched/on_exit.c and include/nuttx/sched.h: Fix some old typos that caused compilation errors when CONFIG_SCHED_ONEXIT is defined. * configs/stm3240g-eval/nxwm/defconfig: The default NxWM now uses the STMPE11 touchscreen. * include/cxx/csched: Added * graphic/nxmu/nxmu_sendserver.c, nxmu_sendwindow.c, and nxmu_sendclient.c: Refactor NX messaging logic in preparation for a new message control feature. * graphics/nxtk, graphics/nxmu, include/nuttx/nx: Add a new window communication to support blocking and flushing of client window messages. If there are stale, queue window messages at the time that a window is destroyed, very bad things happen. 6.19 2012-xx-xx Gregory Nutt * graphics/nxconsole/nxcon_kbdin.c: If selected, the NxConsole will take input from the NX keyboard input callback. If this option is set, then the interface nxcon_kdbin() is enabled. That interface may be driven by window callback functions so that keyboard input *only* goes to the top window. If CONFIG_NXCONSOLE_NXKBDIN is not selected, then the NxConsole will receive its input from stdin (/dev/console). This works great but cannot be shared between different windows. Chaos will ensue if you try to support multiple NxConsole windows without CONFIG_NXCONSOLE_NXKBDIN * graphics/nxmu/nx_kbdin.c: Fix pointer argument. This is a error introduced in changes leading up to the 6.18 release. This error will cause crashes or perhaps simply not work when you try to handle window keyboard data in multi-user mode. * graphics/nxconsole/nxcon_kdbind.c: Fixed unmatched sem_wait and sem_post. Fix some conditional compilation that included a few too many lines of code. * drivers/input/stmpe11_tsc.c and stmpe11.h: Add a timeout to catch missed pen up events. Now the STM3240G-EVAL touchscreen works very smoothly. * configs/stm3240g-eval/nxwm/defconfig: Enable support for NxConsole keyboard input. Increasing spacing of icons. * configs/stm3240g-eval/nxwm/defconfig: Use a larger font for the calculator. * include/nuttx/lcd/ssd1289.h, drivers/lcd/ssd1289.c and .h: Generic LCD driver for LCDs based on the Solomon Systech SSD1289 LCD driver. This of this as a template for an LCD driver that will have to be cusomized for your particular LCD hardware. * configs/stm32f4discovery/src/up_extmem.c and up_ssd1289.c: Add support to STM32F4Discovery for than an external, SSD1289-based LCD. * configs/stm32f4discovery/nxlines: Add an STM32F4Discovery configuration to thest the SSD1289-based LCD. * configs/stm3240g-eval/src: Add USB GPIO initialization logic needed in board-specific boot logic. * configs/stm32f4discovery/src: Add USB GPIO initialization logic needed in board-specific boot logic. * drivers/usbdev/pl2303.c and cdcacm.c: Fix the request size used for sending packets. It was not using the maximum request size, but instead the previous request size. As a result, packets get smaller, and smaller, and ... This is an important USB serial fix.