From f819c04dfdf5d456bbc5bea8d0b12de3df48a18a Mon Sep 17 00:00:00 2001 From: Thomas Cook Date: Sun, 1 Mar 2026 19:30:36 -0500 Subject: [PATCH] Eliminate linker warnings for syscalls --- test-app/app_lpc55s69.c | 62 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/test-app/app_lpc55s69.c b/test-app/app_lpc55s69.c index 3ddb8e59..4b7a4ca0 100644 --- a/test-app/app_lpc55s69.c +++ b/test-app/app_lpc55s69.c @@ -105,3 +105,65 @@ void main(void) __asm__ volatile ("wfi"); } } + + +#include "sys/stat.h" +int _getpid(void) +{ + return 1; +} + +int _kill(int pid, int sig) +{ + (void)pid; + (void)sig; + return -1; +} + +void _exit(int status) +{ + _kill(status, -1); + while (1) {} +} + +int _read(int file, char *ptr, int len) +{ + (void)file; + (void)ptr; + (void)len; + return -1; +} + +int _write(int file, char *ptr, int len) +{ + (void)file; + (void)ptr; + return len; +} + +int _close(int file) +{ + (void)file; + return -1; +} + +int _isatty(int file) +{ + (void)file; + return 1; +} + +int _lseek(int file, int ptr, int dir) +{ + (void)file; + (void)ptr; + (void)dir; + return 0; +} + +int _fstat(int file, struct stat *st) +{ + (void)file; + st->st_mode = S_IFCHR; + return 0; +}