From a8d27156a312c2061b8ff5caeb0c2f81f08e204e Mon Sep 17 00:00:00 2001 From: chenyong <1521761801@qq.com> Date: Thu, 2 Aug 2018 17:53:02 +0800 Subject: [PATCH 1/2] [net][sal] Modify SAL configure judgment. --- components/net/Kconfig | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/components/net/Kconfig b/components/net/Kconfig index f79ac27843..97e97ca4b7 100644 --- a/components/net/Kconfig +++ b/components/net/Kconfig @@ -9,20 +9,22 @@ config RT_USING_SAL if RT_USING_SAL - menu "protocol stack implement" + if RT_USING_LWIP || AT_USING_SOCKET + + menu "protocol stack implement" - config SAL_USING_LWIP - bool "Support lwIP stack" - default y if RT_USING_LWIP - default n - depends on RT_USING_LWIP + config SAL_USING_LWIP + bool "Support lwIP stack" + default y + depends on RT_USING_LWIP - config SAL_USING_AT - bool "Support AT Commands stack" - default y if AT_USING_SOCKET - default n - depends on AT_USING_SOCKET - endmenu + config SAL_USING_AT + bool "Support AT Commands stack" + default y + depends on AT_USING_SOCKET + endmenu + + endif config SAL_USING_POSIX bool "Enable BSD socket operated by file system API" From c2add5cb4e0070ceebed2d955c51e7e42aee2ebb Mon Sep 17 00:00:00 2001 From: chenyong <1521761801@qq.com> Date: Thu, 2 Aug 2018 17:55:01 +0800 Subject: [PATCH 2/2] [net][at] Add AT Socket select LIBC configure. --- components/net/at/Kconfig | 1 + components/net/at/at_socket/at_socket.c | 1 + components/net/sal_socket/SConscript | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/net/at/Kconfig b/components/net/at/Kconfig index df34b70091..dde3dda5b3 100644 --- a/components/net/at/Kconfig +++ b/components/net/at/Kconfig @@ -61,6 +61,7 @@ if RT_USING_AT config AT_USING_SOCKET bool "Provide similar BSD Socket API by AT" + select RT_USING_LIBC default n endif diff --git a/components/net/at/at_socket/at_socket.c b/components/net/at/at_socket/at_socket.c index 0beaa9645c..5646f1049f 100644 --- a/components/net/at/at_socket/at_socket.c +++ b/components/net/at/at_socket/at_socket.c @@ -26,6 +26,7 @@ #include #include #include +#include #include diff --git a/components/net/sal_socket/SConscript b/components/net/sal_socket/SConscript index c1cdafab72..76becca09f 100644 --- a/components/net/sal_socket/SConscript +++ b/components/net/sal_socket/SConscript @@ -23,8 +23,8 @@ if GetDepend('SAL_USING_POSIX'): if not GetDepend('HAVE_SYS_SELECT_H'): CPPPATH += [cwd + '/include/dfs_net/sys_select'] - if not GetDepend('HAVE_SYS_SOCKET_H'): - CPPPATH += [cwd + '/include/socket/sys_socket'] +if not GetDepend('HAVE_SYS_SOCKET_H'): + CPPPATH += [cwd + '/include/socket/sys_socket'] group = DefineGroup('SAL', src, depend = ['RT_USING_SAL'], CPPPATH = CPPPATH)