From 5198c0b5c38b2f1ad23e71daab9d35c932bab2bf Mon Sep 17 00:00:00 2001 From: shchen Date: Tue, 2 Feb 2021 15:57:26 +0800 Subject: [PATCH] fix mbedtls --- .../demos/oc_mqtt_demo/oc_mqtt_water_meter.c | 2 +- .../iot_link/os/freertos_bl/freertos_bl_imp.c | 24 +------------------ components/security/mbedtls/bouffalo.mk | 6 ++--- customer_app/bl602_huawei_cloud/Makefile | 1 + .../bl602_huawei_cloud/bl602_demo_wifi/main.c | 4 ++-- .../bl602_huawei_cloud/proj_config.mk | 4 ++++ make_scripts_riscv/project.mk | 2 +- 7 files changed, 12 insertions(+), 31 deletions(-) diff --git a/components/3rdparty/hwcloud_iot_link/iot_link/demos/oc_mqtt_demo/oc_mqtt_water_meter.c b/components/3rdparty/hwcloud_iot_link/iot_link/demos/oc_mqtt_demo/oc_mqtt_water_meter.c index 9f226c8e..03331bb6 100644 --- a/components/3rdparty/hwcloud_iot_link/iot_link/demos/oc_mqtt_demo/oc_mqtt_water_meter.c +++ b/components/3rdparty/hwcloud_iot_link/iot_link/demos/oc_mqtt_demo/oc_mqtt_water_meter.c @@ -89,7 +89,7 @@ static const char s_server_ca[] = "CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=\r\n" "-----END CERTIFICATE-----\r\n"; -#define CN_EP_DEVICEID "6007910b4f04b00309bca4a3_bl602_mqtt_12345678" // watermeter水表模型 +#define CN_EP_DEVICEID "60056c19aaafca02dbd25786_bl602_mqtt_12345678" // watermeter水表模型 #define CN_EP_PASSWD "12345678" // ///< the client use the cert mode SHA-256 diff --git a/components/3rdparty/hwcloud_iot_link/iot_link/os/freertos_bl/freertos_bl_imp.c b/components/3rdparty/hwcloud_iot_link/iot_link/os/freertos_bl/freertos_bl_imp.c index 0dbdb280..f75aa871 100644 --- a/components/3rdparty/hwcloud_iot_link/iot_link/os/freertos_bl/freertos_bl_imp.c +++ b/components/3rdparty/hwcloud_iot_link/iot_link/os/freertos_bl/freertos_bl_imp.c @@ -83,13 +83,7 @@ static void __task_exit() while(1); //not supported yet } -// static void* __cur_task_id() -// { -// void *handler = xTaskGetCurrentTaskHandle(); -// return handler; -// } -///< this is implement for the mutex -//creat a mutex for the os + static bool_t __mutex_create(osal_mutex_t *mutex) { *mutex = xSemaphoreCreateMutex(); @@ -256,22 +250,6 @@ static unsigned long long __get_sys_time() return xTaskGetTickCount(); } - -#if 0 // -//interrupt -// #include -// static int __int_connect(int intnum, int prio, int mode, fn_interrupt_handle callback, void* arg) -// { -// extern unsigned int LOS_HwiCreate(HWI_HANDLE_T uwHwiNum, \ -// HWI_PRIOR_T usHwiPrio, \ -// HWI_MODE_T usMode, \ -// HWI_PROC_FUNC pfnHandler, \ -// HWI_ARG_T uwArg \ -// ); -// return LOS_HwiCreate((HWI_HANDLE_T)intnum, (HWI_PRIOR_T)prio,(HWI_MODE_T) mode, (HWI_PROC_FUNC)callback, (HWI_ARG_T)arg); -// } -#endif - static const tag_os_ops s_cmsisos_ops = { .task_sleep = __task_sleep, diff --git a/components/security/mbedtls/bouffalo.mk b/components/security/mbedtls/bouffalo.mk index 8c5e2b3e..31bdaa7b 100644 --- a/components/security/mbedtls/bouffalo.mk +++ b/components/security/mbedtls/bouffalo.mk @@ -1,10 +1,10 @@ # Component Makefile # ## These include paths would be exported to project level -COMPONENT_ADD_INCLUDEDIRS += include/mbedtls_port +COMPONENT_ADD_INCLUDEDIRS += ## not be exported to project level -COMPONENT_PRIV_INCLUDEDIRS := include/mbedtls include/icrypto +COMPONENT_PRIV_INCLUDEDIRS := include/mbedtls include/icrypto include/mbedtls_port NAME := imbedtls @@ -96,5 +96,3 @@ COMPONENT_SRCDIRS := src ## CPPFLAGS += -DLWIP_ENABLED -DCONFIG_PLAT_AOS -## Hwcloud -CPPFLAGS += -D MBEDTLS_CONFIG_FILE=\"los_mbedtls_config.h\" diff --git a/customer_app/bl602_huawei_cloud/Makefile b/customer_app/bl602_huawei_cloud/Makefile index f3b5ffeb..337f6bde 100644 --- a/customer_app/bl602_huawei_cloud/Makefile +++ b/customer_app/bl602_huawei_cloud/Makefile @@ -31,5 +31,6 @@ INCLUDE_COMPONENTS += $(COMPONENTS_NETWORK) INCLUDE_COMPONENTS += $(COMPONENTS_BLSYS) INCLUDE_COMPONENTS += $(COMPONENTS_VFS) INCLUDE_COMPONENTS += $(PROJECT_NAME) +## Hwcloud include $(BL60X_SDK_PATH)/make_scripts_riscv/project.mk diff --git a/customer_app/bl602_huawei_cloud/bl602_demo_wifi/main.c b/customer_app/bl602_huawei_cloud/bl602_demo_wifi/main.c index 775b7d80..180b9697 100644 --- a/customer_app/bl602_huawei_cloud/bl602_demo_wifi/main.c +++ b/customer_app/bl602_huawei_cloud/bl602_demo_wifi/main.c @@ -83,7 +83,7 @@ #include #ifdef CONFIG_HWCLOUD_IOT_LINK -#include // +#include #endif #define mainHELLO_TASK_PRIORITY ( 20 ) @@ -1015,7 +1015,7 @@ void bfl_main() xTaskCreateStatic(proc_hellow_entry, (char*)"hellow", 512, NULL, 15, proc_hellow_stack, &proc_hellow_task); #ifdef CONFIG_HWCLOUD_IOT_LINK - example_hwcloud_iot_link(); // + example_hwcloud_iot_link(); #endif puts("[OS] Starting aos_loop_proc task...\r\n"); diff --git a/customer_app/bl602_huawei_cloud/proj_config.mk b/customer_app/bl602_huawei_cloud/proj_config.mk index 1e1eeef1..ee4ade71 100644 --- a/customer_app/bl602_huawei_cloud/proj_config.mk +++ b/customer_app/bl602_huawei_cloud/proj_config.mk @@ -51,6 +51,10 @@ endif #blog enable components format :=blog_testc cli vfs helper LOG_ENABLED_COMPONENTS:=blog_testc hal_drv loopset looprt bloop + #enable huaweicloud iot link example // CONFIG_HWCLOUD_IOT_LINK := 1 +ifeq ($(CONFIG_HWCLOUD_IOT_LINK),1) +CPPFLAGS += -D MBEDTLS_CONFIG_FILE=\"los_mbedtls_config.h\" +endif \ No newline at end of file diff --git a/make_scripts_riscv/project.mk b/make_scripts_riscv/project.mk index 2df88bbe..cbd59c68 100644 --- a/make_scripts_riscv/project.mk +++ b/make_scripts_riscv/project.mk @@ -261,7 +261,7 @@ CPPFLAGS += -D BL_CHIP_NAME=\"$(BL_CHIP_NAME)\" -MMD -MP $(CPPFLAGS) $(EXTRA_CPP CPPFLAGS += -DARCH_RISCV # Warnings-related flags relevant both for C and C++ -COMMON_WARNING_FLAGS = -Wall -Werror=all \ +COMMON_WARNING_FLAGS = -Wall \ -Wno-error=unused-function \ -Wno-error=unused-but-set-variable \ -Wno-error=unused-variable \