From 569d8f31dbd7934a7e20606db311fcfb1e86b59d Mon Sep 17 00:00:00 2001 From: Ricard Rosson Date: Tue, 11 Aug 2026 09:02:34 +0100 Subject: [PATCH] examples/apa102: use fprintf() instead of the kernel _err() macro _err() is a kernel-internal debug macro from ; it resolves to the kernel-only _err symbol, which an application cannot reference. In a flat build the example therefore fails to link: apa102_main.c: undefined reference to `_err' (observed on xtensa/esp32s3). Report the failure with fprintf(stderr), which is what the open() error path a few lines above already does. Signed-off-by: Ricard Rosson Assisted-by: Claude Opus 5 (Claude Code) --- examples/apa102/apa102_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/apa102/apa102_main.c b/examples/apa102/apa102_main.c index 8e933b392..1e865c941 100644 --- a/examples/apa102/apa102_main.c +++ b/examples/apa102/apa102_main.c @@ -168,7 +168,7 @@ int main(int argc, FAR char *argv[]) ret = write(fd, ledstrip, 4 * NUM_LEDS); if (ret < 0) { - _err("ERROR: write LED Strip failed: %d\n", errno); + fprintf(stderr, "ERROR: write LED Strip failed: %d\n", errno); } usleep(US_DELAY);