diff --git a/software/libbase/Makefile b/software/libbase/Makefile index c1f2434df..35f92f659 100644 --- a/software/libbase/Makefile +++ b/software/libbase/Makefile @@ -1,7 +1,7 @@ MSCDIR=../.. include $(MSCDIR)/software/common.mak -OBJECTS=exception.o libc.o errno.o crc16.o crc32.o console.o system.o id.o uart.o time.o qsort.o strtod.o spiflash.o +OBJECTS=exception.o libc.o errno.o crc16.o crc32.o console.o environ.o system.o id.o uart.o time.o qsort.o strtod.o spiflash.o all: crt0-$(CPU).o libbase.a libbase-nofloat.a diff --git a/software/libbase/environ.c b/software/libbase/environ.c new file mode 100644 index 000000000..2c2c92f08 --- /dev/null +++ b/software/libbase/environ.c @@ -0,0 +1,11 @@ +#include +#include + +char *getenv(const char *varname) { + if(!strcmp(varname, "LIBUNWIND_PRINT_APIS") || + !strcmp(varname, "LIBUNWIND_PRINT_UNWINDING")) { + return "1"; + } else { + return NULL; + } +}