opt build script

Signed-off-by: zounan <zounan@goodix.com>
This commit is contained in:
lidongshan
2021-12-10 17:22:33 +08:00
parent e39fa819d5
commit 5b1c298b59
7 changed files with 72 additions and 139 deletions
+7 -7
View File
@@ -12,13 +12,13 @@
# limitations under the License.
if (ohos_kernel_type == "liteos_m") {
import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
module_group(module_name) {
import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
module_group(module_name) {
modules = [
"gr5515_sk",
"drivers",
"hcs",
"gr5515_sk",
"drivers",
"hcs",
]
}
}
}
+4 -3
View File
@@ -149,18 +149,19 @@ sudo pip3 install --upgrade pip
### 搭建过程
参考 [环境搭建步骤](https://gitee.com/openharmony-sig/devboard_device_goodix_gr551x/blob/master/README.md)
参考 [环境搭建步骤](https://gitee.com/openharmony-sig/device_soc_goodix/blob/master/README.md)
## 编译调试
参考 [编译调试步骤](https://gitee.com/openharmony-sig/devboard_device_goodix_gr551x/blob/master/README.md)
参考 [编译调试步骤](https://gitee.com/openharmony-sig/device_soc_goodix/blob/master/README.md)
## 首个示例
代码默认有1个示例:
1. [XTS测试示例](https://gitee.com/openharmony-sig/devboard_vendor_goodix_gr5515_sk_basic/tree/master/gr5515_sk_xts_demo)
1. [BLE应用示例](https://gitee.com/openharmony-sig/vendor_goodix/tree/master/gr5515_sk_iotlink_demo)
2. [XTS测试示例](https://gitee.com/openharmony-sig/vendor_goodix/tree/master/gr5515_sk_xts_demo)
## 参考资源
+4 -4
View File
@@ -12,8 +12,8 @@
# limitations under the License.
if (ohos_kernel_type == "liteos_m") {
import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
}
import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
}
}
+5 -5
View File
@@ -12,9 +12,9 @@
# limitations under the License.
if (ohos_kernel_type == "liteos_m") {
import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
module_group(module_name) {
modules = [ "liteos_m" ]
}
import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
module_group(module_name) {
modules = [ "liteos_m" ]
}
}
+1 -1
View File
@@ -15,5 +15,5 @@ import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
deps = [ "$product_path/hdf_config:hdf_hcs" ]
deps = [ "$product_path/hdf_config:hdf_hcs" ]
}
+46 -114
View File
@@ -40,125 +40,58 @@ board_toolchain_prefix = "arm-none-eabi-"
board_toolchain_type = "gcc"
# Board related common compile flags.
board_cflags = [
"-std=c99",
"--inline",
"-ggdb",
"-O1",
"-ffunction-sections",
"-fdata-sections",
"-mfloat-abi=softfp",
"-mfpu=fpv4-sp-d16",
"-mapcs-frame",
"-mcpu=cortex-m4",
"-mthumb",
"-mthumb-interwork",
"-gdwarf-2",
"-MD",
"-fno-stack-protector",
"-DLOSCFG_BASE_CORE_HILOG=1",
board_cflags = [
"-std=c99",
"--inline",
"-ggdb",
"-O0",
"-ffunction-sections",
"-fdata-sections",
"-mfloat-abi=softfp",
"-mfpu=fpv4-sp-d16",
"-mapcs-frame",
"-mcpu=cortex-m4",
"-mthumb",
"-mthumb-interwork",
"-gdwarf-2",
"-MD",
"-fno-stack-protector",
"-DLOSCFG_BASE_CORE_HILOG=1",
]
board_cxx_flags = [ ]
board_cxx_flags = []
board_ld_flags = [
"-nostartfiles",
"-mcpu=cortex-m4",
"-mfloat-abi=softfp",
"-mfpu=fpv4-sp-d16",
"-mapcs-frame",
"-mthumb",
"-mthumb-interwork",
"-Wl,--gc-sections",
"-Wl,--start-group",
"-Llibs",
"-Wl,--whole-archive",
"-lbootstrap",
"-lsamgr_adapter",
"-lsamgr_source",
"-lbroadcast",
"-lhilog_lite",
"-lhiview_lite",
"-lutils_kv_store",
"-lkernel",
"-lble_sdk",
"-Wl,--no-whole-archive",
"-Wl,--end-group",
"-Tbin/link.ld",
"-Trom_symbol_gcc.txt",
"-Wl,-Map=bin/application.map",
"-nostartfiles",
"-mcpu=cortex-m4",
"-mfloat-abi=softfp",
"-mfpu=fpv4-sp-d16",
"-mapcs-frame",
"-mthumb",
"-mthumb-interwork",
"-Wl,--gc-sections",
"-Wl,--start-group",
"-Wl,--whole-archive",
"-Llibs",
"-lbootstrap",
"-lsamgr_adapter",
"-lsamgr_source",
"-lbroadcast",
"-lhilog_lite",
"-lhiview_lite",
"-lutils_kv_store",
"-lkernel",
"-lble_sdk",
"-Wl,--no-whole-archive",
"-Wl,--end-group",
"-Tbin/link.ld",
"-Trom_symbol_gcc.txt",
"-Wl,-Map=bin/application.map",
]
# Board related headfiles search path.
board_include_dirs = [
"//kernel/liteos_m",
"//kernel/liteos_m/kernel/arch/arm/cortex-m4/gcc",
"//kernel/liteos_m/kernel/arch/include",
"//kernel/liteos_m/kernel/include",
"//kernel/liteos_m/kal/cmsis",
"//kernel/liteos_m/kal/posix/include",
"//kernel/liteos_m/utils",
"//kernel/liteos_m/components/exchook",
"//utils/native/lite/kal/timer",
"//utils/native/lite/include",
"//kernel/liteos_m/components/fs/fatfs",
"//third_party/FatFs/source",
"//third_party/cmsis/CMSIS/Core/Include",
"//third_party/musl/porting/liteos_m/kernel/include",
"//third_party/bounds_checking_function/include",
"//third_party/openssl",
"//third_party/openssl/include",
"//third_party/openssl/crypto/include",
"//third_party/openssl/crypto/ec",
"//third_party/mbedtls/include",
"//foundation/communication/bluetooth/interfaces/innerkits/native_c/include",
"//device/soc/goodix/gr551x/sdk_liteos/platform/include",
"//device/soc/goodix/gr551x/adapter/hals/bluetooth",
"//device/soc/goodix/gr551x/components/hilink/include",
"//device/soc/goodix/gr551x/sdk_liteos/config",
"//device/soc/goodix/gr551x/sdk_liteos/liteos_m",
"//device/soc/goodix/gr551x/components/watchdog",
"//device/soc/goodix/gr551x/sdk_liteos/gr551x_sdk/components/app_drivers/inc",
"//device/soc/goodix/gr551x/sdk_liteos/gr551x_sdk/components/boards",
"//device/soc/goodix/gr551x/sdk_liteos/gr551x_sdk/components/drivers_ext/gr551x",
"//device/soc/goodix/gr551x/sdk_liteos/gr551x_sdk/components/libraries/app_lfs",
"//device/soc/goodix/gr551x/sdk_liteos/gr551x_sdk/components/libraries/app_assert",
"//device/soc/goodix/gr551x/sdk_liteos/gr551x_sdk/components/libraries/app_error",
"//device/soc/goodix/gr551x/sdk_liteos/gr551x_sdk/components/libraries/app_log",
"//device/soc/goodix/gr551x/sdk_liteos/gr551x_sdk/components/libraries/app_timer",
"//device/soc/goodix/gr551x/sdk_liteos/gr551x_sdk/components/libraries/hal_flash",
"//device/soc/goodix/gr551x/sdk_liteos/gr551x_sdk/components/libraries/pmu_calibration",
"//device/soc/goodix/gr551x/sdk_liteos/gr551x_sdk/components/libraries/ring_buffer",
"//device/soc/goodix/gr551x/sdk_liteos/gr551x_sdk/components/libraries/utility",
"//device/soc/goodix/gr551x/sdk_liteos/gr551x_sdk/components/patch/ind",
"//device/soc/goodix/gr551x/sdk_liteos/gr551x_sdk/components/sdk/",
"//device/soc/goodix/gr551x/sdk_liteos/gr551x_sdk/drivers/inc",
"//device/soc/goodix/gr551x/sdk_liteos/gr551x_sdk/toolchain/gr551x/include",
]
# add hdf includes path
board_include_dirs += [
"//drivers/adapter/khdf/liteos_m/osal/include/",
"//drivers/framework/ability/sbuf/include",
"//drivers/framework/core/host/include",
"//drivers/framework/core/common/include/host",
"//drivers/framework/core/shared/include",
"//drivers/framework/include",
"//drivers/framework/include/osal",
"//drivers/framework/include/config",
"//drivers/framework/include/core",
"//drivers/framework/include/platform",
"//drivers/framework/include/utils",
"//drivers/framework/include/platform",
"//drivers/framework/support/platform/include",
"//drivers/framework/support/platform/include/common",
"//drivers/framework/utils/include",
"//base/hiviewdfx/hilog_lite/interfaces/native/kits",
"//utils/native/lite/include",
"//third_party/bounds_checking_function/include",
"//third_party/mbedtls/include",
]
# Board adapter dir for OHOS components.
@@ -169,4 +102,3 @@ board_configed_sysroot = ""
# Board storage type, it used for file system generation.
storage_type = ""
+5 -5
View File
@@ -12,8 +12,8 @@
# limitations under the License.
if (ohos_kernel_type == "liteos_m") {
import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
}
}
import("//kernel/liteos_m/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
}
}