nuttx/drivers
Marco Casaroli f3721d83d0 drivers/segger: Let the SEGGER sources take part in dependency checking.
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>
2026-10-08 15:54:35 -03:00
..
1wire drivers/efuse/efuse: Drivers Registered With World Write Permissions(Part 1) 2026-07-13 12:08:01 +02:00
aie Documentation,drivers/aie: align machine learning docs with current code 2026-09-19 15:16:18 -03:00
analog drivers/analog: add MCP445X potentiometer support 2026-08-08 18:37:08 +08:00
audio drivers/efuse/efuse: Drivers Registered With World Write Permissions(Part 1) 2026-07-13 12:08:01 +02:00
bch drivers/efuse/efuse: Drivers Registered With World Write Permissions(Part 1) 2026-07-13 12:08:01 +02:00
can drivers/efuse/efuse: Drivers Registered With World Write Permissions(Part 1) 2026-07-13 12:08:01 +02:00
clk !include/fcntl.h: align open flags with Linux values 2026-06-30 13:43:44 +08:00
contactless drivers/contactless: fix uninitialized uid leak in mfrc522_read 2026-07-13 19:50:57 +08:00
coresight drivers/: Multiple Drivers Are Registered With World Writable - Part 2 2026-07-15 15:27:28 +08:00
crypto drivers/efuse/efuse: Drivers Registered With World Write Permissions(Part 1) 2026-07-13 12:08:01 +02:00
devfreq drivers/devfreq: add ondemand governor build support 2026-08-08 15:23:54 -03:00
devicetree
dma
dummy
eeprom drivers/eeprom: add 24CW160 support 2026-08-06 12:39:36 +02:00
efuse drivers/efuse/efuse: Drivers Registered With World Write Permissions(Part 1) 2026-07-13 12:08:01 +02:00
i2c drivers/efuse/efuse: Drivers Registered With World Write Permissions(Part 1) 2026-07-13 12:08:01 +02:00
i2s drivers/efuse/efuse: Drivers Registered With World Write Permissions(Part 1) 2026-07-13 12:08:01 +02:00
i3c nuttx/atomic: replace atomic_fetch_xxx with atomic_xxx just like zephyr 2026-08-24 13:20:45 +08:00
input input/gt9xx: fix register write and no-contact read 2026-08-31 16:16:21 +08:00
ioexpander drivers/ioexpander/sx1509: include nuttx/arch.h for up_mdelay 2026-09-24 20:16:12 +08:00
ipcc drivers/: Multiple Drivers Are Registered With World Writable - Part 2 2026-07-15 15:27:28 +08:00
lcd drivers/lcd: honour the LCD_APA102_* settings in the apa102 LCD driver 2026-08-13 09:54:26 -03:00
leds drivers/: Multiple Drivers Are Registered With World Writable - Part 2 2026-07-15 15:27:28 +08:00
loop drivers/: Multiple Drivers Are Registered With World Writable - Part 2 2026-07-15 15:27:28 +08:00
math drivers/: Multiple Drivers Are Registered With World Writable - Part 2 2026-07-15 15:27:28 +08:00
misc libs/libc: Fix divide-by-zero in stat() with large filesystem block sizes 2026-07-16 23:37:22 +08:00
mmcsd drivers/mmcsd/mmcsd_sdio.c: fix legacy nxstyle alignment in ioctl switches 2026-10-01 22:14:44 +08:00
modem sched/semaphore: Remove the return value check of nxsem_init/nxmutex_init 2026-09-25 10:37:43 +02:00
motor drivers/: Multiple Drivers Are Registered With World Writable - Part 2 2026-07-15 15:27:28 +08:00
mtd sched/semaphore: Fix pre-existing nxstyle issues in the touched files 2026-09-25 10:37:43 +02:00
net drivers/net/telnet: Send a bare carriage return as CR NUL. 2026-10-08 13:29:50 +08:00
note nuttx/atomic: replace atomic_fetch_xxx with atomic_xxx just like zephyr 2026-08-24 13:20:45 +08:00
pci drivers/pci/pci.c: fix nxstyle issues 2026-08-25 01:40:32 +08:00
pinctrl drivers/pinctrl: Add pad read-back and a procfs entry. 2026-08-21 20:04:59 +08:00
pipes drivers/: Multiple Drivers Are Registered With World Writable Part 3 2026-07-16 09:49:07 -03:00
power drivers/power: Do not call gauge methods a driver did not implement. 2026-10-08 15:52:44 -03:00
rc drivers/: Multiple Drivers Are Registered With World Writable - Part 2 2026-07-15 15:27:28 +08:00
regmap
reset nuttx/atomic: replace atomic_fetch_xxx with atomic_xxx just like zephyr 2026-08-24 13:20:45 +08:00
rf drivers/: Multiple Drivers Are Registered With World Writable - Part 2 2026-07-15 15:27:28 +08:00
rpmsg nuttx/atomic: replace atomic_fetch_xxx with atomic_xxx just like zephyr 2026-08-24 13:20:45 +08:00
rptun drivers/: Multiple Drivers Are Registered With World Writable - Part 2 2026-07-15 15:27:28 +08:00
segger drivers/segger: Let the SEGGER sources take part in dependency checking. 2026-10-08 15:54:35 -03:00
sensors sensors/adxl367: add I2C accelerometer support 2026-10-06 14:47:12 -03:00
serial drivers/serial/serial.c: fix nxstyle 2026-09-18 08:36:25 -03:00
spi drivers/spi/ice40: fix operator precedence in final clock cycle count 2026-07-20 17:05:01 +08:00
syslog syslog/ramlog: Survive writes made before the OS is ready. 2026-08-08 15:20:54 -03:00
thermal drivers/thermal: Cool a devfreq device instead of a cpufreq policy. 2026-08-18 09:46:47 -03:00
timers drivers/timers/pcf85263: report a lost time as lost. 2026-10-01 18:05:07 +08:00
usbdev sched/semaphore: Fix pre-existing nxstyle issues in the touched files 2026-09-25 10:37:43 +02:00
usbhost drivers/usbhost: Correct the style of usbhost_hub.c. 2026-09-28 21:45:57 +08:00
usbmisc drivers/: Multiple Drivers Are Registered With World Writable - Part 2 2026-07-15 15:27:28 +08:00
usbmonitor
usrsock drivers/: Multiple Drivers Are Registered With World Writable - Part 2 2026-07-15 15:27:28 +08:00
vhost drivers/vhost: Optimize vhost-net performance and robustness 2026-09-27 18:41:30 +08:00
video drivers/video: zero message on MIPI DSI driver 2026-07-24 20:57:57 -03:00
virtio drivers/input: partial fix of indistinguishable ASCII and special keycodes 2026-07-29 22:51:15 -03:00
wireless sched/semaphore: Fix pre-existing nxstyle issues in the touched files 2026-09-25 10:37:43 +02:00
.gitignore
CMakeLists.txt
drivers_initialize.c driver/devfreq: add procfs for devfreq 2026-08-08 15:23:54 -03:00
Kconfig driver/devfreq: DVFS framework for devices 2026-08-08 15:23:54 -03:00
Makefile driver/devfreq: DVFS framework for devices 2026-08-08 15:23:54 -03:00