Skip to content
TODO 125 KiB
Newer Older
Gregory Nutt's avatar
Gregory Nutt committed
  Description: Anti-aliasing is implemented along the horizontal raster line
               with fractional pixels at the ends of each line.  There is no
               accounting for fractional pixels in the vertical direction.
               As a result lines closer to vertical receive better anti-
               aliasing than lines closer to horizontal.
  Status:      Open
  Priority:    Low, not a serious issue but worth noting.  There is no plan
               to change this behavior.
  Title:       REMOVE SINGLE USER MODE
  Description: NX graphics supports two modes:  A simple single user mode and
               more complex multi-user mode selected with CONFIG_NX_MULTIUSER=y.
               In this configuration, an application can start the NX server
               with boardctrl(BOARDIOC_NX_START);  After that, all graphic
               interactions are via a thin layer in libnx/.   The OS
               interface is only via messages sent and received using POSIX
               message queues.  So this is good code and respects all of the
Gregory Nutt's avatar
Gregory Nutt committed
               POSIX interfacing rules.  Hence, it works well in all build
               modes (FLAT, PROTECTED, and KERNEL builds).

               But without CONFIG_NX_MULTIUSER, the single user applications
Gregory Nutt's avatar
Gregory Nutt committed
               violate all of the rules and calls internal NX functions
               directly.  This includes all calls to internal OSfunctions
               with names like, nx_open, up_fbinitialize, board_lcd_*, and
Gregory Nutt's avatar
Gregory Nutt committed
               others.  This is a violation of interfacing standard in all
               cases and can only be made to work in the FLAT build mode.

               The single user mode does have some desirable properties:  It
               is lighter weight and so more suitable for very resource limited
               platforms.  But I think that in the long run the only reasonable
               solution is to eliminate the single user mode and provide only
               the multi-user mode with the message queue interface.
  Status:      Open
Gregory Nutt's avatar
Gregory Nutt committed
  Priority:    Low-Medium, not a serious issue but worth noting.  Single user
               mode is a blemish on the OS and not compatible with the RTOS
               roadmap.  But neither is there any critical necessity to
               remove the offending code immediately.  Be aware:  If you use
               the single user mode, it will be yanked out from under your
               feet in the not-so-distant future.

  Title:       WIDE-FOUNT SUPPORT
  Description: Wide fonts are not currently supported by the NuttX graphics sub-
               system.  There is some discussion here:

                 https://groups.yahoo.com/neo/groups/nuttx/conversations/topics/3507
                 http://www.nuttx.org/doku.php?id=wiki:graphics:wide-fonts

  Status:      Open
  Priority:    Low for many, but I imagine higher in countries that use wide fonts

patacongo's avatar
patacongo committed
o Build system
patacongo's avatar
patacongo committed
  ^^^^^^^^^^^^

  Title:       MAKE EXPORT LIMITATIONS
  Description: The top-level Makefile 'export' target that will bundle up all of the
               NuttX libraries, header files, and the startup object into an export-able
               tarball. This target uses the tools/mkexport.sh script.  Issues:

               1. This script assumes the host archiver ar may not be appropriate for
                  non-GCC toolchains
patacongo's avatar
patacongo committed
               2. For the kernel build, the user libraries should be built into some
                  libuser.a.  The list of user libraries would have to accepted with
                  some new argument, perhaps -u.
  Status:      Open
  Priority:    Low.

Gregory Nutt's avatar
Gregory Nutt committed
  Title:       CONTROL-C CAN BREAK DEPENDENCIES
  Description: If you control C out of a make, then there are things that can go
               wrong.  For one, you can break the dependencies in this scenario:

               - The build in a given directory begins with all of the compilations.
                 On terminal, this the long phase with CC: on each line.  As each
                 .o file is created, it is timestamped with the current time.

               - The dependencies on each .o are such that the C file will be re-
                 compile if the .o file is OLDER that the corresponding .a archive
                 file.

               - The compilation phase is followed by a single, relatively short
                 AR: phase that adds each of the file to the .a archive file.  As
                 each file is added to archive, the timestamp of the of archive is
                 updated to the current time.  After the first .o file has been
Gregory Nutt's avatar
Gregory Nutt committed
                 added, then archive file will have a newer timestamp than any of
Gregory Nutt's avatar
Gregory Nutt committed
                 the newly compiled .o file.

               - If the user aborts with control-C during this AR: phase, then we
                 are left with:  (1) not all of the files have bee added to the
                 archive, and (2) the archive file has a newer timestamp than any
                 of the .o file.

               So when the make is restarted after a control, the dependencies will
               see that the .a archive file has the newer time stamp and those .o
               file will never be added to the archive until the directory is cleaned
               or some other dependency changes.
Gregory Nutt's avatar
Gregory Nutt committed
               NOTE: This may not really be an issue because the the timestamp on
               libapps.a is not really used but rather the timestamp on an empty
               file:

               .built: $(OBJS)
                   $(call ARCHIVE, $(BIN), $(OBJS))
                   $(Q) touch $@

               UPDATE: But there is another way that Control-C can break dependencies:
               If you control-c out of the make during the apps/ part of the build,
Gregory Nutt's avatar
Gregory Nutt committed
               the archive at apps/libapps.a is deleted (but all of the .built files
               remain in place).  You can see this in the make outout, for example:

                 CC:  ieee802154_getsaddr.c
                 make[2]: *** [Makefile:104: ieee802154_getsaddr.o] Interrupt
                 make: *** Deleting file '../apps/libapps.a'

               When you rebuild the system, the first file archived will recreate
               libapps.a and set the timestamp to the current time.  Then, none of
               the other object files will be added to the archive because they are
Gregory Nutt's avatar
Gregory Nutt committed
               all older.. or, more correctly, none of the other object files will
               be addred because .built files remained and say that there is no
               need to update the libapps.a file.

               The typical symptom of such an issue is a link time error like:

                 LD: nuttx libsched.a(os_bringup.o): In function `os_bringup':
                 os_bringup.c:(.text+0x34): undefined reference to `nsh_main'

Gregory Nutt's avatar
Gregory Nutt committed
               This is becuase the libapps.a file was deleted and an new empty
               libapps.a file was created (which the object containing nsh_main()).
               The object containing nsh_main() will not be added because the
               .built file exists and says that there is not need to add the
               nsh_main() object to libapps.a.

               The work-around for now is:

                 $ make apps_distclean

               One solution to this might be to making the special target
               .PRECIOUS depend on apps/libapps.a.  Then if make receives a
               signal, it will not delete apps/libapps.a.  This would have to
               be done in all Makefiles.

Gregory Nutt's avatar
Gregory Nutt committed
   Status      Open
   Priority:   Medium-High.  It is a rare event that control-C happens at just the
               point in time.  However, when it does occur the resulting code may
               have binary incompatiblies in the code taken from the out-of-sync
               archives and cost a lot of debug time before you realize the issue.

Gregory Nutt's avatar
Gregory Nutt committed
               The first stated problem is not really an issue:  There is already
               the spurious .built file that should handle the described case:
               If you control-C out of the build then the timestamp on the .built
               file will not be updated and the archiving should be okay on the
               next build.
Gregory Nutt's avatar
Gregory Nutt committed
               A work-around for the second stated problem is to do 'make clean'
               if you ever decide to control-C out of a make and see that the
               libapps.a file was deleted.
               UPDATE:  This is a potential fix for the second problem in place
               in in all Makefiles under apps/.  This fix adds
               to all Makefiles.  It has not yet been confirmed that this fix
               eliminates the dependency issue or not.
Gregory Nutt's avatar
Gregory Nutt committed
  Title:      DEPENDENCIES OBJECT SUB-DIRECTORIES
  Descripton: Dependencies do not work in directories that keep binaries in
              a sub-directory like bin, ubin, kbin.
  Status:     Open
  Priority:   Medium-Low.  Definitely a build issue once in awhile.

Gregory Nutt's avatar
Gregory Nutt committed
o Other drivers (drivers/)
  ^^^^^^^^^^^^^^^^^^^^^^^^

patacongo's avatar
patacongo committed
o Linux/Cywgin simulation (arch/sim)
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Gregory Nutt's avatar
Gregory Nutt committed
  Title:       SIMULATOR HAS NO INTERRUPTS (NON-PREMPTIBLE)
  Description: The current simulator implementation is has no interrupts and, hence,
Gregory Nutt's avatar
Gregory Nutt committed
               is non-preemptible.  Also, without simulated interrupt, there can
Gregory Nutt's avatar
Gregory Nutt committed
               be no high-fidelity simulated device drivers.

               Currently, all timing and serial input is simulated in the IDLE loop:
               When nothing is going on in the simulation, the IDLE loop runs and
               fakes timer and UART events.
  Status:      Open
  Priority:    Low, unless there is a need for developing a higher fidelity simulation
               I have been thinking about how to implement simulated interrupts in
               the simulation.  I think a solution would work like this:
               http://www.nuttx.org/doku.php?id=wiki:nxinternal:simulator
Gregory Nutt's avatar
Gregory Nutt committed

  Title:       ROUND-ROBIN SCHEDULING IN THE SIMULATOR
patacongo's avatar
patacongo committed
  Description: Since the simulation is not pre-emptible, you can't use round-robin
               scheduling (no time slicing).  Currently, the timer interrupts are
               "faked" during IDLE loop processing and, as a result, there is no
Gregory Nutt's avatar
Gregory Nutt committed
               task pre-emption because there are no asynchronous events.  This could
               probably be fixed if the "timer interrupt" were driver by Linux
               signals. NOTE:  You would also have to implement up_irq_save() and
               up_irq_restore() to block and (conditionally) unblock the signal.
  Status:      Open
  Priority:    Low
Gregory Nutt's avatar
Gregory Nutt committed
  Title:       SMP SIMULATION ISSUES
  Description: The configuration has basic support SMP testing.  The simulation
               supports the emulation of multiple CPUs by creating multiple
               pthreads, each run a copy of the simulation in the same process
               address space.

Gregory Nutt's avatar
Gregory Nutt committed
               At present, the SMP simulation is not fully functional:  It does
               operate on the simulated CPU threads for a few context switches
               then fails during a setjmp() operation.  I suspect that this is
               not an issue with the NuttX SMP logic but more likely some chaos
               in the pthread controls. I have seen similar such strange behavior
               other times that I have tried to use setjmp/longmp from a signal
               handler! Like when I tried to implement simulated interrupts
               using signals.

               Apparently, if longjmp is invoked from the context of a signal
               handler, the result is undefined:
               http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1318.htm
Gregory Nutt's avatar
Gregory Nutt committed
               You can enable SMP for ostest configuration by enabling:

                 -# CONFIG_EXPERIMENTAL is not set
                 +CONFIG_EXPERIMENTAL=y

                 +CONFIG_SPINLOCK=y
                 +CONFIG_SMP=y
                 +CONFIG_SMP_NCPUS=2
                 +CONFIG_SMP_IDLETHREAD_STACKSIZE=2048

Gregory Nutt's avatar
Gregory Nutt committed
               You also must enable near-realtime-performance otherwise even long
               timeouts will expire before a CPU thread even has a chance to
               execute.

                 -# CONFIG_SIM_WALLTIME is not set
                 +CONFIG_SIM_WALLTIME=y

               And you can enable some additional debug output with:

                 -# CONFIG_DEBUG_SCHED is not set
                 +CONFIG_DEBUG_SCHED=y

                 -# CONFIG_SCHED_INSTRUMENTATION is not set
                 +CONFIG_SCHED_INSTRUMENTATION=y

Gregory Nutt's avatar
Gregory Nutt committed
               The NSH configuration can also be forced to run SMP, but
               suffers from the same quirky behavior.  I can be made
               reliable if you modify arch/sim/src/up_idle.c so that
               the IDLE loop only runs for CPU0.  Otherwise, often
               simuart_post() will be called from CPU1 and it will try
               to restart NSH on CPU0 and, again, the same quirkiness
               occurs.

               But for example, this command:

                 nsh> sleep 1 &

               will execute the sleep command on CPU1 which has worked
               every time that I have tried it (which is not too many
               times).

  Status:      Open
  Priority:    Low, SMP is important, but SMP on the simulator is not
patacongo's avatar
patacongo committed
o ARM (arch/arm/)
  ^^^^^^^^^^^^^^^

  Title:       IMPROVED ARM INTERRUPT HANDLING
patacongo's avatar
patacongo committed
  Description: ARM interrupt handling performance could be improved in some
               ways. One easy way is to use a pointer to the context save
               area in g_current_regs instead of using up_copystate so much.

               This approach is already implemented for the ARM Cortex-M0,
               Cortex-M3, Cortex-M4, and Cortex-A5 families.  But still needs
               to be back-ported to the ARM7 and ARM9 (which are nearly
               identical to the Cortex-A5 in this regard).  The change is
               *very* simple for this architecture, but not implemented.
  Status:      Open.  But complete on all ARM platforms except ARM7 and ARM9.
  Priority:    Low.
patacongo's avatar
patacongo committed

  Title:       IMPROVED ARM INTERRUPT HANDLING
Gregory Nutt's avatar
Gregory Nutt committed
  Description: The ARM and Cortex-M3 interrupt handlers restores all registers
patacongo's avatar
patacongo committed
               upon return. This could be improved as well:  If there is no
               context switch, then the static registers need not be restored
patacongo's avatar
patacongo committed
               because they will not be modified by the called C code.
               (see arch/renesas/src/sh1/sh1_vector.S for example)
patacongo's avatar
patacongo committed
  Status:      Open
  Priority:    Low

  Title:       CORTEX-M3 STACK OVERFLOW
  Description: There is bit bit logic in up_fullcontextrestore() that executes on
               return from interrupts (and other context switches) that looks like:

                 ldr r1, [r0, #(4*REG_CPSR)] /* Fetch the stored CPSR value */
                 msr cpsr, r1 /* Set the CPSR */

                 /* Now recover r0 and r1 */

                 ldr r0, [sp]
                 ldr r1, [sp, #4]
                 add sp, sp, #(2*4)

                 /* Then return to the address at the stop of the stack,
                  * destroying the stack frame
                  */

                 ldr pc, [sp], #4

               Under conditions of excessively high interrupt conditions, many
Gregory Nutt's avatar
Gregory Nutt committed
               nested interrupts can occur just after the 'msr cpsr' instruction.
               At that time, there are 4 bytes on the stack and, with each
               interrupt, the stack pointer may increment and possibly overflow.

               This can happen only under conditions of continuous interrupts.
               See this email thread: https://groups.yahoo.com/neo/groups/nuttx/conversations/messages/1261
               On suggested change is:

                 ldr  r1, [r0, #(4*REG_CPSR)] /* Fetch the stored CPSR value */
                 msr spsr_cxsf, r1 /* Set the CPSR */
                 ldmia     r0, {r0-r15}^

               But this has not been proven to be a solution.
Gregory Nutt's avatar
Gregory Nutt committed
               UPDATE:  Other ARM architectures have a similar issue.
Gregory Nutt's avatar
Gregory Nutt committed
  Priority:    Low.  The conditions of continuous interrupts is really the problem.
               If your design needs continuous interrupts like this, please try
               the above change and, please, submit a patch with the working fix.
Gregory Nutt's avatar
Gregory Nutt committed
  Title:       IMPROVED TASK START-UP AND SYSCALL RETURN
  Description: Couldn't up_start_task and up_start_pthread syscalls be
               eliminated.  Wouldn't this work to get us from kernel-
               to user-mode with a system trap:

                 lda r13, #address
                 str rn, [r13]
                 msr spsr_SVC, rm
                 ld r13,{r15}^

Gregory Nutt's avatar
Gregory Nutt committed
               Would also need to set r13_USER and r14_USER. For new
               SYS_context_switch... couldn't we do he same thing?
Gregory Nutt's avatar
Gregory Nutt committed

               Also... System calls use traps to get from user- to kernel-
               mode to perform OS services.  That is necessary to get from
               user- to kernel-mode.  But then another trap is used to get
               from kernel- back to user-mode.  It seems like this second
               trap should be unnecessary.  We should be able to do the
               same kind of logic to do this.
  Status:      Open
  Priority:    Low-ish, but a good opportunity for performance improvement.

o Network Utilities (apps/netutils/)
Gregory Nutt's avatar
Gregory Nutt committed
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  Title:       UNVERIFIED THTTPD FEATURES
  Description: Not all THTTPD features/options have been verified.  In
               particular, there is no test case of a CGI program receiving
               POST input.  Only the configuration of apps/examples/thttpd
               has been tested.
  Status:      Open
  Priority:    Medium

Gregory Nutt's avatar
Gregory Nutt committed
  Title:       NETWORK MONITOR NOT GENERALLY AVAILABLE
Gregory Nutt's avatar
Gregory Nutt committed
  Description: The NSH network management logic has general applicability
Gregory Nutt's avatar
Gregory Nutt committed
               but is currently useful only because it is embedded in the NSH
               module.  It should be moved to apps/system or, better,
               apps/netutils.
  Status:      Open
  Priority:    Low

o NuttShell (NSH) (apps/nshlib)
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  Title:       IFCONFIG AND MULTIPLE NETWORK INTERFACES
Gregory Nutt's avatar
Gregory Nutt committed
  Description: The ifconfig command will not behave correctly if an interface
               is provided and there are multiple interfaces.  It should only
               show status for the single interface on the command line; it will
               still show status for all interfaces.
  Status:      Open
o System libraries apps/system (apps/system)
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  Title:       READLINE IMPLEMENTATION
  Description: readline implementation does not use C-buffered I/O, but rather
               talks to serial driver directly via read().  It includes VT-100
Gregory Nutt's avatar
Gregory Nutt committed
               specific editing commands.  A more generic readline() should be
               implemented using termios' tcsetattr() to put the serial driver
               into a "raw" mode.
  Status:      Open
  Priority:    Low (unless you are using mixed C-buffered I/O with readline and
               fgetc, for example).

o Modbus (apps/modbus)
  ^^^^^^^^^^^^^^^^^^^^

  Title:       MODBUS NOT USABLE WITH USB SERIAL
  Description: Modbus can be used with USB serial, however, if the USB
               serial connectiont is lost, Modbus will hang in an infinite
               loop.

               This is a problem in the handling of select() and read()
               and could probabaly resolved by studying the Modbus error
               handling.

               A more USB-friendly solution would be to: (1) Re-connect and
               (2) re-open the serial drviers.  That is what is done is NSH.
               When the serial USB device is removed, this terminates the
               session and NSH will then try to re-open the USB device.  See
               the function nsh_waitusbready() in the file
               apps/nshlib/nsh_usbconsole.c. When the USB serial is
               reconnected the open() in the function will succeed and a new
               session will be started.
  Status:      Open
  Priority:    Low.  This is really an enhancement request:  Modbus was never
               designed to work with removable serial devices.

Gregory Nutt's avatar
Gregory Nutt committed
o Pascal Add-On (pcode/)
  ^^^^^^^^^^^^^^^^^^^^^^

  Title:       P-CODES IN MEMORY UNTESTED
  Description: Need APIs to verify execution of P-Code from memory buffer.
  Status:      Open
  Priority:    Low

  Title:       SMALLER LOADER AND OBJECT FORMAT
  Description: Loader and object format may be too large for some small
               memory systems.  Consider ways to reduce memory footprint.
  Status:      Open
  Priority:    Medium

  Title:       PDBG
  Description: Move the pascal p-code debugger into the NuttX apps/ tree
Gregory Nutt's avatar
Gregory Nutt committed
               where it can be used from the NSH command line.
  Status:      Open
  Priority:    Low

o Other Applications & Tests (apps/examples/)
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  Title:       EXAMPLES/PIPE ON CYGWIN
  Description: The redirection test (part of examples/pipe) terminates
               incorrectly on the Cywgin-based simulation platform (but works
               fine on the Linux-based simulation platform).
  Status:      Open
  Priority:    Low

  Title:       EXAMPLES/SENDMAIL UNTESTED
  Description: examples/sendmail is untested on the target (it has been tested
  Status:      Open
  Priority:    Med

  Title:       EXAMPLES/NX FONT CACHING
  Description: The font caching logic in examples/nx is incomplete.  Fonts are
               added to the cache, but never removed.  When the cache is full
               it stops rendering.  This is not a problem for the examples/nx
               code because it uses so few fonts, but if the logic were
               leveraged for more general purposes, it would be a problem.
Gregory Nutt's avatar
Gregory Nutt committed

patacongo's avatar
patacongo committed
               Update: see examples/nxtext for some improved font cache handling.
Gregory Nutt's avatar
Gregory Nutt committed
               Update: The NXTERM font cache has been generalized and is now
               offered as the standard, common font cache for all applications.
               both the nx and nxtext examples should be modified to use this
               common font cache.  See interfaces defined in nxfonts.h.
Gregory Nutt's avatar
Gregory Nutt committed
  Priority:    Low.  This is not really a problem because examples/nx works
  Title:       EXAMPLES/NXTEXT ARTIFACTS
patacongo's avatar
patacongo committed
  Description: examples/nxtext.  Artifacts when the pop-up window is opened.
               There are some artifacts that appear in the upper left hand
               corner.  These seems to be related to window creation.  At
               tiny artifact would not be surprising (the initial window
               should like at (0,0) and be of size (1,1)), but sometimes
               the artifact is larger.
  Status:      Open
  Priority:    Medium.