From c4d011a77201e2a3e333b5c7c8682dc9267d621a Mon Sep 17 00:00:00 2001 From: Dirk Helbig Date: Fri, 6 Sep 2024 16:26:27 +0200 Subject: [PATCH] 3rd-party/segger-rtt:: allow for sys functions to be overwritten --- 3rd-party/segger-rtt/SEGGER_RTT_Syscalls_GCC.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/3rd-party/segger-rtt/SEGGER_RTT_Syscalls_GCC.c b/3rd-party/segger-rtt/SEGGER_RTT_Syscalls_GCC.c index 6015cb303..6ec523328 100644 --- a/3rd-party/segger-rtt/SEGGER_RTT_Syscalls_GCC.c +++ b/3rd-party/segger-rtt/SEGGER_RTT_Syscalls_GCC.c @@ -96,7 +96,7 @@ _ssize_t _write_r(struct _reent *r, int file, const void *ptr, size_t len); * including stdout. * Write data via RTT. */ -_ssize_t _write(int file, const void *ptr, size_t len) { +_ssize_t __attribute__((weak)) _write(int file, const void *ptr, size_t len) { (void) file; /* Not used, avoid warning */ SEGGER_RTT_Write(0, ptr, len); return len; @@ -112,7 +112,7 @@ _ssize_t _write(int file, const void *ptr, size_t len) { * including stdout. * Write data via RTT. */ -_ssize_t _write_r(struct _reent *r, int file, const void *ptr, size_t len) { +_ssize_t __attribute__((weak)) _write_r(struct _reent *r, int file, const void *ptr, size_t len) { (void) file; /* Not used, avoid warning */ (void) r; /* Not used, avoid warning */ SEGGER_RTT_Write(0, ptr, len);