diff --git a/BUILD.gn b/BUILD.gn index b9866ec..96f4747 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -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" ] + } } - diff --git a/niobe407/BUILD.gn b/niobe407/BUILD.gn index 36f14f9..8ac86a3 100644 --- a/niobe407/BUILD.gn +++ b/niobe407/BUILD.gn @@ -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", + ] + } } diff --git a/niobe407/applications/001_system_helloworld/BUILD.gn b/niobe407/applications/001_system_helloworld/BUILD.gn index e629fe2..6fc6ec2 100644 --- a/niobe407/applications/001_system_helloworld/BUILD.gn +++ b/niobe407/applications/001_system_helloworld/BUILD.gn @@ -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" ] } diff --git a/niobe407/applications/002_system_thread/BUILD.gn b/niobe407/applications/002_system_thread/BUILD.gn index 28810ec..907dd47 100644 --- a/niobe407/applications/002_system_thread/BUILD.gn +++ b/niobe407/applications/002_system_thread/BUILD.gn @@ -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" ] } diff --git a/niobe407/applications/003_system_timer/BUILD.gn b/niobe407/applications/003_system_timer/BUILD.gn index 8caab5c..b01968c 100644 --- a/niobe407/applications/003_system_timer/BUILD.gn +++ b/niobe407/applications/003_system_timer/BUILD.gn @@ -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" ] } diff --git a/niobe407/applications/004_system_event/BUILD.gn b/niobe407/applications/004_system_event/BUILD.gn index d7d8ce8..05a6760 100644 --- a/niobe407/applications/004_system_event/BUILD.gn +++ b/niobe407/applications/004_system_event/BUILD.gn @@ -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" ] } diff --git a/niobe407/applications/005_system_mutex/BUILD.gn b/niobe407/applications/005_system_mutex/BUILD.gn index fd87847..a8b38db 100644 --- a/niobe407/applications/005_system_mutex/BUILD.gn +++ b/niobe407/applications/005_system_mutex/BUILD.gn @@ -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" ] } diff --git a/niobe407/applications/006_system_semp/BUILD.gn b/niobe407/applications/006_system_semp/BUILD.gn index fe054b6..9c72f3e 100644 --- a/niobe407/applications/006_system_semp/BUILD.gn +++ b/niobe407/applications/006_system_semp/BUILD.gn @@ -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" ] } diff --git a/niobe407/applications/007_system_message/BUILD.gn b/niobe407/applications/007_system_message/BUILD.gn index 19bfd5c..365ada4 100644 --- a/niobe407/applications/007_system_message/BUILD.gn +++ b/niobe407/applications/007_system_message/BUILD.gn @@ -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" ] } diff --git a/niobe407/applications/101_peripheral_adc_temperature/BUILD.gn b/niobe407/applications/101_peripheral_adc_temperature/BUILD.gn index 0aa3bbb..efb7959 100644 --- a/niobe407/applications/101_peripheral_adc_temperature/BUILD.gn +++ b/niobe407/applications/101_peripheral_adc_temperature/BUILD.gn @@ -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", + ] } diff --git a/niobe407/applications/103_peripheral_can_example/BUILD.gn b/niobe407/applications/103_peripheral_can_example/BUILD.gn index 7afdfe6..1db9718 100644 --- a/niobe407/applications/103_peripheral_can_example/BUILD.gn +++ b/niobe407/applications/103_peripheral_can_example/BUILD.gn @@ -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", + ] } diff --git a/niobe407/applications/201_hdf_gpio_key/BUILD.gn b/niobe407/applications/201_hdf_gpio_key/BUILD.gn index bd2b801..3228b9b 100644 --- a/niobe407/applications/201_hdf_gpio_key/BUILD.gn +++ b/niobe407/applications/201_hdf_gpio_key/BUILD.gn @@ -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", + ] } diff --git a/niobe407/applications/202_hdf_spi_flash/BUILD.gn b/niobe407/applications/202_hdf_spi_flash/BUILD.gn index eb78b88..29f64e6 100644 --- a/niobe407/applications/202_hdf_spi_flash/BUILD.gn +++ b/niobe407/applications/202_hdf_spi_flash/BUILD.gn @@ -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", + ] } diff --git a/niobe407/applications/203_hdf_usart/BUILD.gn b/niobe407/applications/203_hdf_usart/BUILD.gn index 17570c6..c99ceff 100644 --- a/niobe407/applications/203_hdf_usart/BUILD.gn +++ b/niobe407/applications/203_hdf_usart/BUILD.gn @@ -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", + ] } diff --git a/niobe407/applications/204_hdf_i2c/BUILD.gn b/niobe407/applications/204_hdf_i2c/BUILD.gn index 163a32d..63e67ca 100644 --- a/niobe407/applications/204_hdf_i2c/BUILD.gn +++ b/niobe407/applications/204_hdf_i2c/BUILD.gn @@ -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", + ] } diff --git a/niobe407/applications/205_hdf_watchdog/BUILD.gn b/niobe407/applications/205_hdf_watchdog/BUILD.gn index e8c5781..5ff4990 100644 --- a/niobe407/applications/205_hdf_watchdog/BUILD.gn +++ b/niobe407/applications/205_hdf_watchdog/BUILD.gn @@ -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", + ] } diff --git a/niobe407/applications/206_hdf_pwm/BUILD.gn b/niobe407/applications/206_hdf_pwm/BUILD.gn index a00375a..5bb0bdb 100644 --- a/niobe407/applications/206_hdf_pwm/BUILD.gn +++ b/niobe407/applications/206_hdf_pwm/BUILD.gn @@ -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", + ] } diff --git a/niobe407/applications/301_network_tcpclient/BUILD.gn b/niobe407/applications/301_network_tcpclient/BUILD.gn index 4b276dd..fa8b8c2 100644 --- a/niobe407/applications/301_network_tcpclient/BUILD.gn +++ b/niobe407/applications/301_network_tcpclient/BUILD.gn @@ -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", - ] -} \ No newline at end of file + sources = [ "tcp_client.c" ] +} diff --git a/niobe407/applications/302_network_tcpserver/BUILD.gn b/niobe407/applications/302_network_tcpserver/BUILD.gn index 3873702..1724056 100644 --- a/niobe407/applications/302_network_tcpserver/BUILD.gn +++ b/niobe407/applications/302_network_tcpserver/BUILD.gn @@ -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", - ] -} \ No newline at end of file + sources = [ "tcp_server.c" ] +} diff --git a/niobe407/applications/303_network_udptest/BUILD.gn b/niobe407/applications/303_network_udptest/BUILD.gn index 8bc2a18..c79fc5f 100644 --- a/niobe407/applications/303_network_udptest/BUILD.gn +++ b/niobe407/applications/303_network_udptest/BUILD.gn @@ -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", - ] -} \ No newline at end of file + sources = [ "udp_test.c" ] +} diff --git a/niobe407/applications/308_network_iperf_server/BUILD.gn b/niobe407/applications/308_network_iperf_server/BUILD.gn index 02713f7..6d47aae 100644 --- a/niobe407/applications/308_network_iperf_server/BUILD.gn +++ b/niobe407/applications/308_network_iperf_server/BUILD.gn @@ -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", - ] -} \ No newline at end of file + sources = [ "iperf_test.c" ] +} diff --git a/niobe407/applications/401_file_kv_store/BUILD.gn b/niobe407/applications/401_file_kv_store/BUILD.gn index c9a656f..b6e641f 100644 --- a/niobe407/applications/401_file_kv_store/BUILD.gn +++ b/niobe407/applications/401_file_kv_store/BUILD.gn @@ -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", - ] -} \ No newline at end of file + sources = [ "kv_store_test.c" ] +} diff --git a/niobe407/applications/402_file_fs_store/BUILD.gn b/niobe407/applications/402_file_fs_store/BUILD.gn index 46012e6..7126d9b 100755 --- a/niobe407/applications/402_file_fs_store/BUILD.gn +++ b/niobe407/applications/402_file_fs_store/BUILD.gn @@ -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", - ] -} \ No newline at end of file + sources = [ "fs_test.c" ] +} diff --git a/niobe407/applications/501_optimization_ccmram_use/BUILD.gn b/niobe407/applications/501_optimization_ccmram_use/BUILD.gn index 452c5f8..bedaf0f 100644 --- a/niobe407/applications/501_optimization_ccmram_use/BUILD.gn +++ b/niobe407/applications/501_optimization_ccmram_use/BUILD.gn @@ -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", - ] -} \ No newline at end of file + sources = [ "ccmram_use_example.c" ] +} diff --git a/niobe407/applications/BUILD.gn b/niobe407/applications/BUILD.gn index 5a32edb..aa0f3a3 100755 --- a/niobe407/applications/BUILD.gn +++ b/niobe407/applications/BUILD.gn @@ -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 += [] } } } diff --git a/niobe407/liteos_m/BUILD.gn b/niobe407/liteos_m/BUILD.gn index b88d52f..70fd962 100644 --- a/niobe407/liteos_m/BUILD.gn +++ b/niobe407/liteos_m/BUILD.gn @@ -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", + ] } diff --git a/niobe407/liteos_m/bootloader/BUILD.gn b/niobe407/liteos_m/bootloader/BUILD.gn index 2bcc183..dc22acb 100644 --- a/niobe407/liteos_m/bootloader/BUILD.gn +++ b/niobe407/liteos_m/bootloader/BUILD.gn @@ -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" -} \ No newline at end of file + exec_path = rebase_path(".", root_build_dir) + command = "make" +} diff --git a/niobe407/liteos_m/bsp/BUILD.gn b/niobe407/liteos_m/bsp/BUILD.gn index 57291ce..0c07637 100644 --- a/niobe407/liteos_m/bsp/BUILD.gn +++ b/niobe407/liteos_m/bsp/BUILD.gn @@ -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", - ] -} \ No newline at end of file + libs = [ + "c", + "m", + "nosys", + ] +} diff --git a/niobe407/liteos_m/config.gni b/niobe407/liteos_m/config.gni index e626743..51f4891 100644 --- a/niobe407/liteos_m/config.gni +++ b/niobe407/liteos_m/config.gni @@ -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 diff --git a/niobe407/liteos_m/drivers/BUILD.gn b/niobe407/liteos_m/drivers/BUILD.gn index cfe3dd7..17d5ce8 100644 --- a/niobe407/liteos_m/drivers/BUILD.gn +++ b/niobe407/liteos_m/drivers/BUILD.gn @@ -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", + ] } diff --git a/niobe407/liteos_m/drivers/exit/BUILD.gn b/niobe407/liteos_m/drivers/exit/BUILD.gn index efd973f..7b5aaae 100644 --- a/niobe407/liteos_m/drivers/exit/BUILD.gn +++ b/niobe407/liteos_m/drivers/exit/BUILD.gn @@ -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" ] } diff --git a/niobe407/liteos_m/drivers/gpio/BUILD.gn b/niobe407/liteos_m/drivers/gpio/BUILD.gn index e7d3f34..85a6857 100644 --- a/niobe407/liteos_m/drivers/gpio/BUILD.gn +++ b/niobe407/liteos_m/drivers/gpio/BUILD.gn @@ -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" ] -} \ No newline at end of file + include_dirs = [ "include" ] +} diff --git a/niobe407/liteos_m/drivers/hdf_base_hal/BUILD.gn b/niobe407/liteos_m/drivers/hdf_base_hal/BUILD.gn index badb220..cdd6753 100644 --- a/niobe407/liteos_m/drivers/hdf_base_hal/BUILD.gn +++ b/niobe407/liteos_m/drivers/hdf_base_hal/BUILD.gn @@ -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/", + ] } diff --git a/niobe407/liteos_m/drivers/spi/BUILD.gn b/niobe407/liteos_m/drivers/spi/BUILD.gn index ef6467a..0877699 100644 --- a/niobe407/liteos_m/drivers/spi/BUILD.gn +++ b/niobe407/liteos_m/drivers/spi/BUILD.gn @@ -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" ] } diff --git a/niobe407/liteos_m/drivers/spi_flash/BUILD.gn b/niobe407/liteos_m/drivers/spi_flash/BUILD.gn index 01b07a5..88d9fd2 100644 --- a/niobe407/liteos_m/drivers/spi_flash/BUILD.gn +++ b/niobe407/liteos_m/drivers/spi_flash/BUILD.gn @@ -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", - ] -} \ No newline at end of file + include_dirs = [ "include" ] +} diff --git a/niobe407/liteos_m/drivers/uart/BUILD.gn b/niobe407/liteos_m/drivers/uart/BUILD.gn index 2d9ffa7..c3e9eae 100644 --- a/niobe407/liteos_m/drivers/uart/BUILD.gn +++ b/niobe407/liteos_m/drivers/uart/BUILD.gn @@ -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", - ] - } -} \ No newline at end of file + 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", + ] + } +} diff --git a/niobe407/liteos_m/drivers/usart/BUILD.gn b/niobe407/liteos_m/drivers/usart/BUILD.gn index 801c7a5..ccd773f 100755 --- a/niobe407/liteos_m/drivers/usart/BUILD.gn +++ b/niobe407/liteos_m/drivers/usart/BUILD.gn @@ -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" ] -} \ No newline at end of file + include_dirs = [ "include" ] +} diff --git a/niobe407/liteos_m/drivers/watch_dog/BUILD.gn b/niobe407/liteos_m/drivers/watch_dog/BUILD.gn index 289793c..64b5a76 100644 --- a/niobe407/liteos_m/drivers/watch_dog/BUILD.gn +++ b/niobe407/liteos_m/drivers/watch_dog/BUILD.gn @@ -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" ] -} \ No newline at end of file + include_dirs = [ "include" ] +} diff --git a/niobe407/liteos_m/fs/BUILD.gn b/niobe407/liteos_m/fs/BUILD.gn index ca58842..79c739c 100644 --- a/niobe407/liteos_m/fs/BUILD.gn +++ b/niobe407/liteos_m/fs/BUILD.gn @@ -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 = [ - ] - } -} \ No newline at end of file + if (defined(LOSCFG_DRIVERS_HDF_PLATFORM_SPI)) { + modules = [ "littlefs" ] + } else { + modules = [] + } +} diff --git a/niobe407/liteos_m/fs/littlefs/BUILD.gn b/niobe407/liteos_m/fs/littlefs/BUILD.gn index fc19a52..70709b4 100644 --- a/niobe407/liteos_m/fs/littlefs/BUILD.gn +++ b/niobe407/liteos_m/fs/littlefs/BUILD.gn @@ -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", ] } } diff --git a/niobe407/liteos_m/hdf_config/BUILD.gn b/niobe407/liteos_m/hdf_config/BUILD.gn index 3975d9e..cf3dba5 100644 --- a/niobe407/liteos_m/hdf_config/BUILD.gn +++ b/niobe407/liteos_m/hdf_config/BUILD.gn @@ -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") diff --git a/niobe407/liteos_m/tools/BUILD.gn b/niobe407/liteos_m/tools/BUILD.gn index a5fcb23..7ac709b 100644 --- a/niobe407/liteos_m/tools/BUILD.gn +++ b/niobe407/liteos_m/tools/BUILD.gn @@ -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" -} \ No newline at end of file + exec_path = rebase_path("./merge_bin", root_build_dir) + command = "make" +}