Apache NuttX is a mature, real-time embedded operating system (RTOS) https://nuttx.apache.org/
Find a file
CuiJinji 1ae43935fd arch/sim: rename nuttx libc memchr to avoid host glibc collision
The sim/src/nuttx-names.in symbol-rename list is the mechanism that
keeps every nuttx libc function used inside nuttx.rel from clashing
with the same-named function in host glibc when the sim executable
is finally linked.  The list already covers ~200 symbols (memcpy,
strlen, strcat, strchr, ...) but memchr was missing.

On x86_64 Linux hosts the omission has no visible effect because
host glibc dispatches memchr through an IFUNC resolver
(__memchr_ifunc) that the static libc.a path does not eagerly pull
in for typical sim links.  On HOST_ARM64 (Ubuntu 20.04 aarch64,
glibc 2.31 .. 2.41), however, the final cc/ld invocation in the
sim Makefile drags libc.a(memchr.o) into the link, which then
collides with nuttx libc's lib_memchr.o that has already been
folded into nuttx.rel:

    /usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/9/../../../aarch64-linux-gnu/libc.a(memchr.o):
        in function `__memchr_ifunc':
        (.text+0x0): multiple definition of `memchr';
        nuttx.rel:libs/libc/string/lib_memchr.c:55: first defined here

Add memchr to the rename list (placed in alphabetical position
between malloc_usable_size and memcpy).  After this fix sim:nsh
builds cleanly on aarch64 Linux hosts (verified on NVIDIA Jetson
Orin L4T Ubuntu 20.04 + Raspberry Pi 4B Debian 13 trixie).  The
behaviour on x86_64 / macOS / Cygwin hosts is unchanged because
those targets either never hit the collision or use the
underscore-prefixed variant gated by NXSYMBOLS macro definition
in the same file (lines 26-31).

Signed-off-by: Jinji Cui <113000688+cjj66619@users.noreply.github.com>
2026-05-18 13:12:48 +08:00
.github ci: retry git clone for nuttx-ntfc-testing 2026-05-12 08:45:30 -03:00
arch arch/sim: rename nuttx libc memchr to avoid host glibc collision 2026-05-18 13:12:48 +08:00
audio include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
binfmt include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
boards boards/esp32p4: Remove unnecessary CONFIG_ESPRESSIF_MERGE_BINS 2026-05-17 11:46:43 +08:00
cmake cmake: Moved the creation of the nxtmpdir folder to the root CMake file 2026-04-22 06:22:36 +08:00
crypto include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
Documentation doc/esp32p4: ESP32-P4 chip revisions, ESP32-P4-Nano board note. 2026-05-14 02:55:45 -04:00
drivers drivers/timers: avoid 32-bit overflow in arch_timer current_usec 2026-05-06 08:49:52 +02:00
dummy build: add initial cmake build system 2023-07-08 13:50:48 +08:00
fs fs/vfs: enforce pseudoFS permissions on open() 2026-05-17 15:48:29 -03:00
graphics include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
include kinetis/pit: Update Kconfig, implement oneshot PIT 2026-05-17 11:47:06 +08:00
libs fix(compiler-rt): avoid duplicate builtins dir on sim 2026-05-13 10:01:26 -03:00
mm include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
net net/icmpv6/icmpv6_input.c: Dont increase d_pktsize from router advertise 2026-05-12 16:35:06 +08:00
openamp openamp: fix CMake dcache option 2026-05-10 15:03:24 +02:00
pass1 Makefile: Remove make depend files by make distclean 2026-02-16 16:27:57 +01:00
sched sched/group: skip group_release for kernel thread group 2026-05-08 13:44:51 +08:00
syscall syscall: fcntl param3 type to uintptr_t 2026-04-27 12:01:55 -03:00
tools ci/platform: Fix the “Repository not found” error for kconfig-frontends 2026-05-17 07:44:48 +08:00
video video: ensure video library is non-empty 2026-05-08 19:51:39 +08:00
wireless include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
.asf.yaml github: master branch protection tune. 2025-05-07 18:37:13 -05:00
.codespell-ignore-lines !boards: Remove NSH_ARCHINIT and board_app_initialize 2026-05-02 18:36:46 +08:00
.codespellrc codespellrc: add ist to ignorelist 2025-10-14 17:42:01 +08:00
.editorconfig .editorconfig: fix character encoding property specification 2025-11-28 19:12:13 +08:00
.gitignore tools/Unix.mk: fix Untracked files defconfig.tmp-e on macOS 2026-04-15 17:10:22 +08:00
.gitmessage docs/contributing: Add a commit message template 2025-06-03 17:33:24 +08:00
.pre-commit-config.yaml pre-commit: enable codespell checks 2025-05-05 12:34:39 +08:00
.yamllint
AUTHORS AUTHORS: add Donny Jiuzhu 2026-02-25 10:17:40 +01:00
CMakeLists.txt cmake: Moved the creation of the nxtmpdir folder to the root CMake file 2026-04-22 06:22:36 +08:00
CONTRIBUTING.md docs: Fix typos, formatting, and numbering in README.md and CONTRIBUTING.md. 2026-03-23 12:05:24 +01:00
INVIOLABLES.md
Kconfig tools/stackusage.py: use toolchain binaries instead of Python libraries 2026-03-17 11:26:44 -03:00
LICENSE !boards: Remove NSH_ARCHINIT and board_app_initialize 2026-05-02 18:36:46 +08:00
Makefile tools: migrate to SPDX identifier 2024-09-10 23:11:11 +08:00
NOTICE
README.md docs: Fix typos, formatting, and numbering in README.md and CONTRIBUTING.md. 2026-03-23 12:05:24 +01:00
ReleaseNotes Documentation: move ReleaseNotes 2023-09-26 20:41:00 +08:00

POSIX Badge License Issues Tracking Badge Contributors GitHub Build Badge Documentation Badge

Apache NuttX is a real-time operating system (RTOS) with an emphasis on standards compliance and small footprint. Scalable from 8-bit to 64-bit microcontroller environments, the primary governing standards in NuttX are POSIX and ANSI standards. Additional standard APIs from Unix and other common RTOSs (such as VxWorks) are adopted for functionality not available under these standards, or for functionality that is not appropriate for deeply-embedded environments (such as fork()).

For brevity, many parts of the documentation will refer to Apache NuttX as simply NuttX.

Getting Started

First time on NuttX? Read the Getting Started guide! If you don't have a board available, NuttX has its own simulator that you can run on terminal.

Documentation

You can find the current NuttX documentation on the Documentation Page.

Alternatively, you can build the documentation yourself by following the Documentation Build Instructions.

The old NuttX documentation is still available in the Apache wiki.

Supported Boards

NuttX supports a wide variety of platforms. See the full list on the Supported Platforms page.

Contributing

If you wish to contribute to the NuttX project, read the Contributing guidelines for information on Git usage, coding standard, workflow and the NuttX principles.

License

The code in this repository is under either the Apache 2 license, or a license compatible with the Apache 2 license. See the License Page for more information.