From 226fef1618dd9a37c050bb79a24c77396cd14c46 Mon Sep 17 00:00:00 2001 From: jaseg Date: Sun, 11 Oct 2020 23:31:12 +0200 Subject: Initial fw commit --- fw/base.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 fw/base.c (limited to 'fw/base.c') diff --git a/fw/base.c b/fw/base.c new file mode 100644 index 0000000..8e7c03b --- /dev/null +++ b/fw/base.c @@ -0,0 +1,25 @@ + +#include +#include + +int __errno = 0; +void *_impure_ptr = NULL; + +void __sinit(void) { +} + +void *memset(void *s, int c, size_t n) { + char *end = (char *)s + n; + for (char *p = (char *)s; p < end; p++) + *p = (char)c; + return s; +} + +size_t strlen(const char *s) { + const char *start = s; + while (*s++); + return s - start - 1; +} + +void __assert_func(bool value) { +} -- cgit