diff --git a/components/SConscript b/components/SConscript index 46ae96cfb354baebd43d63202684e1165474860e..538e976a52355069e8d93ec2a3e44a5aa9bea01c 100644 --- a/components/SConscript +++ b/components/SConscript @@ -22,7 +22,7 @@ if 'RT_USING_LWIP' in dir(rtconfig) and rtconfig.RT_USING_LWIP: objs = objs + SConscript('net/lwip/SConscript') if 'RT_USING_MODBUS' in dir(rtconfig) and rtconfig.RT_USING_MODBUS: - objs = objs + SConscript('net//freemodbus/SConscript') + objs = objs + SConscript('net/freemodbus/SConscript') if 'RT_USING_RTGUI' in dir(rtconfig) and rtconfig.RT_USING_RTGUI: objs = objs + SConscript('rtgui/SConscript') @@ -30,6 +30,5 @@ if 'RT_USING_RTGUI' in dir(rtconfig) and rtconfig.RT_USING_RTGUI: # build each modules if rtconfig.CROSS_TOOL == 'gcc': SConscript('hello/SConscript') - SConscript('thread/SConscript') Return('objs') diff --git a/components/finsh/finsh.h b/components/finsh/finsh.h index 1480af9bbd52e5610896b1691f7cc96b612004b7..575066e464050410faf4ba3dd05aaed79eebde6d 100644 --- a/components/finsh/finsh.h +++ b/components/finsh/finsh.h @@ -59,6 +59,7 @@ /*@{*/ #if defined(RT_USING_NEWLIB) || defined (RT_USING_MINILIBC) +#include #include #else typedef unsigned char u_char; diff --git a/components/libc/newlib/math.c b/components/libc/newlib/math.c new file mode 100644 index 0000000000000000000000000000000000000000..d86abe58773d8a96403ad59c883556dbe8010cc2 --- /dev/null +++ b/components/libc/newlib/math.c @@ -0,0 +1,12 @@ +#include + +/* Fix me */ +double sin(double x) +{ + #warning sin function not supported for this platform +} + +double cos(double x) +{ + #warning cos function not supported for this platform +} diff --git a/components/libc/newlib/syscalls.c b/components/libc/newlib/syscalls.c index 7768612da2cb118d365e64f092b8edf2f138940c..6204dafa1202c862f24a4c92c6c935df9978d6c3 100644 --- a/components/libc/newlib/syscalls.c +++ b/components/libc/newlib/syscalls.c @@ -1,8 +1,57 @@ #include +#include -int _fork_r (struct _reent *ptr) +int _fork_r (struct _reent *r) { /* return "not supported" */ - ptr->errno = ENOTSUP; + r->_errno = ENOTSUP; return -1; } + +_ssize_t +_read_r (struct _reent *r, int fd, void *buf, size_t nbytes) +{ + _ssize_t rc; + + rc = -1; + + /* return "not supported" */ + r->_errno = ENOTSUP; + return rc; +} + +_ssize_t +_write_r (struct _reent *r, int fd, const void *buf, size_t nbytes) +{ + _ssize_t rc; + + rc = -1; + + /* return "not supported" */ + r->_errno = ENOTSUP; + return rc; +} + +int +_close_r (struct _reent *r, int fd) +{ + _ssize_t rc; + + rc = -1; + + /* return "not supported" */ + r->_errno = ENOTSUP; + return rc; +} + +_off_t +_lseek_r (struct _reent *r, int fd, _off_t offset, int whence) +{ + _ssize_t rc; + + rc = -1; + + /* return "not supported" */ + r->_errno = ENOTSUP; + return rc; +}