diff --git a/.gitignore b/.gitignore index 4721cdf..584aa04 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,4 @@ mfgtool/lzma/elzma mfgtool/oem_tool/oem_tool mfgtool/*.o out/ +src_files.txt diff --git a/BUILD.gn b/BUILD.gn index 133c05c..e1f23db 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -38,9 +38,9 @@ module_group(module_name) { "common", "os", "plc", - "ftm", + # "ftm", "pib", "cli", - "import" + # "import" ] } \ No newline at end of file diff --git a/ap/BUILD.gn b/ap/BUILD.gn index c2c3ca0..52dc6f7 100644 --- a/ap/BUILD.gn +++ b/ap/BUILD.gn @@ -13,17 +13,8 @@ import("//build/buildcfg.gni") module_name = get_path_info(rebase_path("."), "name") kernel_module(module_name) { - sources = [ - "src/main.c", - ] - - include_dirs = [ - "include", - "../fs/littlefs/include", - ] - - - + sources = [] + include_dirs = [] } config("public") { diff --git a/app/BUILD.gn b/app/BUILD.gn index 6eb9162..497f278 100644 --- a/app/BUILD.gn +++ b/app/BUILD.gn @@ -11,15 +11,9 @@ import("//build/buildcfg.gni") -module_name = get_path_info(rebase_path("."), "name") -module_group(module_name) { - if (APP == "0") { - modules = [ - "smart_grid", - ] - } else if (APP == "15") { - modules = [ - "sniffer", - ] - } +module_name = "kl_sdk" + +kernel_module(module_name) { + sources=[] + include_dirs=[] } diff --git a/build/buildcfg.gni b/build/buildcfg.gni index 530e1ba..782602a 100644 --- a/build/buildcfg.gni +++ b/build/buildcfg.gni @@ -59,6 +59,13 @@ template("kernel_module") { public_configs += [ ":public" ] } } + # 自动把src_files.txt 中的文件添加进来 + src=exec_script("//build/python_scripts/read_files.py",[rebase_path("."),"src_files.txt","src"],"string") + source_list=string_split(src) + sources+=source_list + inc=exec_script("//build/python_scripts/read_files.py",[rebase_path("."),"src_files.txt","inc"],"string") + inc_list=string_split(inc) + include_dirs+=inc_list } } not_needed([ "auto_config" ]) diff --git a/build/makefile.cfg b/build/makefile.cfg index 02e1e8b..a3c466f 100644 --- a/build/makefile.cfg +++ b/build/makefile.cfg @@ -85,6 +85,7 @@ SRCS += $(EXT_SRC) OBJECTS = $(addprefix $(BIN_DIR)/, $(patsubst %.S, %.o, $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(SRCS))))) $(shell echo $(SRCS) > "src_files.txt") +$(shell echo $(ADD_INCLUDE) >> "src_files.txt") endif PLATFORM ?= FPGA diff --git a/build/python_scripts/read_files.py b/build/python_scripts/read_files.py new file mode 100755 index 0000000..7e210d4 --- /dev/null +++ b/build/python_scripts/read_files.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +import os +import sys + + +def read_srcs(base_dir:str,file_name:str,type:str="src"): + file_path=os.path.join(base_dir,file_name) + ret=[] + with open(file_path,mode='r',encoding='utf-8') as f: + d=f.read() + str_list=d.split() + for item in str_list: + if(type=="src"): + if(item.endswith(('.c','.S'))): + if(item[0]=='/'): + path=os.path.relpath(os.path.normpath(item),base_dir) + else: + path=os.path.normpath(item) + if not (path in ret): + ret.append(path) + elif(type=="inc"): + if not (item.endswith(('.c','.S'))): + if(item[0]=='/'): + path=os.path.relpath(os.path.normpath(item),base_dir) + else: + path=os.path.normpath(item) + if(os.path.exists(os.path.join(base_dir,path))): + if not (path in ret): + ret.append(path) + return ret + +if __name__ == "__main__": + ret=read_srcs(sys.argv[1],sys.argv[2],sys.argv[3]) + for item in ret: + print(item) diff --git a/cli/BUILD.gn b/cli/BUILD.gn index d6f8fb5..e21711d 100644 --- a/cli/BUILD.gn +++ b/cli/BUILD.gn @@ -14,50 +14,6 @@ import("//build/buildcfg.gni") module_name = "kl_sdk" kernel_module(module_name) { - sources = [ - "cli/iot_cli.c", - "communicator/communicator.c", - "communicator/iot_cli_tx_rx.c", - "communicator/cli_lwip_api.c", - "communicator/plc/iot_cli_bt_communicator.c", - "communicator/plc/iot_cli_plc_tx_rx.c", - "host_interface/iot_cli_flash_log.c", - "host_interface/iot_cli_dbg_log.c", - "host_interface/iot_cli_plc_mgr_alive.c", - "host_interface/iot_cli_ul_buf.c", - "host_interface/iot_cli_msg_entry.c", - "host_interface/iot_cli_basic_operation.c", - "host_interface/iot_cli_host_interface.c", - "host_interface/iot_cli_ram_operation.c", - "host_interface/iot_cli_oem.c", - "host_interface/iot_cli_host_pib.c", - "host_interface/plc/iot_cli_plc_nw.c", - "host_interface/plc/iot_cli_module_msg_entry.c", - "host_interface/plc/iot_cli_cco_upgrade.c", - "host_interface/plc/iot_cli_discovery.c", - "host_interface/plc/iot_cli_sg.c", - "host_interface/plc/iot_cli_plc_function.c", - "host_interface/plc/iot_cli_ada_dump.c", - "host_interface/plc/iot_cli_host_rate_test.c", - "host_interface/plc/iot_cli_ping.c", - "host_interface/plc/iot_cli_set_info.c", - "host_interface/plc/iot_cli_ckb.c", - "host_interface/plc/iot_cli_sta_upgrade.c", - "host_interface/plc/iot_cli_plc_module.c", - "host_interface/plc/iot_cli_mac_test.c", - "host_interface/plc/iot_cli_host_upgrade.c", - "host_interface/plc/iot_cli_hw_ver.c", - "host_interface/plc/iot_cli_tput.c", - "host_interface/plc/iot_cli_ckq.c", - ] - include_dirs = [ - "//cli/cli/inc", - "//cli/communicator", - "//cli/communicator/plc", - "//inc/host_interface", - "//inc/host_interface/plc", - "//app/tput", - "//import/lwip/lwip/src/include", - "//import/lwip/ports/include", - ] -} + sources=[] + include_dirs=[] +} \ No newline at end of file diff --git a/common/BUILD.gn b/common/BUILD.gn index a9a633b..fca4687 100644 --- a/common/BUILD.gn +++ b/common/BUILD.gn @@ -14,57 +14,6 @@ import("//build/buildcfg.gni") module_name = "kl_sdk" kernel_module(module_name) { - sources = [ - "app/src/iot_app.c", - "compiler/gcc/src/cpl_utils.c", - "io_lib/src/iot_printf.c", - "io_lib/src/iot_string.c", - "io_lib/src/iot_mem.c", - "io_lib/src/iot_strformat.c", - "io_lib/src/iot_sprintf.c", - "io_lib/src/iot_snprintf.c", - "os_shim/freertos/src/os_mem.c", - "os_shim/freertos/src/os_malloc.c", - "os_shim/freertos/src/os_lock.c", - "os_shim/freertos/src/os_event.c", - "os_shim/freertos/src/os_timer.c", - "os_shim/freertos/src/os_utils.c", - "os_shim/freertos/src/os_task.c", - "share_task/iot_share_task.c", - "socket/iot_socket_api.c", - "pkt/iot_pkt.c", - "utils/iot_mem_pool.c", - "utils/iot_frame_parse.c", - "utils/iot_queue.c", - # "utils/iot_version.c", - "utils/iot_crc.c", - "utils/iot_utils.c", - "utils/iot_bitmap.c", - "utils/iot_meter_addr_hash_table.c", - "utils/iot_sha1.c", - "utils/iot_ntoh.c", - "utils/iot_bitops.c", - "utils/iot_ringbuf.c", - "utils/iot_task.c", - "utils/iot_addr_hash_table.c", - # "utils/iot_hook.c", - "lzma/decomp.c", - "lzma/7zAlloc.c", - "lzma/LzmaTools.c", - "lzma/LzmaDec.c", - "dbglog/iot_dbglog.c", - "dbglog/plc/iot_plc_dbglog_module_entry.c", - "ipc/itc/src/iot_ipc.c", - "plc_lib/src/iot_plc_api.c", - "plc_lib/src/iot_plc_api_cco.c", - "plc_lib/src/iot_plc_api_sta.c", - "plc_lib/src/iot_plc_lib.c", - ] - include_dirs = [ - "//import/mbedtls/include", - "//common/lzma", - "//common/plc_lib/inc", - "//import/lwip/lwip/src/include", - "//import/lwip/ports/include", - ] + sources = [] + include_dirs = [] } diff --git a/driver/BUILD.gn b/driver/BUILD.gn index 945b097..fca4687 100644 --- a/driver/BUILD.gn +++ b/driver/BUILD.gn @@ -14,172 +14,6 @@ import("//build/buildcfg.gni") module_name = "kl_sdk" kernel_module(module_name) { - sources = [ - "src/hal/diag.c", - "src/hal/mailbox.c", - "src/hal/iot_spi.c", - "src/hal/iot_mic_array.c", - "src/hal/math_matrix.c", - "src/hal/iot_crypto_async.c", - "src/hal/nand_flash.c", - "src/hal/afft.c", - "src/hal/vfs_uart.c", - "src/hal/usb_dev.c", - "src/hal/iot_flash_layout.c", - "src/hal/spi_flash.c", - "src/hal/sd_card.c", - "src/hal/mtd.c", - "src/hal/iot_plc_hw_topo.c", - "src/hal/iot_plc_led_cus.c", - "src/hal/iot_plc_pm.c", - "src/hal/system.c", - "src/hal/irq.c", - "src/hal/iot_eth.c", - "src/hal/osif_uart.c", - "src/hal/board_info.c", - "src/hal/iot_plc_led.c", - "src/hal/i2s.c", - "src/hal/iot_crypto_share.c", - "src/hal/clock.c", - "src/hal/iot_crypto_mbedtls_lib.c", - "src/hal/iot_i2c_slave.c", - "src/hal/mtd_part.c", - "src/hal/osif_dma_uart.c", - "src/hal/iot_crypto.c", - "src/hal/flash.c", - "src/hal/iot_crypto_lock.c", - "src/hal/iot_plc_hw_tsfm.c", - "src/hal/iot_wdg.c", - "src/hal/nor_flash.c", - "src/hal/iot_uart_h.c", - "src/hal/iot_efuse.c", - "src/hal/iot_gpio.c", - "src/hal/iot_busmon.c", - "src/hal/iot_spinlock.c", - "src/hal/iot_gp_timer.c", - "src/hal/led.c", - "src/hal/iot_pwm.c", - "src/hal/dma_i2s.c", - "src/hal/dbg_msg_stash.c", - "src/hal/power_mgmt.c", - "src/hal/rtc.c", - "src/hal/iot_dma_hw.c", - "src/hal/iot_crypto_internal.c", - "src/hal/debug_uart.c", - "src/hal/dbg_msg_pop.c", - "src/hal/energe_meter.c", - "src/hal/upgrade.c", - "src/hal/adc.c", - "src/hal/i2c.c", - "src/hal/iot_dma_sw.c", - "src/hal/sram.c", - "src/hal/iot_plc_pm_cus.c", - "extern/em/src/iot_em_ext_chip_att.c", - "extern/em/src/iot_em_ext_calibration.c", - "extern/em/src/iot_em_ext.c", - "extern/htm/src/iot_htm_ext.c", - "extern/rtc/src/bl8025t_driver.c", - "extern/rtc/src/iot_rtc_ext.c", - "extern/rtc/src/simu_rtc_driver.c", - "extern/rtc/src/rx8010_driver.c", - "extern/rtc/src/m41t0_driver.c", - "extern/wk2xxx_uart/src/wk2xxx_uart.c", - "extern/gsm/src/iot_gsm_ext.c", - "extern/gsm/src/c20_gsm_driver.c", - "extern/ext-io/src/iot_gpio_ex_tca9534a.c", - "extern/ext-io/src/iot_gpio_ex_mcp23017.c", - "extern/ext-io/src/iot_gpio_ex_tpt29555.c", - "extern/ext-io/src/iot_gpio_ex_aw9523b.c", - "extern/ext-io/src/iot_gpio_ex.c", - "extern/bluetooth/src/iot_bt_ext.c", - "extern/bluetooth/src/iot_bt_ext_upgrade_img_mgr.c", - "extern/bluetooth/src/iot_bt_ext_upgrade.c", - "extern/bluetooth/src/iot_bt_ext_upgrade_img.c", - "extern/bluetooth/src/iot_bt_ext_dev_mgmt.c", - "extern/virtualchannel/vc_upgrade/vc_upgrade_driver.c", - "extern/virtualchannel/vc_upgrade/dev_table.c", - "extern/virtualchannel/vc_upgrade/vc_upgrade.c", - "extern/virtualchannel/src/vc_task.c", - "extern/virtualchannel/src/vp_uart.c", - "extern/virtualchannel/src/vc_proto.c", - ] - if (target == "kunlun3") { - sources += [ - "src/hw3/i2c_slv_hw.c", - "src/hw3/i2s_hw.c", - "src/hw3/dma_hw.c", - "src/hw3/clk.c", - "src/hw3/afft_hw.c", - "src/hw3/sha512_hw.c", - "src/hw3/smc.c", - "src/hw3/em_hw.c", - "src/hw3/apb.c", - "src/hw3/ndfc.c", - "src/hw3/topo_adc_adp.c", - "src/hw3/gp_timer.c", - "src/hw3/efuse.c", - "src/hw3/mtx_hw.c", - "src/hw3/dma_uart_hw.c", - "src/hw3/board_info_hw.c", - "src/hw3/mon_hw.c", - "src/hw3/intc.c", - "src/hw3/system_hw.c", - "src/hw3/ledc.c", - "src/hw3/dbg_msg_ring_hw.c", - "src/hw3/ahb.c", - "src/hw3/sfc.c", - "src/hw3/dev_spinlock.c", - "src/hw3/wdg.c", - "src/hw3/rom_patch_hw.c", - "src/hw3/uart_e.c", - "src/hw3/pmp.c", - "src/hw3/dwc_eth.c", - "src/hw3/ddrc.c", - "src/hw3/gpio_hw.c", - "src/hw3/cpu.c", - "src/hw3/pwm.c", - "src/hw3/sadc_pwm.c", - "src/hw3/ahb_busmon.c", - "src/hw3/ana.c", - "src/hw3/dma.c", - "src/hw3/dw_apb_ssi.c", - "src/hw3/sha256_hw.c", - "src/hw3/pmu.c", - "src/hw3/dma_sw.c", - "src/hw3/simd.c", - "src/hw3/sec_sys.c", - "src/hw3/pmp_hw.c", - "src/hw3/mailbox_hw.c", - "src/hw3/ada.c", - "src/hw3/power_mgmt_hw.c", - "src/hw3/sadc.c", - "src/hw3/rtc_hw.c", - "src/hw3/pll_cal.c", - "src/hw3/sec_glb.c", - "src/hw3/gpio_mtx.c", - "src/hw3/i2c_hw.c", - "src/hw3/mmon.c", - "src/hw3/snapshot.c", - "src/hw3/mbedtls/hardware_entropy_patch_alt.c", - "src/hw3/mbedtls/sha512_patch_alt.c", - "src/hw3/mbedtls/sha256_patch_alt.c", - "src/hw3/mbedtls/aes_patch_alt.c", - "src/hw3/mbedtls/bignum_patch_alt.c", - ] - } - include_dirs = [ - "//rom/riscv3/romlib/crypto/iotelic/inc", - "//rom/riscv3/romlib/crypto/iotelic/inc/mbedtls", - "//import/mbedtls/include", - "//import/mbedtls/include/psa", - "//driver/inc/mbedtls", - "//driver/extern/bluetooth/inc", - "//driver/extern/em/inc", - "//driver/extern/rtc/inc", - "//driver/extern/ext-io/inc", - "//driver/extern/gsm/inc", - "//driver/extern/wk2xxx_uart/inc", - "//driver/extern/htm/inc", - "//driver/extern/virtualchannel/inc", - ] + sources = [] + include_dirs = [] } diff --git a/ftm/BUILD.gn b/ftm/BUILD.gn index dd3a206..497f278 100644 --- a/ftm/BUILD.gn +++ b/ftm/BUILD.gn @@ -14,92 +14,6 @@ import("//build/buildcfg.gni") module_name = "kl_sdk" kernel_module(module_name) { - sources = [ - "src/iot_ftm_case.c", - "src/iot_ftm_cmd.c", - "src/iot_ftm.c", - "mp/iot_pt_func.c", - "mp/zero_cross_detec.c", - "mp/iot_pt_rf_func.c", - "mp/voltage_detec.c", - "mp/mp_mode.c", - "mp/cli/cli_rf_ic_tool.c", - "mp/cli/cli_plc_ic_tool.c", - "mp/cli/cli_ic_tool.c", - "cus/iot_ftm_cus_cmd.c", - "../bb_cpu/bb/bb_rf_tone_tbl.c", - "../bb_cpu/bb/bb_rf_hw_tbl.c", - "../bb_cpu/bb/bb_rf_cfg.c", - "../bb_cpu/bb/bb_init.c", - "../bb_cpu/common/rf_spi_api.c", - "../bb_cpu/common/bb_cpu_utils.c", - "../bb_cpu/common/bb_cpu_timer.c", - ] - include_dirs = [ - "//ftm/inc", - "//ftm/mp/cli", - "//ftm/mp/pt_board/inc", - "//bb_cpu/inc", - "//dtest/ate_test", - "//plc/inc", - "//plc/common/inc", - "//plc/halmac/inc", - "//plc/halmac/test/inc", - "//plc/halphy/inc", - "//plc/halphy/test/inc", - ] - if (target == "kunlun3") { - sources += [ - # "../bb_cpu/bb/v1/bb_rf_cfg.c", - # "../bb_cpu/bb/v1/bb_init.c", - "../dtest/dtest3/mac_rx_test/hal/hal_rx.c", - "../dtest/dtest3/mac_tx_test/hw3/hw_tx.c", - "../dtest/dtest3/mac_tx_test/hw3/tx_entry.c", - "../dtest/dtest3/mac_rx_test/hw3/rx_entry.c", - "../dtest/dtest3/mac_rx_test/hw3/hw_rx.c", - "../dtest/dtest3/mac_phy/rf_mac/rf_mac_rx.c", - "../dtest/dtest3/mac_phy/rf_mac/mac_ntb_wrap_test.c", - "../dtest/dtest3/mac_phy/rf_mac/rf_mac_tx.c", - "../dtest/dtest3/mac_phy/rf_mac/mac_zc_dtest.c", - "../dtest/dtest3/mac_phy/rf_mac/rf_bb_isr_test.c", - "../dtest/dtest3/mac_phy/rf_mac/rf_mac_isr_test.c", - "../dtest/dtest3/mac_phy/rf_mac/rf_mac_main.c", - "../dtest/dtest3/mac_phy/rf_mac/rf_bb_main.c", - "../dtest/dtest3/mac_phy/rf_phy/rf_phy_rx.c", - "../dtest/dtest3/mac_phy/rf_phy/rf_phy_tx.c", - "../dtest/dtest3/mac_phy/common/rf_mac_common.c", - ] - if (ftm_build == "1") { - sources += [ - "../dtest/dtest3/mac_phy/double_cpu/kl3_core0/kl3_core0_test.c", - ] - } - include_dirs += [ - "//plc/halmac/hw3/plc_inc/desc", - "//plc/halmac/hw3/plc_inc", - "//plc/halmac/hw3/rf_inc/desc", - "//plc/halmac/hw3/rf_inc", - "//plc/halmac/hw3/inc", - "//plc/halmac/hw3/inc/desc", - "//plc/halmac/hw_common_v1/inc", - "//plc/halphy/hw_common_v1/inc", - "//plc/halphy/hw3/plc/inc", - "//plc/halphy/hw3/rf/inc", - "//plc/halphy/hw3/plc/inc", - "//plc/halphy/hw3/rf/inc", - "//plc/halphy/hw3/inc", - "//plc/halphy/test/hw3/inc", - "//startup/riscv3/inc", - "//dtest/dtest3/mac_rx_test/hw3/inc", - "//dtest/dtest3/mac_tx_test/hw3/inc", - "//dtest/dtest3/mac_rx_test/hal/inc", - "//dtest/dtest3/mac_rx_test/inc", - "//dtest/dtest3/mac_tx_test/inc", - "//dtest/dtest3/mac_phy/inc", - "//dtest/dtest3/mac_phy/common", - "//dtest/dtest3/mac_phy/rf_mac/inc", - "//dtest/dtest3/mac_phy/rf_phy/inc", - "//dtest/dtest3/mac_phy/double_cpu/kl3_core0", - ] - } + sources=[] + include_dirs=[] } diff --git a/import/BUILD.gn b/import/BUILD.gn index 61e5e99..e21711d 100644 --- a/import/BUILD.gn +++ b/import/BUILD.gn @@ -14,36 +14,6 @@ import("//build/buildcfg.gni") module_name = "kl_sdk" kernel_module(module_name) { - sources = [ - "wq_vtb/src/bit.c", - "wq_vtb/src/conv_decode.c", - "wq_vtb/src/conv_encode.c", - "wq_vtb/src/convolutional.c", - "wq_vtb/src/crc_check.c", - "wq_vtb/src/crc_generator.c", - "wq_vtb/src/deinterleaver.c", - "wq_vtb/src/descrambler.c", - "wq_vtb/src/disturbance_detection.c", - "wq_vtb/src/error_buffer.c", - "wq_vtb/src/fec_shim.c", - "wq_vtb/src/history_buffer.c", - "wq_vtb/src/interleaver.c", - "wq_vtb/src/lookup.c", - "wq_vtb/src/metric.c", - "wq_vtb/src/polynomial.c", - "wq_vtb/src/preamble_generator.c", - "wq_vtb/src/reed-solomon.c", - "wq_vtb/src/rs_decode.c", - "wq_vtb/src/rs_encode.c", - "wq_vtb/src/scramble.c", - "wq_vtb/src/syncronizaiton.c", - "wq_vtb/src/wq_vtb_bit_rec.c", - "wq_vtb/src/wq_vtb_data_to_bit.c", - "wq_vtb/src/wq_vtb_topo_rec.c", - ] - - include_dirs = [ - "//import/wq_vtb/inc", - "//import/wq_vtb/ext_inc", - ] -} + sources=[] + include_dirs=[] +} \ No newline at end of file diff --git a/os/BUILD.gn b/os/BUILD.gn index 577fc81..0990cdd 100644 --- a/os/BUILD.gn +++ b/os/BUILD.gn @@ -11,25 +11,10 @@ import("//build/buildcfg.gni") -module_name = "kl_sdk" +module_name = get_path_info(rebase_path("."), "name") -kernel_module(module_name) { - sources = [ - "freertos/src/croutine.c", - "freertos/src/event_groups.c", - "freertos/src/hook.c", - "freertos/src/list.c", - "freertos/src/queue.c", - "freertos/src/tasks.c", - "freertos/src/timers.c", - "freertos/src/version.c", - "freertos/src/portable/RISCV/port.c", - "freertos/src/portable/RISCV/portasm.S", - "freertos/src/portable/MemMang/heap_5/heap_5.c" - ] - include_dirs = [ - "//os/freertos/src/include", - "//os/freertos/src/portable/RISCV", - "//startup/riscv/inc", +module_group(module_name) { + modules = [ + "freertos", ] } diff --git a/os/freertos/BUILD.gn b/os/freertos/BUILD.gn new file mode 100644 index 0000000..0e3edc6 --- /dev/null +++ b/os/freertos/BUILD.gn @@ -0,0 +1,8 @@ +import("//build/buildcfg.gni") + +module_name = "kl_sdk" + +kernel_module(module_name) { + sources=[] + include_dirs=[] +} \ No newline at end of file diff --git a/pib/BUILD.gn b/pib/BUILD.gn index a933aa7..497f278 100644 --- a/pib/BUILD.gn +++ b/pib/BUILD.gn @@ -14,12 +14,6 @@ import("//build/buildcfg.gni") module_name = "kl_sdk" kernel_module(module_name) { - sources = [ - "src/iot_cal_data.c", - "src/iot_oem.c", - "src/iot_pib.c", - ] - include_dirs = [ - "//inc/pib", - ] + sources=[] + include_dirs=[] } diff --git a/plc/BUILD.gn b/plc/BUILD.gn index 9ba06bf..e21711d 100644 --- a/plc/BUILD.gn +++ b/plc/BUILD.gn @@ -14,285 +14,6 @@ import("//build/buildcfg.gni") module_name = "kl_sdk" kernel_module(module_name) { - sources = [ - "common/src/plc_mpdu_header.c", - "common/src/plc_rf_scan_tbl.c", - "common/src/plc_scan_tbl.c", - "cvg/bwm/src/cvg_bwm.c", - "cvg/bwm/src/cvg_bwm_cco.c", - "cvg/bwm/src/cvg_bwm_rf.c", - "cvg/common/src/cvg.c", - "cvg/common/src/cvg_app.c", - "cvg/common/src/cvg_app_sg.c", - "cvg/common/src/cvg_app_spg.c", - "cvg/common/src/cvg_beacon_sg.c", - "cvg/common/src/cvg_beacon_spg.c", - "cvg/common/src/cvg_task.c", - "cvg/common/src/cvg_zc.c", - # "cvg/min_clct/src/cvg_min_clct.c", - # "cvg/min_clct/src/cvg_min_clct_cache.c", - # "cvg/min_clct/src/cvg_min_clct_cco.c", - # "cvg/min_clct/src/cvg_min_clct_sta.c", - # "cvg/min_clct/src/cvg_min_clct_sta_spg.c", - "cvg/nwm/src/cvg_nwm.c", - "cvg/nwm/src/cvg_nwm_cco.c", - "cvg/nwm/src/cvg_nwm_cco_app_filter.c", - "cvg/nwm/src/cvg_nwm_cco_ctrl_proto.c", - "cvg/nwm/src/cvg_nwm_cco_rf.c", - "cvg/nwm/src/cvg_nwm_cco_sg.c", - "cvg/nwm/src/cvg_nwm_cco_spg.c", - "cvg/nwm/src/cvg_nwm_cco_zc.c", - "cvg/nwm/src/cvg_nwm_ctrl_proto.c", - "cvg/nwm/src/cvg_nwm_ctrl_proto_sg.c", - "cvg/nwm/src/cvg_nwm_ctrl_proto_spg.c", - "cvg/nwm/src/cvg_nwm_sg.c", - "cvg/nwm/src/cvg_nwm_spg.c", - "cvg/nwm/src/cvg_nwm_sta.c", - "cvg/nwm/src/cvg_nwm_sta_app_filter.c", - "cvg/nwm/src/cvg_nwm_sta_ctrl_proto.c", - "cvg/nwm/src/cvg_nwm_sta_rf.c", - "cvg/nwm/src/cvg_nwm_sta_rf_sg.c", - "cvg/nwm/src/cvg_nwm_sta_rf_spg.c", - "cvg/nwm/src/cvg_nwm_sta_sg.c", - "cvg/nwm/src/cvg_nwm_sta_spg.c", - "cvg/nwm/src/cvg_nwm_sta_zc.c", - "cvg/prm/src/cvg_prm.c", - # "cvg/prm/src/cvg_prm_feature.c", - "cvg/prm/src/cvg_prm_matm.c", - "cvg/rt/src/cvg_rt.c", - "cvg/rt/src/cvg_rt_cco.c", - "cvg/rt/src/cvg_rt_cco_rf.c", - "cvg/rt/src/cvg_rt_rf.c", - "cvg/rt/src/cvg_rt_rf_sg.c", - "cvg/rt/src/cvg_rt_rf_spg.c", - "cvg/rt/src/cvg_rt_sg.c", - "cvg/rt/src/cvg_rt_spg.c", - "cvg/rt/src/cvg_rt_sta.c", - "cvg/rt/src/cvg_rt_sta_rf.c", - "cvg/rt/src/cvg_rt_sta_sg.c", - "cvg/rt/src/cvg_rt_sta_spg.c", - "cvg/security/src/cvg_sec_auth.c", - "cvg/security/src/cvg_sec_auth_ca.c", - "cvg/security/src/cvg_sec_auth_ca_cco.c", - "cvg/security/src/cvg_sec_auth_ca_cco_sg.c", - "cvg/security/src/cvg_sec_auth_ca_sta.c", - "cvg/security/src/cvg_sec_auth_ca_sta_sg.c", - "cvg/security/src/cvg_sec_auth_dak.c", - "cvg/security/src/cvg_sec_auth_dak_cco.c", - "cvg/security/src/cvg_sec_auth_dak_sta.c", - "cvg/security/src/cvg_sec_sign_cache.c", - "cvg/security/src/cvg_sec_wl.c", - "cvg/security/src/cvg_security.c", - "halmac/avln/mac_avln.c", - "halmac/beacon/beacon_frame.c", - "halmac/beacon/rf_beacon_frame.c", - "halmac/channel/mac_channel.c", - "halmac/channel_tools/mac_channel_tools.c", - "halmac/channel_tools/mac_mm_sniffer.c", - "halmac/crc/mac_crc.c", - "halmac/crypto/mac_crypto.c", - "halmac/data/mac_data.c", - "halmac/data/mac_rf_data.c", - "halmac/dbg_pkt_mode/mac_dbg_pkt_mode.c", - "halmac/desc/mac_desc_eng.c", - "halmac/hplc_ext/mac_hplc_ext.c", - "halmac/htbus/beacon_frame_htbus.c", - "halmac/hw_desc/hw_rf_rx_mpdu.c", - "halmac/hw_desc/hw_rf_tx_mpdu.c", - "halmac/hw_desc/hw_rx_mpdu.c", - "halmac/hw_desc/hw_tx_mpdu.c", - # "halmac/hw_desc/mac_trx_desc_cmn.c", - # "halmac/hw_desc/mac_rx_buf_ring.c", - "halmac/init/mac_init.c", - "halmac/init/plc_init.c", - "halmac/key/mac_key.c", - "halmac/mac_cfg/mac_cfg.c", - "halmac/mac_check_spur/mac_che_spur_cco.c", - "halmac/mac_check_spur/mac_che_spur_sta.c", - "halmac/mac_check_spur/mac_check_spur.c", - "halmac/mac_hw_tsfm/mac_hw_tsfm.c", - "halmac/msdu/mac_msdu.c", - "halmac/msdu/mac_rf_msdu.c", - "halmac/multi_nid_sync/multi_nid_sync.c", - "halmac/nn_cco/nn_cco.c", - "halmac/pdev/mac_pdev.c", - "halmac/pdev/mac_rf_pdev.c", - "halmac/peer/mac_peer.c", - "halmac/pm/mac_pm.c", - "halmac/ppm_scan/mac_ppm_scan.c", - "halmac/ppm_scan/mac_rf_scan.c", - "halmac/rate/rate_control.c", - "halmac/rate/rf_rate_control.c", - "halmac/rf/mac_rf.c", - "halmac/rx/rx_pb_reorder.c", - "halmac/sched/mac_rf_sched.c", - "halmac/sched/mac_sched.c", - "halmac/status/mac_status.c", - "halmac/stream/mac_stream.c", - "halmac/sw_queue/mac_hwq_mgr.c", - "halmac/sw_queue/mac_rf_hwq_mgr.c", - "halmac/sw_sched/sw_sched.c", - "halmac/task/mac_dsr.c", - "halmac/task/mac_msg.c", - "halmac/task/mac_task.c", - "halmac/tx_power/mac_rf_tx_power.c", - "halmac/tx_power/mac_tx_power.c", - "halmac/utils/mac_utils.c", - "halmac/vdev/mac_rf_vdev.c", - "halmac/vdev/mac_vdev.c", - "halmac/zc/mac_zc_cmn.c", - "halmac/zc/zc_2/mac_zc.c", - "halmac/test/mac_cert_test.c", - "halmac/test/mac_rf_cert_test.c", - "halmac/test/rf_tx_test_lib.c", - "halmac/test/mac_cert_sec_lib.c", - "halmac/test/tx_test_lib.c", - # "halmac/rf_ext/mac_rf_ext.c", - "halphy/multi_ppm/phy_multi_ppm.c", - "halphy/phy_api.c", - "halphy/phy_bbai_calu.c", - "halphy/phy_bbai_calu_2.c", - "halphy/phy_cfg.c", - "halphy/phy_chn.c", - "halphy/phy_data.c", - "halphy/phy_data_ckb.c", - "halphy/phy_init.c", - "halphy/phy_math_tb.c", - "halphy/phy_overstress.c", - "halphy/phy_perf.c", - "halphy/phy_rf_chn.c", - "halphy/phy_rf_init.c", - "halphy/phy_txrx_pwr.c", - "halphy/rf_tone_map.c", - "halphy/tone_map.c", - "halphy/tone_mask.c", - "halphy/test/phy_test_api.c", - "htbus/src/cco/htbus_cco.c", - "htbus/src/htbus.c", - "htbus/src/htbus_test.c", - "htbus/src/sta/htbus_sta.c", - "halphy/hw3/plc/math_log10.c", - "halphy/test/phy_tools.c", - "halphy/hw_common/phy_hw_cmn.c", - "halmac/hw3/rx/mac_rx_buf_ring.c", - "halmac/hw_desc/mac_desc_api.c" - ] - if (target == "kunlun3") { - sources += [ - "halmac/hw3/common/mac_rf_common_hw.c", - "halmac/hw3/common/mac_rf_timer.c", - "halmac/hw3/isr/mac_isr.c", - "halmac/hw3/isr/mac_rf_isr.c", - "halmac/hw3/key/mac_key_hw.c", - "halmac/hw3/misc/mac_hw_misc.c", - "halmac/hw3/rawdata/mac_rawdata_hw.c", - "halmac/hw3/reset/mac_reset.c", - "halmac/hw3/rx/mac_rf_rx_buf_ring.c", - "halmac/hw3/rx/mac_rf_rx_hw.c", - # "halmac/hw3/rx/mac_rx_buf_ring_hw.c", - "halmac/hw3/rx/mac_rx_hw.c", - "halmac/hw3/sched/mac_rf_sched_hw.c", - "halmac/hw3/sched/mac_sched_hw.c", - "halmac/hw3/tx/mac_rf_tx_hw.c", - "halmac/hw3/tx/mac_rf_txq_hw.c", - "halmac/hw3/tx/mac_tx_hw.c", - "halmac/hw3/tx/mac_txq_hw.c", - "halmac/hw3/zc/mac_zc_hw.c", - # "halmac/hw_common_v1/src/mac_status_v.c", - # "halmac/hw_common_v1/src/mac_check_spur_v.c", - # "halphy/hw_common_v1/src/phy_hw_cmn_v.c", - # "halphy/hw_common_v1/src/phy_perf_v.c", - # "halphy/hw_common_v1/src/phy_api_v.c", - # "halphy/hw_common_v1/src/phy_tools_v.c", - "halphy/hw3/plc/chip/phy_ana_plf.c", - "halphy/hw3/plc/hw_phy_perf.c", - "halphy/hw3/plc/hw_phy_txrx_pwr.c", - "halphy/hw3/plc/phy_ada_dump.c", - "halphy/hw3/plc/phy_agc.c", - "halphy/hw3/plc/phy_ana.c", - "halphy/hw3/plc/phy_bb.c", - "halphy/hw3/plc/phy_cal.c", - "halphy/hw3/plc/phy_dump.c", - "halphy/hw3/plc/phy_gain_table_cal.c", - "halphy/hw3/plc/phy_gepde_gpio.c", - "halphy/hw3/plc/phy_isr.c", - "halphy/hw3/plc/phy_mix.c", - "halphy/hw3/plc/phy_nf.c", - "halphy/hw3/plc/phy_phase.c", - "halphy/hw3/plc/phy_pm.c", - "halphy/hw3/plc/phy_ppm.c", - "halphy/hw3/plc/phy_status.c", - "halphy/hw3/plc/phy_temperature.c", - "halphy/hw3/plc/phy_tmap.c", - ] - } - include_dirs = [ - "//", - "//cli/communicator", - "//common/os_shim/arm/inc", - "//common/os_shim/inc", - "//driver/inc", - "//export/inc/socket", - "//ftm/inc", - "//inc", - "//inc/cli", - "//inc/cli/plc", - "//inc/compiler/gcc", - "//inc/crypto", - "//inc/dbglog", - "//inc/driver", - "//inc/io_lib", - "//inc/io_lib/", - "//inc/ipc", - "//inc/os_shim", - "//inc/os_shim/", - "//inc/pib", - "//inc/pkt", - "//inc/plc_lib", - "//inc/socket", - "//inc/swc_lib", - "//inc/uart", - "//inc/utils", - "//os/freertos/src/portable/RISCV", - "//plc/common/bwm/inc", - "//plc/common/inc", - "//plc/common/plc_cli/include", - "//plc/common/plc_dbglog/include", - "//plc/cvg/bwm/inc", - "//plc/cvg/common/inc", - "//plc/cvg/min_clct/inc", - "//plc/cvg/nwm/inc", - "//plc/cvg/prm/inc", - "//plc/cvg/rt/inc", - "//plc/cvg/security/inc", - "//plc/halmac/inc", - "//plc/halmac/test/inc", - "//plc/halphy/inc", - "//plc/halphy/test/inc", - "//plc/htbus/inc", - "//plc/inc", - "//plc/inc/mme", - "//plc/os_shim/arm/inc", - "//plc/os_shim/inc", - ] - if (target == "kunlun3") { - include_dirs += [ - "//driver/src/hw3/inc", - "//plc/halmac/hw3/inc", - "//plc/halmac/hw3/inc/desc", - "//plc/halmac/hw3/inc/reg", - "//plc/halmac/hw3/plc_inc", - "//plc/halmac/hw3/plc_inc/desc", - "//plc/halmac/hw3/rf_inc", - "//plc/halmac/hw3/rf_inc/desc", - "//plc/halmac/hw_common_v1/inc", - "//plc/halphy/hw_common_v1/inc", - "//plc/halphy/hw3/inc", - "//plc/halphy/hw3/plc/chip/inc", - "//plc/halphy/hw3/plc/inc", - "//plc/halphy/hw3/rf/inc", - "//plc/halphy/test/hw3/inc", - ] - } - -} + sources=[] + include_dirs=[] +} \ No newline at end of file diff --git a/sbl/BUILD.gn b/sbl/BUILD.gn index 333ee88..c23f7f9 100644 --- a/sbl/BUILD.gn +++ b/sbl/BUILD.gn @@ -1,27 +1,9 @@ +import("//build/buildcfg.gni") + + module_name = "kl_sdk" kernel_module(module_name) { - sources = [ - "src/common.c", - "src/boot.c", - "src/version.c", - "src/sbl_printf.c", - "src/hw3/sbl_boot.c", - "src/riscv/entry_def.S", - "src/riscv/sbl.S", - ] - include_dirs = [ - "//sbl/inc", - "//sbl/inc/hw3", - "//sbl/lzma", - "//inc/pib", - "//driver/inc", - "//inc", - "//inc/io_lib", - "//inc/os_shim", - "//inc/compiler/gcc", - "//inc/utils", - "//driver/src/hw3/inc", - "//inc/driver", - ] + sources=[] + include_dirs=[] } \ No newline at end of file diff --git a/startup/BUILD.gn b/startup/BUILD.gn index 2959569..fca4687 100644 --- a/startup/BUILD.gn +++ b/startup/BUILD.gn @@ -14,29 +14,6 @@ import("//build/buildcfg.gni") module_name = "kl_sdk" kernel_module(module_name) { - sources = [ - "misc/main.c", - "misc/plc/plc_main.c", - ] - if (target == "kunlun3") { - sources += [ - "riscv3/src/start.S", - "riscv3/src/entry_def.S", - "riscv3/src/entry.S", - "riscv3/src/startup_init.c", - "riscv3/src/exception.c", - "riscv3/src/platform.c", - ] - include_dirs = [ - "//inc/ftm", - "//inc/lwip", - "//ftm/inc", - "//plc/inc/mme", - "//plc/common/inc", - "//plc/halphy/inc", - "//plc/halphy/hw3/plc/inc", - "//plc/halphy/hw_common_v1/inc", - "//plc/halmac/inc", - ] - } + sources = [] + include_dirs = [] }