[sal][kconfig] 重新梳理sal的依赖关系
This commit is contained in:
parent
b793b6427a
commit
7fc707d99c
|
@ -31,7 +31,9 @@ config RT_USING_DFS_WINSHAREDIR
|
||||||
|
|
||||||
config BSP_USING_SAL_WINSOCK
|
config BSP_USING_SAL_WINSOCK
|
||||||
bool "Enable Windows socket (winsock) with SAL"
|
bool "Enable Windows socket (winsock) with SAL"
|
||||||
select RT_USING_SAL
|
select RT_USING_POSIX_FS
|
||||||
|
select RT_USING_POSIX_SOCKET
|
||||||
|
select SAL_USING_WINSOCK
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config BSP_USING_LVGL
|
config BSP_USING_LVGL
|
||||||
|
|
|
@ -23,13 +23,13 @@ int platform_init(void)
|
||||||
/* initialize sd card */
|
/* initialize sd card */
|
||||||
rt_hw_sdcard_init();
|
rt_hw_sdcard_init();
|
||||||
|
|
||||||
#if defined(RT_USING_MTD_NAND)
|
#ifdef RT_USING_MTD_NAND
|
||||||
rt_hw_mtd_nand_init();
|
rt_hw_mtd_nand_init();
|
||||||
#endif
|
#endif /* RT_USING_MTD_NAND */
|
||||||
|
|
||||||
#if defined(RT_USING_MTD_NOR)
|
#ifdef RT_USING_MTD_NOR
|
||||||
sst25vfxx_mtd_init("nor", 0, RT_UINT32_MAX);
|
sst25vfxx_mtd_init("nor", 0, RT_UINT32_MAX);
|
||||||
#endif
|
#endif /* RT_USING_MTD_NOR */
|
||||||
|
|
||||||
#endif /* RT_USING_DFS */
|
#endif /* RT_USING_DFS */
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,7 @@ if RT_USING_AT
|
||||||
config AT_USING_SOCKET
|
config AT_USING_SOCKET
|
||||||
bool "Enable BSD Socket API support by AT commnads"
|
bool "Enable BSD Socket API support by AT commnads"
|
||||||
select RT_USING_SAL
|
select RT_USING_SAL
|
||||||
|
select SAL_USING_AT
|
||||||
default n
|
default n
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -2,6 +2,7 @@ menuconfig RT_USING_LWIP
|
||||||
bool "LwIP: light weight TCP/IP stack"
|
bool "LwIP: light weight TCP/IP stack"
|
||||||
select RT_USING_DEVICE
|
select RT_USING_DEVICE
|
||||||
select RT_USING_DEVICE_IPC
|
select RT_USING_DEVICE_IPC
|
||||||
|
select SAL_USING_LWIP if RT_USING_SAL
|
||||||
default n
|
default n
|
||||||
|
|
||||||
if RT_USING_LWIP
|
if RT_USING_LWIP
|
||||||
|
|
|
@ -13,26 +13,21 @@ if RT_USING_SAL
|
||||||
The ability that check internet status is provided by RT-Thread.
|
The ability that check internet status is provided by RT-Thread.
|
||||||
|
|
||||||
menu "Docking with protocol stacks"
|
menu "Docking with protocol stacks"
|
||||||
|
|
||||||
config SAL_USING_LWIP
|
config SAL_USING_LWIP
|
||||||
bool "Docking with lwIP stack"
|
bool "Docking with lwIP stack"
|
||||||
default y
|
default n
|
||||||
depends on RT_USING_LWIP
|
|
||||||
|
|
||||||
config SAL_USING_AT
|
config SAL_USING_AT
|
||||||
bool "Docking with AT commands stack"
|
bool "Docking with AT commands stack"
|
||||||
default y
|
default n
|
||||||
depends on AT_USING_SOCKET
|
|
||||||
|
|
||||||
config SAL_USING_WINSOCK
|
config SAL_USING_WINSOCK
|
||||||
bool "Docking with Windows socket (winsock)"
|
bool "Docking with Windows socket (winsock)"
|
||||||
default y
|
default n
|
||||||
depends on BSP_USING_SAL_WINSOCK
|
|
||||||
|
|
||||||
config SAL_USING_TLS
|
config SAL_USING_TLS
|
||||||
bool "Docking with MbedTLS protocol"
|
bool "Docking with MbedTLS protocol"
|
||||||
default y
|
default n
|
||||||
depends on PKG_USING_MBEDTLS
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
config SAL_USING_POSIX
|
config SAL_USING_POSIX
|
||||||
|
|
|
@ -5,30 +5,30 @@ from building import *
|
||||||
cwd = GetCurrentDir()
|
cwd = GetCurrentDir()
|
||||||
|
|
||||||
src = Glob('src/*.c')
|
src = Glob('src/*.c')
|
||||||
src += Glob('socket/net_netdb.c')
|
src += ['socket/net_netdb.c']
|
||||||
|
|
||||||
CPPPATH = [cwd + '/include']
|
CPPPATH = [cwd + '/include']
|
||||||
CPPPATH += [cwd + '/include/socket']
|
CPPPATH += [cwd + '/include/socket']
|
||||||
|
|
||||||
if GetDepend('SAL_USING_LWIP'):
|
|
||||||
src += Glob('docking/af_inet_lwip.c')
|
|
||||||
|
|
||||||
if GetDepend('SAL_USING_AT'):
|
|
||||||
src += Glob('docking/af_inet_at.c')
|
|
||||||
|
|
||||||
if GetDepend('SAL_USING_LWIP') or GetDepend('SAL_USING_AT'):
|
if GetDepend('SAL_USING_LWIP') or GetDepend('SAL_USING_AT'):
|
||||||
CPPPATH += [cwd + '/docking']
|
CPPPATH += [cwd + '/docking']
|
||||||
|
|
||||||
|
if GetDepend('SAL_USING_LWIP'):
|
||||||
|
src += ['docking/af_inet_lwip.c']
|
||||||
|
|
||||||
|
if GetDepend('SAL_USING_AT'):
|
||||||
|
src += ['docking/af_inet_at.c']
|
||||||
|
|
||||||
if GetDepend('SAL_USING_WINSOCK'):
|
if GetDepend('SAL_USING_WINSOCK'):
|
||||||
src += Glob('docking/af_inet_winsock.c')
|
src += ['docking/af_inet_winsock.c']
|
||||||
|
|
||||||
if GetDepend('SAL_USING_TLS'):
|
if GetDepend('SAL_USING_TLS'):
|
||||||
src += Glob('docking/proto_mbedtls.c')
|
src += ['docking/proto_mbedtls.c']
|
||||||
|
|
||||||
if GetDepend('SAL_USING_POSIX'):
|
if GetDepend('SAL_USING_POSIX'):
|
||||||
CPPPATH += [cwd + '/include/dfs_net']
|
CPPPATH += [cwd + '/include/dfs_net']
|
||||||
src += Glob('socket/net_sockets.c')
|
src += ['socket/net_sockets.c']
|
||||||
src += Glob('dfs_net/*.c')
|
src += ['dfs_net/*.c']
|
||||||
|
|
||||||
if not GetDepend('HAVE_SYS_SOCKET_H'):
|
if not GetDepend('HAVE_SYS_SOCKET_H'):
|
||||||
CPPPATH += [cwd + '/include/socket/sys_socket']
|
CPPPATH += [cwd + '/include/socket/sys_socket']
|
||||||
|
|
Loading…
Reference in New Issue