1 Fix compilation and eabi issues
3 Since we are not linking with libc anymore, we need to define our own memset,
4 strlen and memcpy. Also, as we are using a *libc compiler, we need to "handle"
5 exceptions (mostly division by 0) by defining raise() and
6 __aeabi_unwind_cpp_pr0.
8 Signed-off-by: Alexandre Belloni <abelloni@adeneo-embedded.com>
10 csps/lpc32xx/bsps/ea3250/source/libnosys_gnu.c | 41 +++++++++++++++++++++++
11 csps/lpc32xx/bsps/fdi3250/source/libnosys_gnu.c | 41 +++++++++++++++++++++++
12 csps/lpc32xx/bsps/phy3250/source/libnosys_gnu.c | 41 +++++++++++++++++++++++
13 3 files changed, 123 insertions(+), 0 deletions(-)
15 diff --git a/csps/lpc32xx/bsps/ea3250/source/libnosys_gnu.c b/csps/lpc32xx/bsps/ea3250/source/libnosys_gnu.c
16 index 385b0ab..f1f0a0a 100644
17 --- a/csps/lpc32xx/bsps/ea3250/source/libnosys_gnu.c
18 +++ b/csps/lpc32xx/bsps/ea3250/source/libnosys_gnu.c
21 #include <sys/times.h>
23 +#include <sys/types.h>
25 /* errno definition */
27 @@ -125,4 +126,44 @@ int _write(int file, char *ptr, int len){
31 +void * memset(void * s,int c,size_t count)
33 + char *xs = (char *) s;
42 +size_t strlen(const char * s)
46 + for (sc = s; *sc != '\0'; ++sc)
51 +void * memcpy(void * dest,const void *src,size_t count)
53 + char *tmp = (char *) dest, *s = (char *) src;
62 +/* Dummy functions to avoid linker complaints */
63 +void __aeabi_unwind_cpp_pr0(void)
72 diff --git a/csps/lpc32xx/bsps/fdi3250/source/libnosys_gnu.c b/csps/lpc32xx/bsps/fdi3250/source/libnosys_gnu.c
73 index 385b0ab..f1f0a0a 100644
74 --- a/csps/lpc32xx/bsps/fdi3250/source/libnosys_gnu.c
75 +++ b/csps/lpc32xx/bsps/fdi3250/source/libnosys_gnu.c
78 #include <sys/times.h>
80 +#include <sys/types.h>
82 /* errno definition */
84 @@ -125,4 +126,44 @@ int _write(int file, char *ptr, int len){
88 +void * memset(void * s,int c,size_t count)
90 + char *xs = (char *) s;
99 +size_t strlen(const char * s)
103 + for (sc = s; *sc != '\0'; ++sc)
108 +void * memcpy(void * dest,const void *src,size_t count)
110 + char *tmp = (char *) dest, *s = (char *) src;
119 +/* Dummy functions to avoid linker complaints */
120 +void __aeabi_unwind_cpp_pr0(void)
129 diff --git a/csps/lpc32xx/bsps/phy3250/source/libnosys_gnu.c b/csps/lpc32xx/bsps/phy3250/source/libnosys_gnu.c
130 index cfdb674..6b50c60 100644
131 --- a/csps/lpc32xx/bsps/phy3250/source/libnosys_gnu.c
132 +++ b/csps/lpc32xx/bsps/phy3250/source/libnosys_gnu.c
135 #include <sys/times.h>
136 #include <sys/stat.h>
137 +#include <sys/types.h>
139 /* errno definition */
141 @@ -125,4 +126,44 @@ int _write(int file, char *ptr, int len){
145 +void * memset(void * s,int c,size_t count)
147 + char *xs = (char *) s;
156 +size_t strlen(const char * s)
160 + for (sc = s; *sc != '\0'; ++sc)
165 +void * memcpy(void * dest,const void *src,size_t count)
167 + char *tmp = (char *) dest, *s = (char *) src;
176 +/* Dummy functions to avoid linker complaints */
177 +void __aeabi_unwind_cpp_pr0(void)