diff --git a/cc3200/application.mk b/cc3200/application.mk
index 70d072e8f6c69eeb3741df062a375e881a03edec..58f377eae4e1d52ca03eecdbb943ed9bc3639c26 100644
--- a/cc3200/application.mk
+++ b/cc3200/application.mk
@@ -139,6 +139,7 @@ APP_MAIN_SRC_C = \
 	serverstask.c
 	
 APP_LIB_SRC_C = $(addprefix lib/,\
+	libc/string0.c \
 	fatfs/ff.c \
 	mp-readline/readline.c \
 	)
@@ -154,7 +155,6 @@ APP_STM_SRC_C = $(addprefix stmhal/,\
 	printf.c \
 	pyexec.c \
 	pybstdio.c \
-	string0.c \
 	)
 
 OBJ = $(PY_O) $(addprefix $(BUILD)/, $(APP_FATFS_SRC_C:.c=.o) $(APP_RTOS_SRC_C:.c=.o) $(APP_FTP_SRC_C:.c=.o) $(APP_HAL_SRC_C:.c=.o) $(APP_MISC_SRC_C:.c=.o))
diff --git a/cc3200/bootmgr/bootloader.mk b/cc3200/bootmgr/bootloader.mk
index c7c7b05ef03011f5d40f76048e2e94b90a0676b5..877ffa878b4e405aa3b7639dd05a40d6af61ce01 100644
--- a/cc3200/bootmgr/bootloader.mk
+++ b/cc3200/bootmgr/bootloader.mk
@@ -66,11 +66,15 @@ BOOT_PY_SRC_C = $(addprefix py/,\
 
 BOOT_STM_SRC_C = $(addprefix stmhal/,\
 	printf.c \
-	string0.c \
 	)
-	
+
+BOOT_LIB_SRC_C = $(addprefix lib/,\
+	libc/string0.c \
+	)
+
 OBJ  = $(addprefix $(BUILD)/, $(BOOT_HAL_SRC_C:.c=.o) $(BOOT_SL_SRC_C:.c=.o) $(BOOT_CC3100_SRC_C:.c=.o) $(BOOT_UTIL_SRC_C:.c=.o) $(BOOT_MISC_SRC_C:.c=.o))
 OBJ += $(addprefix $(BUILD)/, $(BOOT_MAIN_SRC_C:.c=.o) $(BOOT_MAIN_SRC_S:.s=.o) $(BOOT_PY_SRC_C:.c=.o) $(BOOT_STM_SRC_C:.c=.o))
+OBJ += $(addprefix $(BUILD)/, $(BOOT_LIB_SRC_C:.c=.o)
 
 # Add the linker script
 LINKER_SCRIPT = bootmgr/bootmgr.lds
diff --git a/esp8266/Makefile b/esp8266/Makefile
index 0728e8a56d1f55373ef471bd6f137252fe744829..1909e0d76e95f31895540b616224d396e49c01ba 100644
--- a/esp8266/Makefile
+++ b/esp8266/Makefile
@@ -52,12 +52,12 @@ SRC_C = \
 
 STM_SRC_C = $(addprefix stmhal/,\
 	printf.c \
-	string0.c \
 	pyexec.c \
 	pybstdio.c \
 	)
 
 LIB_SRC_C = $(addprefix lib/,\
+	libc/string0.c \
 	mp-readline/readline.c \
 	)
 
diff --git a/stmhal/string0.c b/lib/libc/string0.c
similarity index 100%
rename from stmhal/string0.c
rename to lib/libc/string0.c
diff --git a/minimal/Makefile b/minimal/Makefile
index 592911516d626482a94769d298471ef7ffce4f83..09adfd4fd3b9785a7985e709a560c212582e5c94 100644
--- a/minimal/Makefile
+++ b/minimal/Makefile
@@ -45,8 +45,8 @@ SRC_C = \
 	uart_core.c \
 	uart_extra.c \
 	stmhal/printf.c \
-	stmhal/string0.c \
 	stmhal/pyexec.c \
+	lib/libc/string0.c \
 	lib/mp-readline/readline.c \
 
 SRC_S = \
diff --git a/stmhal/Makefile b/stmhal/Makefile
index e9235a74443fd714856eb0ee9512b7908526fc7f..0ec0cf32b9326216d535e92816ba52297680e59a 100644
--- a/stmhal/Makefile
+++ b/stmhal/Makefile
@@ -62,6 +62,7 @@ endif
 #LIBS += $(shell $(CC) -print-libgcc-file-name)
 
 SRC_LIB = $(addprefix lib/,\
+	libc/string0.c \
 	libm/math.c \
 	libm/asinfacosf.c \
 	libm/atanf.c \
@@ -94,7 +95,6 @@ SRC_LIB = $(addprefix lib/,\
 
 SRC_C = \
 	main.c \
-	string0.c \
 	system_stm32f4xx.c \
 	stm32f4xx_it.c \
 	usbd_conf.c \
diff --git a/teensy/Makefile b/teensy/Makefile
index 1c896c390fbe8352a09df929a66fc45d5581baa3..4e97cbc6a9d42ec52356c71beae58df1132d33e9 100644
--- a/teensy/Makefile
+++ b/teensy/Makefile
@@ -101,7 +101,6 @@ STM_SRC_C = $(addprefix stmhal/,\
 	printf.c \
 	pyexec.c \
 	pybstdio.c \
-	string0.c \
 	)
 
 STM_SRC_S = $(addprefix stmhal/,\
@@ -109,6 +108,7 @@ STM_SRC_S = $(addprefix stmhal/,\
 	)
 
 LIB_SRC_C = $(addprefix lib/,\
+	libc/string0.c \
 	mp-readline/readline.c \
 	)