Every other driver subdirectory adds bare file names to CSRCS and points VPATH and DEPPATH at itself, so drivers/lcd/st7365p.c is built as drivers/st7365p.o. segger/Make.defs instead put the path in CSRCS, so its objects were built as drivers/segger/serial_rtt.o and friends. The generated rules in drivers/Make.dep name their target with the basename of the source -- mkdeps calls basename() and prefixes --obj-path -- so they read "serial_rtt.o: segger/serial_rtt.c ... nuttx/config.h". No such file was ever built. The dependency rule and the compile rule named different targets, and nothing under drivers/segger was ever recompiled when a header or the configuration changed. The result is a stale object silently linked against fresh ones. Enabling CONFIG_TTY_SIGINT, for instance, adds a pid_t to struct uart_dev_s, which moves every field after it. serial.c is rebuilt and reads dev->ops from its new offset; serial_rtt.o is not, and its statically initialised device still has ops four bytes lower. uart_open() then branches through whatever follows it, and the board hard faults in uart_attach() before the console has emitted a byte -- a symptom with no visible connection to its cause. Use the same convention as the other subdirectories. Tested on a Pimoroni Pico Plus 2 W with the RTT console (pimoroni-pico-plus-2-w:nsh with CONFIG_SERIAL_RTT_CONSOLE). On master, touching nuttx/serial/serial.h or enabling CONFIG_TTY_SIGINT does not recompile segger/serial_rtt.c, and the incrementally built image prints nothing on RTT. With this change, serial_rtt.c is recompiled in both cases, and the same incremental build boots to NSH over RTT. drivers/mtd/Make.defs has the same shape for its downloaded dhara and nvblk sources and is left alone: it adds both nvblk.c and mtd/nvblk/src/nvblk.c, whose basenames collide, so it needs more than a change of convention. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com> |
||
|---|---|---|
| .github | ||
| arch | ||
| audio | ||
| binfmt | ||
| boards | ||
| cmake | ||
| crypto | ||
| Documentation | ||
| drivers | ||
| dummy | ||
| fs | ||
| graphics | ||
| include | ||
| libs | ||
| mm | ||
| net | ||
| openamp | ||
| pass1 | ||
| sched | ||
| syscall | ||
| tools | ||
| video | ||
| wireless | ||
| .asf.yaml | ||
| .codespell-ignore-lines | ||
| .codespellrc | ||
| .editorconfig | ||
| .gitignore | ||
| .gitmessage | ||
| .mcp.json | ||
| .pre-commit-config.yaml | ||
| .yamllint | ||
| AUTHORS | ||
| CMakeLists.txt | ||
| CONTRIBUTING.md | ||
| INVIOLABLES.md | ||
| Kconfig | ||
| LICENSE | ||
| Makefile | ||
| NOTICE | ||
| README.md | ||
| ReleaseNotes | ||
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.