feat: normalize drivers framework component and repos

Signed-off-by: yuanbo <yuanbo@huawei.com>
This commit is contained in:
yuanbo
2022-06-15 19:04:29 +08:00
parent 9dbbf80009
commit 73d7cc8443
42 changed files with 330 additions and 388 deletions
+3 -4
View File
@@ -14,8 +14,7 @@
import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
module_group(module_name) {
if (defined(LOSCFG_SOC_SERIES_STM32F4xx)) {
modules = [ "niobe407" ]
}
if (defined(LOSCFG_SOC_SERIES_STM32F4xx)) {
modules = [ "niobe407" ]
}
}
+21 -23
View File
@@ -12,29 +12,27 @@
# limitations under the License.
if (ohos_kernel_type == "liteos_m") {
import("//build/lite/config/component/lite_component.gni")
import("//build/lite/config/subsystem/lite_subsystem.gni")
import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
module_group(module_name) {
modules = [
"liteos_m",
"applications",
]
}
import("//build/lite/config/component/lite_component.gni")
import("//build/lite/config/subsystem/lite_subsystem.gni")
import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
module_group(module_name) {
modules = [
"liteos_m",
"applications",
]
}
group("process_after_build") {
deps = [
":pack_all_in_one",
]
}
group("process_after_build") {
deps = [ ":pack_all_in_one" ]
}
build_ext_component("pack_all_in_one") {
exec_path = rebase_path(".", root_build_dir)
command = "sh pack_tools/pack_all_in_one.sh"
deps = [
"//build/lite:ohos",
"//kernel/liteos_m:build_kernel_image",
]
}
build_ext_component("pack_all_in_one") {
exec_path = rebase_path(".", root_build_dir)
command = "sh pack_tools/pack_all_in_one.sh"
deps = [
"//build/lite:ohos",
"//kernel/liteos_m:build_kernel_image",
]
}
}
@@ -15,7 +15,5 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"hello_world.c"
]
sources = [ "hello_world.c" ]
}
@@ -14,11 +14,7 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"os_thread_example.c"
]
sources = [ "os_thread_example.c" ]
include_dirs = [
"//third_party/cmsis/CMSIS/RTOS2/Include"
]
include_dirs = [ "//third_party/cmsis/CMSIS/RTOS2/Include" ]
}
@@ -15,11 +15,7 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"os_timer_example.c"
]
sources = [ "os_timer_example.c" ]
include_dirs = [
"//third_party/cmsis/CMSIS/RTOS2/Include"
]
include_dirs = [ "//third_party/cmsis/CMSIS/RTOS2/Include" ]
}
@@ -14,11 +14,7 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"os_event_example.c",
]
sources = [ "os_event_example.c" ]
include_dirs = [
"//third_party/cmsis/CMSIS/RTOS2/Include"
]
include_dirs = [ "//third_party/cmsis/CMSIS/RTOS2/Include" ]
}
@@ -15,11 +15,7 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"os_mutex_example.c"
]
include_dirs = [
"//third_party/cmsis/CMSIS/RTOS2/Include"
]
sources = [ "os_mutex_example.c" ]
include_dirs = [ "//third_party/cmsis/CMSIS/RTOS2/Include" ]
}
@@ -14,11 +14,7 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"os_semp_example.c"
]
include_dirs = [
"//third_party/cmsis/CMSIS/RTOS2/Include"
]
sources = [ "os_semp_example.c" ]
include_dirs = [ "//third_party/cmsis/CMSIS/RTOS2/Include" ]
}
@@ -14,11 +14,7 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"os_message_example.c"
]
include_dirs = [
"//third_party/cmsis/CMSIS/RTOS2/Include"
]
sources = [ "os_message_example.c" ]
include_dirs = [ "//third_party/cmsis/CMSIS/RTOS2/Include" ]
}
@@ -15,8 +15,8 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources =[
"adc_temperature.c",
"adc_temperature_use_example.c",
]
sources = [
"adc_temperature.c",
"adc_temperature_use_example.c",
]
}
@@ -15,8 +15,8 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources =[
"can_example.c",
"can_init.c",
]
sources = [
"can_example.c",
"can_init.c",
]
}
+12 -12
View File
@@ -13,19 +13,19 @@
import("//kernel/liteos_m/liteos.gni")
assert(defined(LOSCFG_DRIVERS_HDF_PLATFORM_GPIO), "Must Config LOSCFG_DRIVERS_HDF_PLATFORM_GPIO in kernel/liteos_m menuconfig!")
assert(
defined(LOSCFG_DRIVERS_HDF_PLATFORM_GPIO),
"Must Config LOSCFG_DRIVERS_HDF_PLATFORM_GPIO in kernel/liteos_m menuconfig!")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources =[
"hdf_gpio_test.c",
]
include_dirs = [
".",
"//drivers/framework/include/platform",
"//drivers/framework/include/utils",
"//drivers/adapter/khdf/liteos_m/osal/include",
"//drivers/framework/include/osal",
]
sources = [ "hdf_gpio_test.c" ]
include_dirs = [
".",
"//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",
]
}
@@ -13,19 +13,19 @@
import("//kernel/liteos_m/liteos.gni")
assert(defined(LOSCFG_DRIVERS_HDF_PLATFORM_SPI), "Must Config LOSCFG_DRIVERS_HDF_PLATFORM_SPI in kernel/liteos_m menuconfig!")
assert(
defined(LOSCFG_DRIVERS_HDF_PLATFORM_SPI),
"Must Config LOSCFG_DRIVERS_HDF_PLATFORM_SPI in kernel/liteos_m menuconfig!")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources =[
"hdf_spi_test.c",
]
include_dirs = [
".",
"//drivers/framework/include/platform",
"//drivers/framework/include/utils",
"//drivers/adapter/khdf/liteos_m/osal/include",
"//drivers/framework/include/osal",
]
sources = [ "hdf_spi_test.c" ]
include_dirs = [
".",
"//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",
]
}
+12 -12
View File
@@ -13,19 +13,19 @@
import("//kernel/liteos_m/liteos.gni")
assert(defined(LOSCFG_DRIVERS_HDF_PLATFORM_UART), "Must Config LOSCFG_DRIVERS_HDF_PLATFORM_UART in kernel/liteos_m menuconfig!")
assert(
defined(LOSCFG_DRIVERS_HDF_PLATFORM_UART),
"Must Config LOSCFG_DRIVERS_HDF_PLATFORM_UART in kernel/liteos_m menuconfig!")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources =[
"hdf_usart_test.c",
]
include_dirs = [
".",
"//drivers/framework/include/platform",
"//drivers/framework/include/utils",
"//drivers/adapter/khdf/liteos_m/osal/include",
"//drivers/framework/include/osal",
]
sources = [ "hdf_usart_test.c" ]
include_dirs = [
".",
"//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",
]
}
+12 -12
View File
@@ -12,18 +12,18 @@
# limitations under the License.
import("//kernel/liteos_m/liteos.gni")
assert(defined(LOSCFG_DRIVERS_HDF_PLATFORM_I2C), "Must Config LOSCFG_DRIVERS_HDF_PLATFORM_I2C in kernel/liteos_m menuconfig!")
assert(
defined(LOSCFG_DRIVERS_HDF_PLATFORM_I2C),
"Must Config LOSCFG_DRIVERS_HDF_PLATFORM_I2C in kernel/liteos_m menuconfig!")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources =[
"hdf_i2c_test.c",
]
include_dirs = [
".",
"//drivers/framework/include/platform",
"//drivers/framework/include/utils",
"//drivers/adapter/khdf/liteos_m/osal/include",
"//drivers/framework/include/osal",
]
sources = [ "hdf_i2c_test.c" ]
include_dirs = [
".",
"//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",
]
}
+12 -12
View File
@@ -13,18 +13,18 @@
import("//kernel/liteos_m/liteos.gni")
assert(defined(LOSCFG_DRIVERS_HDF_PLATFORM_WATCHDOG), "Must Config LOSCFG_DRIVERS_HDF_PLATFORM_WATCHDOG in kernel/liteos_m menuconfig!")
assert(
defined(LOSCFG_DRIVERS_HDF_PLATFORM_WATCHDOG),
"Must Config LOSCFG_DRIVERS_HDF_PLATFORM_WATCHDOG in kernel/liteos_m menuconfig!")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources =[
"hdf_watchdog_test.c",
]
include_dirs = [
".",
"//drivers/framework/include/platform",
"//drivers/framework/include/utils",
"//drivers/adapter/khdf/liteos_m/osal/include",
"//drivers/framework/include/osal",
]
sources = [ "hdf_watchdog_test.c" ]
include_dirs = [
".",
"//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",
]
}
+12 -12
View File
@@ -13,19 +13,19 @@
import("//kernel/liteos_m/liteos.gni")
assert(defined(LOSCFG_DRIVERS_HDF_PLATFORM_PWM), "Must Config LOSCFG_DRIVERS_HDF_PLATFORM_PWM in kernel/liteos_m menuconfig!")
assert(
defined(LOSCFG_DRIVERS_HDF_PLATFORM_PWM),
"Must Config LOSCFG_DRIVERS_HDF_PLATFORM_PWM in kernel/liteos_m menuconfig!")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources =[
"hdf_pwm_test.c",
]
include_dirs = [
".",
"//drivers/framework/include/platform",
"//drivers/framework/include/utils",
"//drivers/adapter/khdf/liteos_m/osal/include",
"//drivers/framework/include/osal",
]
sources = [ "hdf_pwm_test.c" ]
include_dirs = [
".",
"//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",
]
}
@@ -13,11 +13,10 @@
import("//kernel/liteos_m/liteos.gni")
assert(defined(LOSCFG_NET_LWIP), "Must Config LOSCFG_NET_LWIP in kernel/liteos_m menuconfig!")
assert(defined(LOSCFG_NET_LWIP),
"Must Config LOSCFG_NET_LWIP in kernel/liteos_m menuconfig!")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"tcp_client.c",
]
}
sources = [ "tcp_client.c" ]
}
@@ -12,11 +12,10 @@
# limitations under the License.
import("//kernel/liteos_m/liteos.gni")
assert(defined(LOSCFG_NET_LWIP), "Must Config LOSCFG_NET_LWIP in kernel/liteos_m menuconfig!")
assert(defined(LOSCFG_NET_LWIP),
"Must Config LOSCFG_NET_LWIP in kernel/liteos_m menuconfig!")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"tcp_server.c",
]
}
sources = [ "tcp_server.c" ]
}
@@ -13,11 +13,10 @@
import("//kernel/liteos_m/liteos.gni")
assert(defined(LOSCFG_NET_LWIP), "Must Config LOSCFG_NET_LWIP in kernel/liteos_m menuconfig!")
assert(defined(LOSCFG_NET_LWIP),
"Must Config LOSCFG_NET_LWIP in kernel/liteos_m menuconfig!")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"udp_test.c",
]
}
sources = [ "udp_test.c" ]
}
@@ -13,11 +13,10 @@
import("//kernel/liteos_m/liteos.gni")
assert(defined(LOSCFG_NET_LWIP), "Must Config LOSCFG_NET_LWIP in kernel/liteos_m menuconfig!")
assert(defined(LOSCFG_NET_LWIP),
"Must Config LOSCFG_NET_LWIP in kernel/liteos_m menuconfig!")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"iperf_test.c",
]
}
sources = [ "iperf_test.c" ]
}
@@ -12,11 +12,10 @@
# limitations under the License.
import("//kernel/liteos_m/liteos.gni")
assert(defined(LOSCFG_FS_LITTLEFS), "Must Config LOSCFG_FS_LITTLEFS in kernel/liteos_m menuconfig!")
assert(defined(LOSCFG_FS_LITTLEFS),
"Must Config LOSCFG_FS_LITTLEFS in kernel/liteos_m menuconfig!")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"kv_store_test.c",
]
}
sources = [ "kv_store_test.c" ]
}
@@ -12,11 +12,11 @@
# limitations under the License.
import("//kernel/liteos_m/liteos.gni")
assert(defined(LOSCFG_FS_LITTLEFS) && defined(LOSCFG_DRIVERS_HDF_PLATFORM_SPI), "Must Config LOSCFG_FS_LITTLEFS and LOSCFG_DRIVERS_HDF_PLATFORM_SPI in kernel/liteos_m menuconfig!")
assert(
defined(LOSCFG_FS_LITTLEFS) && defined(LOSCFG_DRIVERS_HDF_PLATFORM_SPI),
"Must Config LOSCFG_FS_LITTLEFS and LOSCFG_DRIVERS_HDF_PLATFORM_SPI in kernel/liteos_m menuconfig!")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"fs_test.c",
]
}
sources = [ "fs_test.c" ]
}
@@ -14,7 +14,5 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"ccmram_use_example.c",
]
}
sources = [ "ccmram_use_example.c" ]
}
+3 -5
View File
@@ -16,13 +16,11 @@ if (ohos_kernel_type == "liteos_m") {
module_name = get_path_info(rebase_path("."), "name")
module_group(module_name) {
modules = []
if (defined(LOSCFG_USE_TALKWEB_APPLICATION)){
if (defined(LOSCFG_USE_TALKWEB_APPLICATION)) {
modules += [ LOSCFG_NIOBE407_APPLICATION_NAME ]
}
else
{
} else {
#Add application dir name in [ ],if you want to write yourself application.
modules += [ ]
modules += []
}
}
}
+9 -9
View File
@@ -15,13 +15,13 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
module_group(module_name) {
modules = [
"bsp",
"drivers",
"fs",
"lwip_adapter",
"hdf_config",
"bootloader",
"tools"
]
modules = [
"bsp",
"drivers",
"fs",
"lwip_adapter",
"hdf_config",
"bootloader",
"tools",
]
}
+5 -5
View File
@@ -15,11 +15,11 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
module_group(module_name) {
modules = []
deps = [ ":build_bootloader_bin" ]
modules = []
deps = [ ":build_bootloader_bin" ]
}
build_ext_component("build_bootloader_bin") {
exec_path = rebase_path(".", root_build_dir)
command = "make"
}
exec_path = rebase_path(".", root_build_dir)
command = "make"
}
+67 -69
View File
@@ -15,80 +15,78 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"startup/startup_stm32f407xx.s",
]
sources = [ "startup/startup_stm32f407xx.s" ]
sources += [
"src/sys_service_config.c",
"src/run_sys_before.c",
"src/dprintf.c",
"src/main.c",
"src/ohos_main.c",
"src/system_stm32f4xx.c"
]
sources += [
"src/dprintf.c",
"src/main.c",
"src/ohos_main.c",
"src/run_sys_before.c",
"src/sys_service_config.c",
"src/system_stm32f4xx.c",
]
include_dirs = [
"include",
"../test",
"../fs",
"../drivers/watch_dog/include"
]
include_dirs = [
"include",
"../test",
"../fs",
"../drivers/watch_dog/include",
]
include_dirs += [
"//base/hiviewdfx/hiview_lite",
"//base/hiviewdfx/hilog_lite/frameworks/mini",
"//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite",
]
include_dirs += [
"//base/hiviewdfx/hiview_lite",
"//base/hiviewdfx/hilog_lite/frameworks/mini",
"//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite",
]
}
config("public") {
include_dirs = [
".",
"include",
"//device/soc/st/stm32f4xx/sdk/Core/Inc",
"//device/soc/st/stm32f4xx/sdk/Drivers/STM32F4xx_HAL_Driver/Inc",
"//device/soc/st/stm32f4xx/sdk/Drivers/CMSIS/Device/ST/STM32F4xx/Include",
"//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr",
"//drivers/framework/core/common/include/manager",
]
ldflags = [
"-Wl,-T" + rebase_path("ld/STM32F407IGTx_FLASH.ld"),
"-Wl,-u_printf_float",
include_dirs = [
".",
"include",
"//device/soc/st/stm32f4xx/sdk/Core/Inc",
"//device/soc/st/stm32f4xx/sdk/Drivers/STM32F4xx_HAL_Driver/Inc",
"//device/soc/st/stm32f4xx/sdk/Drivers/CMSIS/Device/ST/STM32F4xx/Include",
"//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr",
"//drivers/hdf_core/framework/core/common/include/manager",
]
ldflags = [
"-Wl,-T" + rebase_path("ld/STM32F407IGTx_FLASH.ld"),
"-Wl,-u_printf_float",
]
if (build_xts) {
lib_dirs = [ "$root_out_dir/libs" ]
ldflags += [
"-Wl,--whole-archive",
"-lbootstrap",
"-lbroadcast",
"-lhctest",
#公共基础库
# "-lmodule_ActsUtilsFileTest",
# "-lmodule_ActsKvStoreTest",
#DFX
"-lmodule_ActsDfxFuncTest",
"-lmodule_ActsHieventLiteTest",
#启动恢复
# "-lmodule_ActsBootstrapTest",
# "-lmodule_ActsParameterTest",
#分布式任务调度
# "-lmodule_ActsSamgrTest",
"-Wl,--no-whole-archive",
]
}
if (build_xts) {
lib_dirs = [ "$root_out_dir/libs" ]
ldflags += [
"-Wl,--whole-archive",
"-lbootstrap",
"-lbroadcast",
"-lhctest",
#公共基础库
# "-lmodule_ActsUtilsFileTest",
# "-lmodule_ActsKvStoreTest",
#DFX
"-lmodule_ActsDfxFuncTest",
"-lmodule_ActsHieventLiteTest",
#启动恢复
# "-lmodule_ActsBootstrapTest",
# "-lmodule_ActsParameterTest",
#分布式任务调度
# "-lmodule_ActsSamgrTest",
"-Wl,--no-whole-archive",
]
}
libs = [
"c",
"m",
"nosys",
]
}
libs = [
"c",
"m",
"nosys",
]
}
+29 -28
View File
@@ -41,48 +41,49 @@ board_toolchain_type = "gcc"
#Debug compiler optimization level options
board_opt_flags = [
"-mcpu=cortex-m4",
"-mthumb",
"-mfpu=fpv4-sp-d16",
"-mfloat-abi=hard",
"-mcpu=cortex-m4",
"-mthumb",
"-mfpu=fpv4-sp-d16",
"-mfloat-abi=hard",
]
# Board related common compile flags.
board_cflags = [
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-DUSE_HAL_DRIVER",
"-DSTM32F407xx",
"-DUSE_FULL_LL_DRIVER",
# "-MMD",
# "-MP",
# "-MF\"$(@:%.o=%.d)\"",
"-D__LITEOS_M__",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-DUSE_HAL_DRIVER",
"-DSTM32F407xx",
"-DUSE_FULL_LL_DRIVER",
# "-MMD",
# "-MP",
# "-MF\"$(@:%.o=%.d)\"",
"-D__LITEOS_M__",
]
board_cflags += board_opt_flags
board_asmflags = [
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-Og",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
]
board_asmflags += board_opt_flags
board_cxx_flags = board_cflags
board_ld_flags = [
"--specs=nano.specs",
"-Wl,--gc-sections",
"-Wl,--wrap=_calloc_r",
"-Wl,--wrap=_malloc_r",
"-Wl,--wrap=_realloc_r",
"-Wl,--wrap=_reallocf_r",
"-Wl,--wrap=_free_r",
"-Wl,--wrap=_memalign_r",
"-Wl,--wrap=_malloc_usable_size_r",
"--specs=nano.specs",
"-Wl,--gc-sections",
"-Wl,--wrap=_calloc_r",
"-Wl,--wrap=_malloc_r",
"-Wl,--wrap=_realloc_r",
"-Wl,--wrap=_reallocf_r",
"-Wl,--wrap=_free_r",
"-Wl,--wrap=_memalign_r",
"-Wl,--wrap=_malloc_usable_size_r",
]
board_ld_flags += board_opt_flags
+10 -10
View File
@@ -15,14 +15,14 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
module_group(module_name) {
modules = [
"watch_dog",
"uart",
"spi_flash",
"gpio",
"exit",
"spi",
"usart",
"hdf_base_hal",
]
modules = [
"watch_dog",
"uart",
"spi_flash",
"gpio",
"exit",
"spi",
"usart",
"hdf_base_hal",
]
}
+2 -4
View File
@@ -15,11 +15,9 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"src/hal_exti.c",
]
sources = [ "src/hal_exti.c" ]
}
config("public") {
include_dirs = [ "include" ]
include_dirs = [ "include" ]
}
+3 -5
View File
@@ -15,11 +15,9 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"src/hal_gpio.c",
]
sources = [ "src/hal_gpio.c" ]
}
config("public") {
include_dirs = [ "include" ]
}
include_dirs = [ "include" ]
}
+11 -13
View File
@@ -15,20 +15,18 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
if (defined(LOSCFG_DRIVERS_HDF_PLATFORM)) {
sources = [
"src/hdf_base_hal.c",
]
} else {
sources = []
}
if (defined(LOSCFG_DRIVERS_HDF_PLATFORM)) {
sources = [ "src/hdf_base_hal.c" ]
} else {
sources = []
}
}
config("public") {
include_dirs = [
"include",
"//drivers/framework/include/utils",
"//drivers/adapter/khdf/liteos_m/osal/include",
"//drivers/framework/include/utils/",
]
include_dirs = [
"include",
"//drivers/hdf_core/framework/include/utils",
"//drivers/hdf_core/adapter/khdf/liteos_m/osal/include",
"//drivers/hdf_core/framework/include/utils/",
]
}
+2 -4
View File
@@ -15,11 +15,9 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"src/hal_spi.c",
]
sources = [ "src/hal_spi.c" ]
}
config("public") {
include_dirs = [ "include" ]
include_dirs = [ "include" ]
}
+3 -7
View File
@@ -15,11 +15,7 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"src/w25qxx.c",
]
sources = [ "src/w25qxx.c" ]
include_dirs = [
"include",
]
}
include_dirs = [ "include" ]
}
+12 -14
View File
@@ -15,20 +15,18 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"src/uart.c",
]
sources = [ "src/uart.c" ]
}
config("public") {
include_dirs = [ "include" ]
if (defined(LOSCFG_DRIVERS_HDF_PLATFORM_UART)) {
include_dirs += [
".",
"//drivers/framework/include/platform",
"//drivers/framework/include/utils",
"//drivers/adapter/khdf/liteos_m/osal/include",
"//drivers/framework/include/osal",
]
}
}
include_dirs = [ "include" ]
if (defined(LOSCFG_DRIVERS_HDF_PLATFORM_UART)) {
include_dirs += [
".",
"//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",
]
}
}
+3 -5
View File
@@ -15,11 +15,9 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"src/hal_usart.c",
]
sources = [ "src/hal_usart.c" ]
}
config("public") {
include_dirs = [ "include" ]
}
include_dirs = [ "include" ]
}
+6 -6
View File
@@ -15,12 +15,12 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"src/watch_dog.c",
"src/hal_watchdog.c",
]
sources = [
"src/hal_watchdog.c",
"src/watch_dog.c",
]
}
config("public") {
include_dirs = [ "include" ]
}
include_dirs = [ "include" ]
}
+6 -9
View File
@@ -15,12 +15,9 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
module_group(module_name) {
if (defined(LOSCFG_DRIVERS_HDF_PLATFORM_SPI)) {
modules = [
"littlefs"
]
} else {
modules = [
]
}
}
if (defined(LOSCFG_DRIVERS_HDF_PLATFORM_SPI)) {
modules = [ "littlefs" ]
} else {
modules = []
}
}
+6 -6
View File
@@ -31,12 +31,12 @@ config("public") {
if (defined(LOSCFG_FS_LITTLEFS) && defined(LOSCFG_DRIVERS_HDF_PLATFORM_SPI)) {
include_dirs = [
"include",
"//drivers/framework/include/platform",
"//drivers/framework/include/utils",
"//drivers/adapter/khdf/liteos_m/osal/include",
"//drivers/framework/include/osal",
"//drivers/framework/include/core",
"//drivers/framework/core/common/include/host",
"//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/include/core",
"//drivers/hdf_core/framework/core/common/include/host",
]
}
}
+1 -1
View File
@@ -12,7 +12,7 @@
# limitations under the License.
if (ohos_kernel_type == "liteos_m") {
import("//drivers/adapter/khdf/liteos_m/hdf.gni")
import("//drivers/hdf_core/adapter/khdf/liteos_m/hdf.gni")
module_switch = defined(LOSCFG_NIOBE407_USE_HDF)
macro_switch = defined(LOSCFG_DRIVERS_HDF_CONFIG_MACRO)
module_name = get_path_info(rebase_path("."), "name")
+5 -5
View File
@@ -15,11 +15,11 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
module_group(module_name) {
modules = []
deps = [ ":build_merge_bin" ]
modules = []
deps = [ ":build_merge_bin" ]
}
build_ext_component("build_merge_bin") {
exec_path = rebase_path("./merge_bin", root_build_dir)
command = "make"
}
exec_path = rebase_path("./merge_bin", root_build_dir)
command = "make"
}