#Copyright(c) 2024 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED. #This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT #be copied by any method or incorporated into another program without #the express written consent of Aerospace C.Power. This Information or any portion #thereof remains the property of Aerospace C.Power. The Information contained herein #is believed to be accurate and Aerospace C.Power assumes no responsibility or #liability for its use in any way and conveys no license or title under #any patent or copyright and makes no representation or warranty that this #Information is free from patent or copyright infringement. import("//build/buildcfg.gni") module_name = "kl_sdk" kernel_module(module_name) { sources = [ # "src/hal/iot_bus.c", "src/hal/afft.c", "src/hal/vfs_uart.c", "src/hal/iot_dma_sw.c", "src/hal/iot_busmon.c", "src/hal/nand_flash.c", "src/hal/dbg_msg_stash.c", "src/hal/mtd_part.c", "src/hal/iot_uart_h.c", "src/hal/system.c", "src/hal/iot_gpio.c", "src/hal/iot_eth.c", "src/hal/iot_crypto_async.c", "src/hal/led.c", "src/hal/iot_spi.c", "src/hal/iot_plc_pm_cus.c", "src/hal/iot_plc_led_cus.c", "src/hal/energe_meter.c", "src/hal/math_matrix.c", "src/hal/board_info.c", "src/hal/rtc.c", "src/hal/osif_dma_uart.c", "src/hal/i2c.c", "src/hal/iot_crypto_share.c", "src/hal/iot_spinlock.c", "src/hal/i2s.c", "src/hal/mtd.c", "src/hal/iot_dma_hw.c", "src/hal/usb_dev.c", "src/hal/nor_flash.c", "src/hal/iot_plc_led.c", "src/hal/iot_pwm.c", "src/hal/iot_crypto_mbedtls_lib.c", "src/hal/iot_efuse.c", "src/hal/irq.c", "src/hal/mailbox.c", "src/hal/iot_crypto.c", "src/hal/iot_plc_pm.c", "src/hal/iot_gp_timer.c", "src/hal/diag.c", "src/hal/upgrade.c", "src/hal/iot_plc_hw_tsfm.c", "src/hal/sram.c", "src/hal/sd_card.c", "src/hal/clock.c", "src/hal/flash.c", "src/hal/dbg_msg_pop.c", "src/hal/iot_crypto_internal.c", "src/hal/iot_i2c_slave.c", "src/hal/spi_flash.c", "src/hal/iot_wdg.c", "src/hal/iot_crypto_lock.c", "src/hal/debug_uart.c", "src/hal/dma_i2s.c", "src/hal/osif_uart.c", "src/hal/adc.c", "src/hal/power_mgmt.c", "src/hal/iot_mic_array.c", "src/hal/iot_flash_layout.c", "src/hal/iot_plc_hw_topo.c", "extern/bluetooth/src/iot_bt_ext_upgrade_img.c", "extern/bluetooth/src/iot_bt_ext_upgrade.c", "extern/bluetooth/src/iot_bt_ext_upgrade_img_mgr.c", "extern/bluetooth/src/iot_bt_ext_dev_mgmt.c", "extern/bluetooth/src/iot_bt_ext.c", "extern/em/src/iot_em_ext.c", "extern/em/src/iot_em_ext_calibration.c", "extern/em/src/iot_em_ext_chip_att.c", ] if (target == "kunlun3") { sources += [ "src/hw3/dma_sw.c", "src/hw3/intc.c", "src/hw3/cpu.c", "src/hw3/i2c_hw.c", "src/hw3/pmu.c", "src/hw3/gpio_mtx.c", "src/hw3/smc.c", "src/hw3/system_hw.c", "src/hw3/pmp.c", "src/hw3/em_hw.c", "src/hw3/efuse.c", "src/hw3/ndfc.c", "src/hw3/ahb_busmon.c", "src/hw3/board_info_hw.c", "src/hw3/pwm.c", "src/hw3/topo_adc_adp.c", "src/hw3/ledc.c", "src/hw3/gp_timer.c", "src/hw3/pmp_hw.c", "src/hw3/ana.c", "src/hw3/i2c_slv_hw.c", "src/hw3/afft_hw.c", "src/hw3/gpio_hw.c", "src/hw3/mtx_hw.c", "src/hw3/dwc_eth.c", "src/hw3/dma_hw.c", "src/hw3/rtc_hw.c", "src/hw3/rom_patch_hw.c", "src/hw3/simd.c", "src/hw3/sadc_pwm.c", "src/hw3/sha512_hw.c", "src/hw3/sec_glb.c", "src/hw3/dw_apb_ssi.c", "src/hw3/mailbox_hw.c", "src/hw3/snapshot.c", "src/hw3/sadc.c", "src/hw3/uart_e.c", "src/hw3/apb.c", "src/hw3/clk.c", "src/hw3/ahb.c", "src/hw3/ada.c", "src/hw3/ddrc.c", "src/hw3/mmon.c", "src/hw3/wdg.c", "src/hw3/mon_hw.c", "src/hw3/i2s_hw.c", "src/hw3/dma.c", "src/hw3/sfc.c", "src/hw3/power_mgmt_hw.c", "src/hw3/dma_uart_hw.c", "src/hw3/pll_cal.c", "src/hw3/sha256_hw.c", "src/hw3/sec_sys.c", "src/hw3/dev_spinlock.c", "src/hw3/dbg_msg_ring_hw.c", "src/hw3/mbedtls/aes_patch_alt.c", "src/hw3/mbedtls/bignum_patch_alt.c", "src/hw3/mbedtls/hardware_entropy_patch_alt.c", "src/hw3/mbedtls/sha256_patch_alt.c", "src/hw3/mbedtls/sha512_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", ] }