diff --git a/makefiles/libc/picolibc.mk b/makefiles/libc/picolibc.mk index 04055b4973..c7d1ba8b62 100644 --- a/makefiles/libc/picolibc.mk +++ b/makefiles/libc/picolibc.mk @@ -11,6 +11,10 @@ endif ifeq (1,$(USE_PICOLIBC)) LINKFLAGS += -specs=picolibc.specs + # RIOT uses _sheap and _eheap for heap start and end, PicoLIBC uses + # __heap_start and __heap_end. This glues these different names together. + LINKFLAGS += -Wl,--defsym=__heap_end=_eheap + LINKFLAGS += -Wl,--defsym=__heap_start=_sheap CFLAGS += -specs=picolibc.specs endif diff --git a/sys/picolibc_syscalls_default/syscalls.c b/sys/picolibc_syscalls_default/syscalls.c index a17be9b0b8..3baa9b3a54 100644 --- a/sys/picolibc_syscalls_default/syscalls.c +++ b/sys/picolibc_syscalls_default/syscalls.c @@ -28,8 +28,6 @@ #include "periph/pm.h" #include "stdio_base.h" -uint8_t sbrk[1]; - /** * @brief Exit a program without cleaning up files *