support aliyun sdk on TencentOS tiny

sample: examples\aliyun_iotkit_csdk_mqtt
project: board\TencentOS_tiny_EVB_MX_Plus\KEIL\aliyun_iotkit_csdk_mqtt
This commit is contained in:
dcxajichu
2019-10-31 16:36:28 +08:00
parent 30ea36a7ab
commit 8c24d921b0
692 changed files with 199829 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
config ATM_ENABLED
bool "FEATURE_ATM_ENABLED"
default n
menu "ATM Configurations"
depends on ATM_ENABLED
config AT_TCP_ENABLED
bool "FEATURE_AT_TCP_ENABLED"
default n
config AT_MQTT_ENABLED
bool "FEATURE_AT_MQTT_ENABLED"
depends on MQTT_COMM_ENABLED
depends on !MQTT_DEFAULT_IMPL
depends on !AT_TCP_ENABLED
default n
config AT_PARSER_ENABLED
bool "FEATURE_AT_PARSER_ENABLED"
default n
choice
prompt "AT HAL Configurations"
depends on AT_PARSER_ENABLED
default AT_HAL_NONE
config AT_HAL_NONE
bool "FEATURE_AT_HAL_NONE"
default n
config AT_TCP_HAL_MK3060
bool "FEATURE_AT_TCP_HAL_MK3060"
default n
depends on AT_TCP_ENABLED
config AT_TCP_HAL_SIM800
bool "FEATURE_AT_TCP_HAL_SIM800"
default n
depends on AT_TCP_ENABLED
config AT_MQTT_HAL_ICA
bool "FEATURE_AT_MQTT_HAL_ICA"
default n
depends on AT_MQTT_ENABLED
config AT_MQTT_HAL_SIM800
bool "FEATURE_AT_MQTT_HAL_SIM800"
default n
depends on AT_MQTT_ENABLED
endchoice
endmenu

View File

@@ -0,0 +1,41 @@
config COAP_COMM_ENABLED
bool "FEATURE_COAP_COMM_ENABLED"
default n
select INFRA_COMPAT
select COAP_CLIENT
help
Establish non-persistent connection with AliCloud via CoAP-based protocol
Switching to "y" leads to building CoAP related implementation into SDK and COAP_COMM_ENABLED included into CFLAGS
Switching to "n" leads to keeping CoAP-based cloud connection implementations out of SDK
config COAP_PACKET
bool
default n
config COAP_CLIENT
bool
default n
select INFRA_CJSON
select INFRA_JSON_PARSER
select INFRA_HTTPC
select INFRA_SHA256
select INFRA_MD5
select INFRA_REPORT
select INFRA_STRING
select HAL_CRYPTO
select HAL_UDP
select COAP_PACKET
config COAP_SERVER
bool
default n
select INFRA_MD5
select INFRA_STRING
select INFRA_JSON_PARSER
select INFRA_SHA1
select HAL_UDP
select HAL_KV
select HAL_CRYPTO
select COAP_PACKET

View File

@@ -0,0 +1,12 @@
config DEV_BIND_ENABLED
bool "FEATURE_DEV_BIND_ENABLED"
select INFRA_CLASSIC
select INFRA_COMPAT
select COAP_SERVER
select MQTT_COMM_ENABLED
default n
help
Enable dev-bind in SDK

View File

@@ -0,0 +1,83 @@
config DEVICE_MODEL_CLASSIC
bool
default y
config LOG_REPORT_TO_CLOUD
bool
default n
config DEVICE_MODEL_ENABLED
depends on MQTT_COMM_ENABLED
bool "FEATURE_DEVICE_MODEL_ENABLED"
select DEVICE_MODEL_CLASSIC
select INFRA_CLASSIC
select INFRA_COMPAT
select INFRA_CJSON
select LOG_REPORT_TO_CLOUD if MQTT_COMM_ENABLED
default y
help
Enable providing Thing-Model-Management/Alink-Protocol encapulation in SDK
Switching to "y" leads to SDK being able to interpret JSON payload in MQTT channel, which also called "Advanced Version Protocol"
Those capabilities are provided via IOT_Linkkit_XXX() APIs or being_deprecated linkkit_xxx() + linkkit_gateway_xxx() APIs
menu "Device Model Configurations"
depends on DEVICE_MODEL_ENABLED
config DEVICE_MODEL_GATEWAY
bool "FEATURE_DEVICE_MODEL_GATEWAY"
select INFRA_SHA1
default n
help
Switching Thing-Model related implementations provided in gateway oriented way
config DEPRECATED_LINKKIT
bool
default n
select INFRA_JSON_PARSER
help
Enable providing Thing-Model related functions via being_deprecated/old/obsoleted APIs
They are named as linkkit_xxx() or linkkit_gateway_xxx(), declared in linkkit_export.h and linkkit_gateway_export.h
Switching to "y" leads to SDK providing APIs in linkkit_export.h + linkkit_gateway_export.h
Switching to "n" leads to SDK providing APIs in iot_export_linkkit.h
config DEVICE_MODEL_RAWDATA_SOLO
bool "FEATURE_DEVICE_MODEL_RAWDATA_SOLO"
depends on DEVICE_MODEL_ENABLED && !DEVICE_MODEL_GATEWAY && !DEPRECATED_LINKKIT
default n
help
Enable only raw data function via IOT_Linkkit_xxx new APIs
Switching to "y" leads to SDK being compiled only raw data function
Switching to "n" leads to SDK being compiled both raw data and thing model function
config ALCS_ENABLED
bool "FEATURE_ALCS_ENABLED"
default n
select COAP_SERVER
help
ALCS(alink local communication service) is a communication between phone and device
Switching to "y" leads to SDK being compiled with alcs function
Switching to "n" leads to SDK being compiled without alcs function
config SUB_PERSISTENCE_ENABLED
bool "FEATURE_SUB_PERSISTENCE_ENABLED"
default n
select HAL_KV
help
Enable this feature will enhance subscribe speed by storing mqtt subscribe infomation with HAL_KV
config DEVICE_MODEL_SUBDEV_OTA
depends on DEVICE_MODEL_GATEWAY
depends on OTA_ENABLED
bool "FEATURE_DEVICE_MODEL_SUBDEV_OTA"
default n
config DEVICE_MODEL_SHADOW
bool "FEATURE_DEVICE_MODEL_SHADOW"
default n
endmenu

View File

@@ -0,0 +1,5 @@
config DEV_RESET
bool "FEATURE_DEV_RESET"
default n
select MQTT_COMM_ENABLED
select HAL_KV

View File

@@ -0,0 +1,4 @@
config DEV_SIGN
bool
default y
select INFRA_SHA256

View File

@@ -0,0 +1,7 @@
config DYNAMIC_REGISTER
bool "FEATURE_DYNAMIC_REGISTER"
default n
select INFRA_STRING
select INFRA_HTTPC
select INFRA_SHA256
select SUPPORT_TLS

View File

@@ -0,0 +1,12 @@
config HTTP_COMM_ENABLED
bool "FEATURE_HTTP_COMM_ENABLED"
default n
select INFRA_SHA1
select INFRA_HTTPC
select INFRA_REPORT
select INFRA_JSON_PARSER
select SUPPORT_TLS
help
Establish persistent connection with AliCloud via HTTP-based protocol

View File

@@ -0,0 +1,18 @@
config HTTP2_COMM_ENABLED
bool "FEATURE_HTTP2_COMM_ENABLED"
select INFRA_HTTPC
select INFRA_SHA1
select INFRA_TIMER
select SUPPORT_TLS
select ON_DAILY
select FS_ENABLED
default n
help
Establish persistent connection with AliCloud via HTTP2-stream protocol
config FS_ENABLED
bool
default n
help
USE HAL fs api to enable file upload feature

View File

@@ -0,0 +1,149 @@
config PLATFORM_HAS_STDINT
bool "PLATFORM_HAS_STDINT"
default y
help
Tell if you have <stdint.h> when build image for target board
Switching to "n" leads to SDK use self-defined data-type in src/infra/infra_types.h
config PLATFORM_HAS_DYNMEM
bool "PLATFORM_HAS_DYNMEM"
default y
help
Tell if you have malloc() and free() style capability on target board via HAL_Malloc() and HAL_Free()
Switching to "y" leads to SDK invoking HAL_Malloc() and HAL_Free() so runtime memory is dynamic
Switching to "n" leads to SDK use global static array instead of heap so process capability is more limited
config PLATFORM_HAS_OS
bool "PLATFORM_HAS_OS"
default n
help
Tell if you have Operation System on target board
Switching to "y" leads to SDK invoking HAL_Mutex_Lock() / HAL_Semaphore_Wait() etc
Switching to "n" leads to SDK avoid using mutex and semaphore, and avoid using multi-task as well
config INFRA_STRING
bool
default n
config INFRA_NET
bool
default n
config INFRA_LIST
bool
default n
config INFRA_LOG_NETWORK_PAYLOAD
bool "FEATURE_INFRA_NETWORK_PAYLOAD"
default y if MQTT_COMM_ENABLED || COAP_COMM_ENABLED || HTTP_COMM_ENABLED || DEVICE_MODEL_ENABLED
help
Parse and print JSON format upstream and downstream network packet payload when SDK communicates with cloud
config INFRA_LOG
bool "FEATURE_INFRA_LOG"
default y
select INFRA_LOG_ALL_MUTED if (INFRA_LOG_MUTE_FLW && INFRA_LOG_MUTE_DBG && INFRA_LOG_MUTE_INF && INFRA_LOG_MUTE_WRN && INFRA_LOG_MUTE_ERR && INFRA_LOG_MUTE_CRT)
help
Control SDK print formatted log but all levels are muted by default, enable them in sub-menu of "Log Configurations"
menu "Log Configurations"
depends on INFRA_LOG
config INFRA_LOG_ALL_MUTED
bool
default n
config INFRA_LOG_MUTE_FLW
bool "MUTE LEVEL of FLOW (6)"
default y
config INFRA_LOG_MUTE_DBG
bool "MUTE LEVEL of DEBUG (5)"
default y
config INFRA_LOG_MUTE_INF
bool "MUTE LEVEL of INFO (4)"
default y
config INFRA_LOG_MUTE_WRN
bool "MUTE LEVEL of WARN (3)"
default y
config INFRA_LOG_MUTE_ERR
bool "MUTE LEVEL of ERROR (2)"
default y
config INFRA_LOG_MUTE_CRT
bool "MUTE LEVEL of CRIT (1)"
default y
endmenu
config INFRA_MEM_STATS
bool
default n
config INFRA_TIMER
bool
default n
config INFRA_RANDOM
bool
default n
config INFRA_JSON_PARSER
bool
default n
config INFRA_CJSON
bool
default n
config INFRA_MD5
bool
default n
config INFRA_SHA1
bool
default n
config INFRA_SHA256
bool
default n
config INFRA_REPORT
bool
default n
select INFRA_STRING
config INFRA_HTTPC
bool
default n
select INFRA_NET
select INFRA_TIMER
config INFRA_MEM_STATS
bool
default n
select INFRA_LIST
config INFRA_COMPAT
bool
default n
select HAL_KV if DYNAMIC_REGISTER
config INFRA_CLASSIC
bool
default n
config INFRA_PREAUTH
bool
default n
config INFRA_AES
bool
default n

View File

@@ -0,0 +1,63 @@
config MQTT_COMM_ENABLED
bool "FEATURE_MQTT_COMM_ENABLED"
default y
select MQTT_PRE_AUTH if !MQTT_DIRECT
select DEV_SIGN
select INFRA_SHA256
select INFRA_LIST
select INFRA_TIMER
select INFRA_REPORT
select INFRA_COMPAT
help
Establish persistent connection with AliCloud via MQTT-based protocol
Switching to "y" leads to building MQTT related implementation into SDK and MQTT_COMM_ENABLED included into CFLAGS
Switching to "n" seldom happens unless you're connecting to AliCloud via CoAP/HTTP channel
menu "MQTT Configurations"
depends on MQTT_COMM_ENABLED
config MQTT_DEFAULT_IMPL
bool "FEATURE_MQTT_DEFAULT_IMPL"
default y
select INFRA_SHA256
select INFRA_NET
select INFRA_TIMER
help
Use SDK default MQTT implementation
Switching to "y" leads to building MQTT related implementation into SDK and MQTT_DEFAULT_IMPL included into CFLAGS
Switching to "n" seldom happens unless you're using other MQTT implementations
config MQTT_PRE_AUTH
bool
default n
select SUPPORT_TLS
select INFRA_HTTPC
select INFRA_PREAUTH
config MQTT_DIRECT
bool "FEATURE_MQTT_DIRECT"
default y
help
Directly connect MQTT server without perform HTTP authenticate to another HTTP server ahead
Switching to "y" leads to connect MQTT server directly and MQTT_DIRECT included into CFLAGS
Switching to "n" leads to legacy authenticate mode: connnect HTTP server first, then connect MQTT server afterwards
config ASYNC_PROTOCOL_STACK
bool "FEATURE_ASYNC_PROTOCOL_STACK"
default n
help
Use async protocol stack for SDK default MQTT implementation
Switching to "y" leads to building MQTT async protocol stack related implementation into SDK and ASYNC_PROTOCOL_STACK included into CFLAGS
Switching to "n" seldom happens unless you're not using async protocol stack
endmenu

View File

@@ -0,0 +1,8 @@
config OTA_ENABLED
bool "FEATURE_OTA_ENABLED"
depends on MQTT_COMM_ENABLED
select INFRA_STRING
select INFRA_JSON_PARSER
select INFRA_HTTPC
select INFRA_MD5
select INFRA_SHA256

View File

@@ -0,0 +1,75 @@
config AWSS_SUPPORT_APLIST
bool
default n
config AWSS_DISABLE_ENROLLEE
bool
default n
config AWSS_DISABLE_REGISTRAR
bool
default n
config AWSS_SUPPORT_ADHA
bool
default n
config AWSS_FRAMEWORKS
bool
default n
config WIFI_PROVISION_ENABLED
bool "FEATURE_WIFI_PROVISION_ENABLED"
select DEV_BIND_ENABLED
select INFRA_AES if !SUPPORT_TLS
select AWSS_FRAMEWORKS if AWSS_SUPPORT_SMARTCONFIG_WPS || AWSS_SUPPORT_SMARTCONFIG
select AWSS_FRAMEWORKS if AWSS_SUPPORT_ZEROCONFIG || AWSS_SUPPORT_DEV_AP
select AWSS_FRAMEWORKS if AWSS_SUPPORT_AHA || AWSS_SUPPORT_ADHA
select AWSS_DISABLE_ENROLLEE if !AWSS_SUPPORT_ZEROCONFIG
select AWSS_DISABLE_REGISTRAR if !AWSS_SUPPORT_ZEROCONFIG
select AWSS_SUPPORT_APLIST if AWSS_FRAMEWORKS
select INFRA_CLASSIC if AWSS_FRAMEWORKS
select INFRA_CJSON if AWSS_FRAMEWORKS
select INFRA_COMPAT if AWSS_FRAMEWORKS
default n
help
Enable providing Wifi SSID/PASSWD configration in SDK
config AWSS_SUPPORT_SMARTCONFIG_WPS
bool
default n
menu "Wifi Provision Configurations"
depends on WIFI_PROVISION_ENABLED
config AWSS_SUPPORT_SMARTCONFIG
bool "FEATURE_AWSS_SUPPORT_SMARTCONFIG"
select AWSS_SUPPORT_SMARTCONFIG_WPS
default y
help
Switching on a wifi provision method based on len-encoding
config AWSS_SUPPORT_ZEROCONFIG
bool "FEATURE_AWSS_SUPPORT_ZEROCONFIG"
select MQTT_COMM_ENABLED
default n
help
Switching on a wifi provision method based on zero-config, which shares ssid/passwd between devices
config AWSS_SUPPORT_AHA
bool "FEATURE_AWSS_SUPPORT_AHA, ADHA"
select AWSS_SUPPORT_ADHA
default n
help
Switching on a wifi provision method based on phone-ap, which tells the ssid/passwd to the devices connected to it
Switching on a wifi provision method based on router-ap, which tells the ssid/passwd to the devices connected to it
config AWSS_SUPPORT_DEV_AP
bool "FEATURE_AWSS_SUPPORT_DEV_AP"
default n
help
Switching on a wifi provision method based on device-ap, which receives the ssid/passwd from the phones connected to it
endmenu

View File

@@ -0,0 +1,19 @@
config HAL_KV
bool
default n
config SUPPORT_TLS
bool "FEATURE_SUPPORT_TLS"
default y if OTA_ENABLED
config HAL_CRYPTO
bool
default n
config HAL_UDP
bool
default n
config COAP_DTLS_SUPPORT
bool
default n