Work In Progress

NuttX 9.1 has not been released yet. These Release Notes are a work-in-progress in preparation for the next release of NuttX.  There is a board tracking the PRs that need to be looked at to add to this doc here

What's New In This Release

Major Changes to Core OS

New Features


Bug Fixes

Many private architecture interfaces were using 'up_' instead of the arch name 'arm_'

This fix is carried over many PRs such as PR-924.  Many files also carried this same error in naming convention and were converted as well.

PR-857 Wrong value for it_interval field in timespec returned by timer_gettime

PR-902 SMP: On task creation do not clone uninitialized descriptors

In SMP mode, there is a possibility that a pthread executing one CPU may create a new task while a pthread on another CPU has allocated the socket but not yet initialized it. This commit updates the socket clone test to assure that the socket is both allocated and initialized before it is cloned.

PR-911 Use OS signal functions internally to not reset errno that applications are using

PR-925 sys/stat.h Change the xtime fields to align with POSIX standard.

Starting from Issue 7 of the POSIX standard the fields st_atime, st_mtime and st_ctime have a type of strcut timespec instead of time_t.

PR-939 openamp: Update to 2020.04.0

PR-953 lib_vsprintf: Fix issue where stack would become corrupt on x86_64

This function requires traversing the VA_LIST twice.  For some archetectures like x86 and x86_64 this needs to be cloned first.


Major Changes to the Build System

Parts of the build system have been refactored to reduce duplication and simplify Makefile and Make.defs files across many directories. These changes are particularly beneficial for boards.

Please note that if you develop your own custom boards, you may need to make some modifications to keep your board's build scripts up-to-date with the rest of NuttX and avoid a broken or defective build. For details, see Compatibility Concerns, Changes to Build System, in these release notes.

New Features

PR-894 openamp and libmetal can now be downloaded and configured by build system

PR-941 Remove 'u' prefix from userspace library in FLAT Build so it is the same for all build types

Bug Fixes


Architectural Support

New Architecture Support

PR-879 ARMv8-M support

Architectures With Significant Improvements

PR-745 The full line of STM32H7 chips are now defined

This adds support for these variants:

PR-811 i486: Fix corruption of esp register on full context restore

This resolves a long standing issue with running the x86 port under QEMU where it would crash shortly after boot.

PR-837 rx65n: Add crashdump support using standby RAM

PR-862 STM32L4: Expose LPTIM timers

PR-868 STM32L4: Extend clock options and power regulation for based on clock settings

PR-905 x86_64: Resolve linking issue when building with gcc 7 and 9.

PR-904 x86_64: Resolve compiler aliasing warnings and RNG pointer cast bug

PR-944 x86_64: Change entrypoint to standard location 1M

PR-971 x86_64: Fix bug in rng implementation using intrinsics

PR-973 x86_64: Fix crash on boot when XSAVE and SSE/AVX is enabled

PR-974 x86_64: Add support booting NuttX as a Jailhouse Cell

PR-919 sim: Add host mmap and perror to allow use of LIBC_MODLIB and BINFMT_LOADABLE

PR-932 z16: Updated toolchain to ZDS-II 5.2.2


Driver Support

New Driver Support

PR-795 Initial NuttX audio driver supporting the Spresense CXD56

Drivers With Significant Improvements

PR-887 PR-888 rptun: Add control for independent control of rx and tx buffer size

PR-917 gs2200m: Receive performance improvement for TCP/UDP

Board Support

New Board Support

Boards With Significant Improvements

PR-949 qemu-intel64: Add nsh configuration for testing QEMU virtualization

PR-966 qemu-i486: Fix issue where console would not accept input because of wrong IRQ number


File System

Bug Fixes

PR-918 tmpfs: Calling statfs could cause files to be removed recursively

Significant Improvements

PR-793 Allow use of genromfs to geneate ROMFS

Previously nsh_romfsimg.h would have to be created manually or using mkromfs.sh.  Now the file structure can be defined in the Makefile.

Here is a demo boards/arm/chip/board/src/Makefile

RCSRCS := rcS
VPATH += :etc/init.d
DEPPATH += --dep-path etc/init.d
include $(TOPDIR)/boards/Board.mk

And boards/arm/chip/board/src/etc/init.d/rcS

#include <nuttx/config.h>
#ifdef CONFIG_NSH_PROC_MOUNTPOINT
mount -t procfs CONFIG_NSH_PROC_MOUNTPOINT
#endif
#ifdef CONFIG_FS_TMPFS
mount -t tmpfs CONFIG_LIBC_TMPDIR
#endif
#ifndef CONFIG_NSH_DISABLE_UNAME
uname -a > /dev/syslog
#endif

PR-851 Upgrade littlefs to v2.2.1


Networking

PR-807 Netlink: Broadcast link status changes to userspace via RTNLGRP_LINK

PR-892 Netdb: Multiple DNS Servers

PR adds capability to add multiple nameservers on run-time even when not using resolv.conf and reset the list of nameservers back to default setting (no nameserver at all or single predefined nameserver in Kconfig). This is useful for applications that change their cellular network frequently.

Applications

Improvements

PR-185 PR-828 nshlib:

1.Add source command

2.Avoid sh command pollute the parent environment(e.g. working directory, the variables...)

Bug Fixes

Security Issues Fixed In This Release

Compatibility Concerns

Changes to Build System

If you have are building NuttX for a custom board, you may need to make some of the following changes in build-related files for your board:

Rename EXTRADEFINES to EXTRAFLAGS

In your custom board's scripts/Make.defs file, rename EXTRADEFINES to EXTRAFLAGS.

For example, these lines:

CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
...
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
...
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)

would change as follows:

CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
...
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
...
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)

See git commit # 459ad9937377a42785692098ff0d73baaa9551e6 in the main NuttX repository.

If you forget to do this, memory allocations on the heap probably won't work and your user tasks won't start.

To see why, tools/Config.mk assigns a value to KDEFINE such that the preprocessor symbol __KERNEL__ will be defined when certain source files are compiled. KDEFINE is passed to nested invocations of 'make' as EXTRAFLAGS. If your board's scripts/Make.defs still attempts to use EXTRADEFINES, the preprocessor symbol __KERNEL__ will not be defined in some of the places that it should be. Suppose you're building a FLAT build. In this case, include/nuttx/mm/mm.h will not define MM_KERNEL_USRHEAP_INIT like it should, which will cause nx_start.c not to call up_allocate_heap() at startup. Therefore, any attempt to allocate memory on the heap will fail.

Rename src/Makefile to src/Make.defs and Modify

This item pertains only to custom boards that are developed in-tree, meaning under the NuttX boards/ subdirectory. Out-of-tree boards are not affected.

If your custom board directory is in-tree and in a board family that uses a 'boards/ARCH/FAMILY/common' directory (such as boards/arm/stm32/commonboards/arm/cxd56xx/common, etc), then you'll need to make two minor changes to your custom board's src/Makefile:

(1) Rename it from src/Makefile to src/Make.defs, and

(2) Near the end of that file, replace this line, which usually appears at the end:

include $(TOPDIR)/boards/Board.mk

with these three lines:

DEPPATH += --dep-path board
VPATH += :board
CFLAGS += $(shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board)

See git commit # 6ca46520df38854bf660f9be54957cceede39ded in the main NuttX repository.

If you forget to do this, 'make' will report an error, "no rule to make libboard.a," and the build will fail.

Rename WINTOOL to CONFIG_CYGWIN_WINTOOL

In your custom board's scripts/Make.defs file, rename any instances of WINTOOL to CONFIG_CYGWIN_WINTOOL.

For example, change this line:

ifeq ($(WINTOOL),y)

to this:

ifeq ($(CONFIG_CYGWIN_WINTOOL),y)

See git commit # bd656888f26c92e8832f0e76b395a5ece7704530 in the main NuttX repository.

Remove INCDIROPT

In your custom board's src/Make.defs file, remove INCDIROPT from CFLAGS.

For example, change this line:

CFLAGS += $(shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board)

to this:

CFLAGS += $(shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board)

This option, which resolves to -w when CONFIG_CYGWIN_WINTOOL is configured, is now appended to INCDIR in tools/Config.mk.

See git commit # 5eae32577e5d5226e5d3027c169eeb369f83f77d in the main NuttX repository.

Remove Unnecessary Variables

In your custom board's scripts/Make.defs file, It is no longer necessary to define the following variables unless your build requires that you assign special values to them:

These variables have been refactored into tools/Config.mk.

See these git commits in the main NuttX repository:

Change ${TOPDIR} to $(TOPDIR)

In your custom board's scripts/Make.defs file, it is recommended to change ${TOPDIR} to $(TOPDIR) for consistency (change curly braces to parenthesis).

See git commit # 7faf3c0254bb63af89f9eb59beefacb4cba26dd9 in the main NuttX repository.

Remove Workaround For Missing $(TOPDIR)/Make.defs

In src/Make.defs or src/Makefile for your custom board or custom apps, the workaround for missing $(TOPDIR)/.config and/or $(TOPDIR)/Make.defs is no longer needed. To remove the workaround, delete the minus sign in front of include .config. This is now handled in the main Makefile and, if those files are missing, will print an error message with hint to run tools/configure.sh <target>.

Change this line, located near the top of the file:

-include $(TOPDIR)/Make.defs

to this:

include $(TOPDIR)/Make.defs

See git commit # 1a95cce1a3c3ed8b04d1d86b7bd744352cca45a2 in the main NuttX repository, and git commit # ead498a7883a654b1d542da94a5fab3ce163361e in the apps repository.

Simplify ARCHINCLUDES and ARCHXXINCLUDES

In your custom board's scripts/Make.defs, ARCHINCLUDES and ARCHXXINCLUDES can be defined without maintaining two different versions conditioned upon CONFIG_CYGWIN_WINTOOL (renamed from WINTOOL). Replace syntax similar to the following:

ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
# Windows-native toolchains
  ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)$(DELIM)include}"
  ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)$(DELIM)include}" -isystem "${shell cygpath -w $(TOPDIR)$(DELIM)include$(DELIM)cxx}"
else
# Linux/Cygwin-native toolchain
  ARCHINCLUDES = -I. -isystem $(TOPDIR)$(DELIM)include
  ARCHXXINCLUDES = -I. -isystem $(TOPDIR)$(DELIM)include -isystem $(TOPDIR)$(DELIM)include$(DELIM)cxx
endif

with syntax similar to:

ARCHINCLUDES += ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include}
ARCHXXINCLUDES += ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include}
ARCHXXINCLUDES += ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include$(DELIM)cxx}

INCDIR is defined in tools/Config.mk and resolves to a shell script or batch file that constructs the appropriate command line argument string to specify include directories for your compiler.

See git commit # 7e5b0f81e93c7e879ce8434d57e8bf4e2319c1c0 in the main NuttX repository.

Simplify Board Directory Handling With BOARD_DIR

In your custom board's Make.defs or Makefile, when setting up build variables containing paths inside your board directory, a new variable BOARD_DIR has been introduced that simplifies the syntax:

Replace syntax like this:

$(TOPDIR)$(DELIM)boards$(DELIM)$(CONFIG_ARCH)$(DELIM)$(CONFIG_ARCH_CHIP)$(DELIM)$(CONFIG_ARCH_BOARD)

with this variable:

$(BOARD_DIR)

For example, change this:

ARCHSCRIPT = -T$(TOPDIR)$(DELIM)boards$(DELIM)$(CONFIG_ARCH)$(DELIM)$(CONFIG_ARCH_CHIP)$(DELIM)$(CONFIG_ARCH_BOARD)$(DELIM)scripts$(DELIM)$(LDSCRIPT)

to this much simpler syntax:

ARCHSCRIPT = -T$(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)

You may find the old syntax being used for variables like ARCHSCRIPTLDELFFLAGSLINKCMDTEMPLATESCRIPTDIR, USER_LDSCRIPT, or others.

BOARD_DIR is defined in tools/Config.mk.

See git commit # e83c1400b65c65cbdf59c5abcf2ae368f540faef in the main NuttX repository.

Known Problems In This Release

More Information

How to Download

Release artifacts for all current and past NuttX releases can be downloaded at:

How to Clone the Git Repository

The Apache NuttX project uses Git SCM as its version control system.

There are two primary repositories:

The main "Single Source of Truth" repositories are hosted by the ASF:

These are synchronized with repositories hosted at GitHub:

How to Contact the Community

The main forum for project communication, to ask a question, get involved, or contribute to NuttX, is our mailing list, dev@nuttx.apache.org. The list is publicly archived and searchable at https://lists.apache.org/list.html?dev@nuttx.apache.orgFor more information, see NuttX Community.

Enthusiastic Contributors Welcome!

NuttX is a free open-source project. If you'd like to participate, whether it's to enhance documentation (even these release notes) or dive into the nitty gritty of some low-level drivers, please join us! You can join the conversation at our dev mailing list by emailing dev-subscribe@nuttx.apache.org. The mailing list is open to the public and archived. You can browse older messages at https://lists.apache.org/list.html?dev@nuttx.apache.org.