diff --git a/BUILD.gn b/BUILD.gn index 75b22b7..9c5167b 100755 --- a/BUILD.gn +++ b/BUILD.gn @@ -15,8 +15,6 @@ if (ohos_kernel_type == "liteos_m") { import("//kernel/liteos_m/liteos.gni") module_name = get_path_info(rebase_path("."), "name") module_group(module_name) { - modules = [ - "asr582x", - ] + modules = [ "asr582x" ] } } diff --git a/asr582x/BUILD.gn b/asr582x/BUILD.gn index 1a6d44e..2624878 100755 --- a/asr582x/BUILD.gn +++ b/asr582x/BUILD.gn @@ -19,4 +19,4 @@ if (ohos_kernel_type == "liteos_m") { module_group(module_name) { modules = [ "liteos_m" ] } -} \ No newline at end of file +} diff --git a/asr582x/liteos_m/BUILD.gn b/asr582x/liteos_m/BUILD.gn index e9c8f67..8d56eca 100755 --- a/asr582x/liteos_m/BUILD.gn +++ b/asr582x/liteos_m/BUILD.gn @@ -18,4 +18,4 @@ module_group(module_name) { "sdk", "components", ] -} \ No newline at end of file +} diff --git a/asr582x/liteos_m/components/BUILD.gn b/asr582x/liteos_m/components/BUILD.gn index acfcb69..d847ac0 100755 --- a/asr582x/liteos_m/components/BUILD.gn +++ b/asr582x/liteos_m/components/BUILD.gn @@ -11,10 +11,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//drivers/adapter/khdf/liteos_m/hdf.gni") +import("//drivers/hdf_core/adapter/khdf/liteos_m/hdf.gni") module_group("components") { - modules = [ - "net/lwip-2.1" - ] + modules = [ "net/lwip-2.1" ] } diff --git a/asr582x/liteos_m/components/mbedtls/BUILD.gn b/asr582x/liteos_m/components/mbedtls/BUILD.gn index 934373b..d585e6d 100755 --- a/asr582x/liteos_m/components/mbedtls/BUILD.gn +++ b/asr582x/liteos_m/components/mbedtls/BUILD.gn @@ -13,9 +13,9 @@ # limitations under the License. # -import("//third_party/mbedtls/mbedtls.gni") import("//build/lite/config/component/lite_component.gni") import("//build/lite/ndk/ndk.gni") +import("//third_party/mbedtls/mbedtls.gni") config("mbedtls_config") { include_dirs = [ "." ] + MBEDTLS_INLCUDE_DIRS diff --git a/asr582x/liteos_m/components/net/lwip-2.1/BUILD.gn b/asr582x/liteos_m/components/net/lwip-2.1/BUILD.gn index 24c1126..6fdfb8c 100755 --- a/asr582x/liteos_m/components/net/lwip-2.1/BUILD.gn +++ b/asr582x/liteos_m/components/net/lwip-2.1/BUILD.gn @@ -40,6 +40,5 @@ kernel_module(module_name) { config("public") { defines = [ "_BSD_SOURCE=1" ] - include_dirs = - [ "include" ] + LWIP_PORTING_INCLUDE_DIRS + LWIP_INCLUDE_DIRS + include_dirs = [ "include" ] + LWIP_PORTING_INCLUDE_DIRS + LWIP_INCLUDE_DIRS } diff --git a/asr582x/liteos_m/sdk/BUILD.gn b/asr582x/liteos_m/sdk/BUILD.gn index fa18bde..e9687f3 100755 --- a/asr582x/liteos_m/sdk/BUILD.gn +++ b/asr582x/liteos_m/sdk/BUILD.gn @@ -22,4 +22,4 @@ module_group(module_name) { "rtos", "startup", ] -} \ No newline at end of file +} diff --git a/asr582x/liteos_m/sdk/adapter/hals/communication/wifi_lite/wifiaware/BUILD.gn b/asr582x/liteos_m/sdk/adapter/hals/communication/wifi_lite/wifiaware/BUILD.gn index 3eff28b..db66252 100755 --- a/asr582x/liteos_m/sdk/adapter/hals/communication/wifi_lite/wifiaware/BUILD.gn +++ b/asr582x/liteos_m/sdk/adapter/hals/communication/wifi_lite/wifiaware/BUILD.gn @@ -15,7 +15,5 @@ import("//build/lite/config/component/lite_component.gni") static_library("hal_wifiaware") { sources = [ "source/hal_wifiaware.c" ] - include_dirs = [ - "//foundation/communication/wifi_aware/interfaces/kits", - ] + include_dirs = [ "//foundation/communication/wifi_aware/interfaces/kits" ] } diff --git a/asr582x/liteos_m/sdk/adapter/hals/iot_hardware/wifiiot_lite/BUILD.gn b/asr582x/liteos_m/sdk/adapter/hals/iot_hardware/wifiiot_lite/BUILD.gn index 68b9bfd..188a2fe 100755 --- a/asr582x/liteos_m/sdk/adapter/hals/iot_hardware/wifiiot_lite/BUILD.gn +++ b/asr582x/liteos_m/sdk/adapter/hals/iot_hardware/wifiiot_lite/BUILD.gn @@ -12,18 +12,18 @@ # limitations under the License. static_library("hal_iothardware") { - sources = [ - "hal_iot_flash.c", - "hal_iot_gpio.c", - "hal_iot_i2c.c", - "hal_iot_pwm.c", - "hal_iot_uart.c", - "hal_iot_watchdog.c", - "hal_lowpower.c", - "hal_reset.c", - ] - include_dirs = [ - "//utils/native/lite/include", - "//base/iot_hardware/peripheral/interfaces/kits", - ] + sources = [ + "hal_iot_flash.c", + "hal_iot_gpio.c", + "hal_iot_i2c.c", + "hal_iot_pwm.c", + "hal_iot_uart.c", + "hal_iot_watchdog.c", + "hal_lowpower.c", + "hal_reset.c", + ] + include_dirs = [ + "//utils/native/lite/include", + "//base/iot_hardware/peripheral/interfaces/kits", + ] } diff --git a/asr582x/liteos_m/sdk/adapter/hals/utils/file/BUILD.gn b/asr582x/liteos_m/sdk/adapter/hals/utils/file/BUILD.gn index 7e0d57c..de291fe 100755 --- a/asr582x/liteos_m/sdk/adapter/hals/utils/file/BUILD.gn +++ b/asr582x/liteos_m/sdk/adapter/hals/utils/file/BUILD.gn @@ -15,7 +15,5 @@ import("//build/lite/config/component/lite_component.gni") static_library("hal_file_static") { sources = [ "src/hal_file.c" ] - include_dirs = [ - "//utils/native/lite/hals/file", - ] + include_dirs = [ "//utils/native/lite/hals/file" ] } diff --git a/asr582x/liteos_m/sdk/config/BUILD.gn b/asr582x/liteos_m/sdk/config/BUILD.gn index b4bbc26..5732251 100755 --- a/asr582x/liteos_m/sdk/config/BUILD.gn +++ b/asr582x/liteos_m/sdk/config/BUILD.gn @@ -16,6 +16,7 @@ import("//kernel/liteos_m/liteos.gni") lib_path = rebase_path("../drivers/libs/Cortex-M4") asr582x_release_type = "release" + # debug/release config("public") { @@ -28,28 +29,33 @@ config("public") { "../drivers/platform/CMSIS/Include/", "../startup/", "../drivers/common/", -#at cmd + + #at cmd "../drivers/at_cmd/", -#at cmd end + + #at cmd end "../drivers/kv/include", "../rtos/", "../drivers/common", "../hal/inc", "../drivers/security/inc", -# "security_test", + + # "security_test", "../drivers/iperf", "../drivers/ble_inc", "../drivers/ota", "//foundation/communication/wifi_lite/interfaces/wifiservice/", "//base/iot_hardware/peripheral/interfaces/kits", -# "security/mbedtls/include/", + + # "security/mbedtls/include/", "//third_party/mbedtls/include/mbedtls", "//third_party/mbedtls/include", ] ldflags = [ "-nostartfiles", "-Wl,-T" + rebase_path("../gcc.ld"), - "-Wl,-R" + rebase_path("../tools/ble_rom_symbol/asr_ble_rom_symbol_v20200507204845.txt"), + "-Wl,-R" + rebase_path( + "../tools/ble_rom_symbol/asr_ble_rom_symbol_v20200507204845.txt"), "-nostdlib", ] libs = [ @@ -67,97 +73,87 @@ config("public") { ] } -if(asr582x_release_type == "debug"){ - libs -= [ - "$lib_path/libasr_combo.a", - ] -} + if (asr582x_release_type == "debug") { + libs -= [ "$lib_path/libasr_combo.a" ] + } ldflags += [ - "-Llibs", - "-Wl,--whole-archive", - "-lbootstrap", - "-lbroadcast", + "-Llibs", + "-Wl,--whole-archive", + "-lbootstrap", + "-lbroadcast", ] defines = [] foreach(xts_item, xts_list) { - xts_enable = xts_item.enable - if(xts_enable == "true") - { - defines += [ "CFG_HARMONY_SUPPORT" ] - ldflags += [ - "-lhctest" - ] - foreach(xts_module, xts_item.xts_modules) { + xts_enable = xts_item.enable + if (xts_enable == "true") { + defines += [ "CFG_HARMONY_SUPPORT" ] + ldflags += [ "-lhctest" ] + foreach(xts_module, xts_item.xts_modules) { ldflags += [ "-lmodule_${xts_module}" ] - } } + } } foreach(test_item, tests_list) { - test_enable = test_item.enable - if(test_enable == "true") - { - defines += [ "CFG_HARMONY_TESTS" ] - ldflags += [ - "-lhilog_static" - ] - foreach(test_module, test_item.test_modules) { + test_enable = test_item.enable + if (test_enable == "true") { + defines += [ "CFG_HARMONY_TESTS" ] + ldflags += [ "-lhilog_static" ] + foreach(test_module, test_item.test_modules) { ldflags += [ "-l${test_module}" ] - } } + } } ldflags += [ "-Wl,--no-whole-archive" ] defines += [ - "WIFI_BLE_INIT_ENABLE", - "HARMONYOS_SUPPORT", - "SYSTEM_SUPPORT_OS", - "_SPI_FLASH_ENABLE_", - "DUET_FLASH_KV_SUPPORT", - "STAR_MPU_ENABLE", - "AT_USER_DEBUG", - "DUET_CM4", - "DCDC_PFMMODE_CLOSE", -# "LWIP_APP_IPERF", - "__FPU_PRESENT=1", - "SYSTEM_COREDUMP", - "SECURITY_ENGINE_INIT", - "CFG_RTC_INDEPENDENT", - "DUET_RF_SLEEP", - "FAST_DHCP", -# "CFG_MRFOTA_TEST", - "CFG_RFOTA_BLE", - "CFG_TMMT_DETECT", - "_SPI_FLASH_240MHz_", - "XO_FREQ_BIAS_CONFIG", - "CFG_NVDS", - "CFG_APP", - "CFG_APP_SEC", - "CFG_SEG", - "CFG_PLF_DUET", - "SONATA_RTOS_SUPPORT", - "CFG_HOST", - "CFG_BLE", - "DUET_BLE_NO_BLOCK", - "LEGA_A0V2", - "CFG_NAN_CONFIG", - "CFG_NAN_OPTIMIZE_EN", - "LEGAOS_SUPPORT", -# "BLE_APP_AT_CMD", + "WIFI_BLE_INIT_ENABLE", + "HARMONYOS_SUPPORT", + "SYSTEM_SUPPORT_OS", + "_SPI_FLASH_ENABLE_", + "DUET_FLASH_KV_SUPPORT", + "STAR_MPU_ENABLE", + "AT_USER_DEBUG", + "DUET_CM4", + "DCDC_PFMMODE_CLOSE", + + # "LWIP_APP_IPERF", + "__FPU_PRESENT=1", + "SYSTEM_COREDUMP", + "SECURITY_ENGINE_INIT", + "CFG_RTC_INDEPENDENT", + "DUET_RF_SLEEP", + "FAST_DHCP", + + # "CFG_MRFOTA_TEST", + "CFG_RFOTA_BLE", + "CFG_TMMT_DETECT", + "_SPI_FLASH_240MHz_", + "XO_FREQ_BIAS_CONFIG", + "CFG_NVDS", + "CFG_APP", + "CFG_APP_SEC", + "CFG_SEG", + "CFG_PLF_DUET", + "SONATA_RTOS_SUPPORT", + "CFG_HOST", + "CFG_BLE", + "DUET_BLE_NO_BLOCK", + "LEGA_A0V2", + "CFG_NAN_CONFIG", + "CFG_NAN_OPTIMIZE_EN", + "LEGAOS_SUPPORT", + + # "BLE_APP_AT_CMD", ] } - kernel_module("asr_config") { - sources = [ - "partition_conf.c", - ] - if(asr582x_release_type == "debug"){ - deps = [ - "//device/soc/asrmicro/asr582x/liteos_m/sdk/lib:asr_combo", - ] + sources = [ "partition_conf.c" ] + if (asr582x_release_type == "debug") { + deps = [ "//device/soc/asrmicro/asr582x/liteos_m/sdk/lib:asr_combo" ] } } diff --git a/asr582x/liteos_m/sdk/drivers/BUILD.gn b/asr582x/liteos_m/sdk/drivers/BUILD.gn index 89f7360..abc0f7b 100755 --- a/asr582x/liteos_m/sdk/drivers/BUILD.gn +++ b/asr582x/liteos_m/sdk/drivers/BUILD.gn @@ -19,19 +19,20 @@ config("public") { kernel_module("asr_system") { sources = [ -# "common/lega_mac_addr.c", - "at_cmd/atcmd_user.c", - "at_cmd/atcmdplus_ble.c", - "ble_src/app.c", - "ble_src/at_ble.c", - "ble_src/harmony_ble_adpter.c", - "rfota/rfota_wifi.c", - "rfota/rfota_ble.c", - "iperf/lwip_iperf.c", - "platform/system/printf-stdarg.c", - "platform/system/printf_uart.c", - "platform/system/sysCalls.c", -# "platform/system/system_cm4.c", -# "platform/system/panic_mpu.c", + # "common/lega_mac_addr.c", + "at_cmd/atcmd_user.c", + "at_cmd/atcmdplus_ble.c", + "ble_src/app.c", + "ble_src/at_ble.c", + "ble_src/harmony_ble_adpter.c", + "iperf/lwip_iperf.c", + "platform/system/printf-stdarg.c", + "platform/system/printf_uart.c", + "platform/system/sysCalls.c", + "rfota/rfota_ble.c", + "rfota/rfota_wifi.c", + + # "platform/system/system_cm4.c", + # "platform/system/panic_mpu.c", ] } diff --git a/asr582x/liteos_m/sdk/drivers/driver/BUILD.gn b/asr582x/liteos_m/sdk/drivers/driver/BUILD.gn index 0ea45c7..94b585c 100755 --- a/asr582x/liteos_m/sdk/drivers/driver/BUILD.gn +++ b/asr582x/liteos_m/sdk/drivers/driver/BUILD.gn @@ -18,21 +18,22 @@ config("public") { } kernel_module("asr_drivers") { - sources = [ - "src/duet_flash_alg.c", - "src/duet_efuse.c", - "src/duet_board.c", - "src/duet_flash.c", - "src/duet_gpio.c", - "src/duet_uart.c", - "src/duet_wdg.c", -# "src/duet_rtc.c", - "src/duet_rf_spi.c", - "src/duet_pinmux.c", - "src/duet_timer.c", - "src/duet_dma.c", - "src/duet_boot.c", - "src/duet_i2c.c", - "src/duet_pwm.c", - ] -} \ No newline at end of file + sources = [ + "src/duet_board.c", + "src/duet_boot.c", + "src/duet_dma.c", + "src/duet_efuse.c", + "src/duet_flash.c", + "src/duet_flash_alg.c", + "src/duet_gpio.c", + "src/duet_i2c.c", + "src/duet_pinmux.c", + "src/duet_pwm.c", + + # "src/duet_rtc.c", + "src/duet_rf_spi.c", + "src/duet_timer.c", + "src/duet_uart.c", + "src/duet_wdg.c", + ] +} diff --git a/asr582x/liteos_m/sdk/hal/BUILD.gn b/asr582x/liteos_m/sdk/hal/BUILD.gn index afd1652..adbb7d8 100755 --- a/asr582x/liteos_m/sdk/hal/BUILD.gn +++ b/asr582x/liteos_m/sdk/hal/BUILD.gn @@ -18,7 +18,5 @@ config("public") { } kernel_module("asr_hal") { - sources = [ - "src/wifi_adapter.c", - ] -} \ No newline at end of file + sources = [ "src/wifi_adapter.c" ] +} diff --git a/asr582x/liteos_m/sdk/rtos/BUILD.gn b/asr582x/liteos_m/sdk/rtos/BUILD.gn index aa88122..e2e2e3e 100755 --- a/asr582x/liteos_m/sdk/rtos/BUILD.gn +++ b/asr582x/liteos_m/sdk/rtos/BUILD.gn @@ -19,7 +19,7 @@ config("public") { kernel_module("lega_rtos") { sources = [ - "liteos_patch.c", - "lega_rtos.c", + "lega_rtos.c", + "liteos_patch.c", ] } diff --git a/asr582x/liteos_m/sdk/startup/BUILD.gn b/asr582x/liteos_m/sdk/startup/BUILD.gn index 88c0fff..d4d9f6c 100755 --- a/asr582x/liteos_m/sdk/startup/BUILD.gn +++ b/asr582x/liteos_m/sdk/startup/BUILD.gn @@ -19,18 +19,18 @@ config("public") { kernel_module("asr_startup") { sources = [ - "startup.c", - "board.c", - "startup_cm4.S", + "board.c", + "startup.c", + "startup_cm4.S", ] include_dirs = [ - "//drivers/framework/include/platform", - "//drivers/framework/include/utils", - "//drivers/adapter/khdf/liteos_m/osal/include", - "//drivers/framework/include/osal", - "//drivers/framework/core/common/include/manager", + "//drivers/hdf_core/framework/include/platform", + "//drivers/hdf_core/framework/include/utils", + "//drivers/hdf_core/adapter/khdf/liteos_m/osal/include", + "//drivers/hdf_core/framework/include/osal", + "//drivers/hdf_core/framework/core/common/include/manager", "//utils/native/lite/include", "//utils/native/lite/memory/include", ] -} \ No newline at end of file +}