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);