!18 feat: normalize drivers framework component and repos

Merge pull request !18 from yuanbo/master
This commit is contained in:
openharmony_ci
2022-06-17 06:40:14 +00:00
committed by Gitee
16 changed files with 142 additions and 155 deletions
+1 -3
View File
@@ -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" ]
}
}
+1 -1
View File
@@ -19,4 +19,4 @@ if (ohos_kernel_type == "liteos_m") {
module_group(module_name) {
modules = [ "liteos_m" ]
}
}
}
+1 -1
View File
@@ -18,4 +18,4 @@ module_group(module_name) {
"sdk",
"components",
]
}
}
+2 -4
View File
@@ -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" ]
}
+1 -1
View File
@@ -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
@@ -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
}
+1 -1
View File
@@ -22,4 +22,4 @@ module_group(module_name) {
"rtos",
"startup",
]
}
}
@@ -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" ]
}
@@ -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",
]
}
@@ -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" ]
}
+71 -75
View File
@@ -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" ]
}
}
+15 -14
View File
@@ -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",
]
}
+19 -18
View File
@@ -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",
]
}
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",
]
}
+2 -4
View File
@@ -18,7 +18,5 @@ config("public") {
}
kernel_module("asr_hal") {
sources = [
"src/wifi_adapter.c",
]
}
sources = [ "src/wifi_adapter.c" ]
}
+2 -2
View File
@@ -19,7 +19,7 @@ config("public") {
kernel_module("lega_rtos") {
sources = [
"liteos_patch.c",
"lega_rtos.c",
"lega_rtos.c",
"liteos_patch.c",
]
}
+9 -9
View File
@@ -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",
]
}
}