# Copyright (c) 2021 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Kernel type, e.g. "linux", "liteos_a", "liteos_m". kernel_type = "liteos_m" # Kernel version. kernel_version = "3.0.0" # Board CPU type, e.g. "cortex-a7", "riscv32". board_cpu = "cortex-m4" # Board arch, e.g. "armv7-a", "rv32imac". board_arch = "" # Toolchain name used for system compiling. # E.g. gcc-arm-none-eabi, arm-linux-harmonyeabi-gcc, ohos-clang, riscv32-unknown-elf. # Note: The default toolchain is "ohos-clang". It's not mandatory if you use the default toochain. board_toolchain = "arm-none-eabi-gcc" #board_toolchain = "arm-linux-harmonyeabi-gcc" # The toolchain path instatlled, it's not mandatory if you have added toolchian path to your ~/.bashrc. #board_toolchain_path = "/home/openharmony/gcc/gcc-arm-none-eabi-10-2020-q4-major/bin" board_toolchain_path = "" # Compiler prefix. board_toolchain_prefix = "arm-none-eabi-" # Compiler type, "gcc" or "clang". board_toolchain_type = "gcc" # config.json parse if (product_path != "") { product_conf = read_file("${product_path}/config.json", "json") product_name = product_conf.product_name } # Board related common compile flags. board_cflags = [ "-mcpu=cortex-m4", "-mfpu=fpv4-sp-d16", "-mfloat-abi=softfp", "-mthumb", "-Og", # "-g", #"-Wall", "-fdata-sections", "-ffunction-sections", "-D__FPU_PRESENT", "-DLOSCFG_DRIVERS_HDF", "-DLOSCFG_DRIVERS_HDF_PLATFORM", "-DCFG_HW_PLATFORM=2", "-DCFG_RF_MODE=1", "-DCFG_DACL_MIXER_MODE=0", "-DCFG_DACR_MIXER_MODE=2", #"-DCFG_APP_BLESMARTCONFIGWIFI", "-DCFG_WIFI_STACK", "-DCONFIG_RWNX_LWIP", "-DCFG_RSSI_DATAPKT", "-DCFG_BT_STACK", "-DCFG_SOFTAP", "-DCFG_BT_USER", "-DCFG_AON", "-DCFG_BLE_ONLY", "-DCFG_BLE_STACK", "-DCFG_SEC_CON", "-DCFG_ALLROLES", "-DCFG_HOST", "-DCFG_BLE", "-DCFG_APP", "-DCFG_APP_SEC", "-DCFG_APP_SMARTCONFIG", "-DCFG_WIFI_BT_COMBO", "-DCFG_CS1000_MIC_MATRIX=0", "-DCFG_PMIC", "-DCFG_DBG", "-DCFG_FHDLR", "-DCFG_ROM_VER=2", "-DCFG_PRF", "-DCFG_NB_PRF=10", "-DCFG_PRF_SMARTCONFIGS", "-DCFG_LITEOS", "-DCFG_RTOS", #"-DCFG_PING", "-DLOSCFG_BASE_CORE_HILOG", "-Wl,--wrap=printf", ] if (product_name == "iotlink_demo") { board_cflags += [ "-DCFG_OS_IPC_MUX_LIMIT=48", "-DCFG_OS_SYS_HEAP_SIZE=0x25000UL", "-DCFG_CONSOLE", "-DCFG_APP_CONSOLEWIFI", "-D__HEAP_SIZE=0x20000", "-D__STACK_SIZE=4096", ] } else if (product_name == "display_demo") { board_cflags += [ "-DCFG_OS_IPC_MUX_LIMIT=48", "-DCFG_OS_SYS_HEAP_SIZE=0x25000UL", "-DCFG_APP_CONSOLEWIFI", "-D__HEAP_SIZE=0x500", "-D__STACK_SIZE=4096", ] } else if (product_name == "xts_demo") { board_cflags += [ "-DCFG_CONSOLE", "-DCFG_APP_CONSOLEWIFI", "-DCFG_OS_IPC_MUX_LIMIT=48", "-DCFG_OS_SYS_HEAP_SIZE=0x25000UL", "-D__HEAP_SIZE=0x200", "-D__STACK_SIZE=2048", ] } else if (product_name == "dsoftbus_demo") { board_cflags += [ "-DCFG_OS_IPC_MUX_LIMIT=128", "-DCFG_OS_SYS_HEAP_SIZE=0x30000UL", "-DCFG_CONSOLE", "-DCFG_APP_CONSOLEWIFI", "-D__HEAP_SIZE=0x10000", "-D__STACK_SIZE=4096", ] } board_cxx_flags = board_cflags board_ld_flags = [ "-L${ohos_root_path}out/${board_name}/${product_name}/libs" ] if (product_name == "xts_demo") { ## XTS libs board_ld_flags += [ "-Wl,--whole-archive", "-lhctest", #"-lmodule_ActsParameterTest", "-lmodule_ActsBootstrapTest", "-lmodule_ActsDfxFuncTest", "-lmodule_ActsHieventLiteTest", #"-lmodule_ActsKvStoreTest", "-lmodule_ActsSamgrTest", #"-lmodule_ActsWifiServiceTest", "-lparam_client_lite", "-lhiview_lite_static", "-lhilog_lite_static", "-lhievent_lite_static", "-lbroadcast", "-lbootstrap", "-lhuks_test_common", "-Wl,--no-whole-archive", ] } else if (product_name == "dsoftbus_demo") { board_ld_flags += [ "-Wl,--whole-archive", "-ldsoftbus_test", "-lparam_client_lite", "-lhiview_lite_static", "-lhilog_lite_static", "-lhievent_lite_static", "-lbroadcast", "-lbootstrap", "-Wl,--no-whole-archive", ] } else { ## WBLINK libs board_ld_flags += [ "-Wl,--whole-archive", "-lexample", "-lparam_client_lite", "-lhiview_lite_static", "-lhilog_lite_static", "-lhievent_lite_static", "-lbroadcast", "-lbootstrap", "-Wl,--no-whole-archive", ] } # Board related headfiles search path. board_include_dirs = [ "//kernel/liteos_m/kernel/arch/arm/cortex-m4/gcc", "//device/soc/chipsea/cst85", "${ohos_root_path}commonlibrary/utils_lite/include", "//drivers/hdf_core/framework/include/core", "//drivers/hdf_core/framework/core/common/include/host", "//drivers/hdf_core/framework/include/utils", "//drivers/hdf_core/adapter/khdf/liteos_m/osal/include", "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits", ] # Board adapter dir for OHOS components. board_adapter_dir = "${ohos_root_path}device/soc/chipsea" # Sysroot path. board_configed_sysroot = "" # Board storage type, it used for file system generation. storage_type = ""