mirror of
https://github.com/openharmony/device_board_beken.git
synced 2026-07-01 03:22:16 -04:00
!27 fix xts test bug && code check
Merge pull request !27 from xxkit/master
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
module_name = get_path_info(rebase_path("."), "name")
|
||||
module_name = get_path_info(rebase_path("."), "name")
|
||||
module_group(module_name) {
|
||||
modules = [
|
||||
"shields",
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
if (ohos_kernel_type == "liteos_m") {
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
module_name = get_path_info(rebase_path("."), "name")
|
||||
@@ -19,10 +18,3 @@ if (ohos_kernel_type == "liteos_m") {
|
||||
modules = [ "liteos_m" ]
|
||||
}
|
||||
}
|
||||
|
||||
group("bk7235x_group") {
|
||||
deps = [
|
||||
"${device_path}:bk_sdk",
|
||||
"liteos_m:run_wifiiot_scons"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -15,5 +15,4 @@ import("//drivers/hdf_core/adapter/khdf/liteos_m/hdf.gni")
|
||||
module_name = "hdf_hcs"
|
||||
hdf_driver(module_name) {
|
||||
hcs_sources = [ "dev_config.hcs" ]
|
||||
|
||||
}
|
||||
|
||||
+28
-35
@@ -17,37 +17,8 @@ khdf_path = "//drivers/hdf_core/adapter/khdf/liteos_m"
|
||||
|
||||
static_library("bk_hdf_driver") {
|
||||
sources = [
|
||||
"src/devmgr_loader.c",
|
||||
"src/bk_uart_driver.c",
|
||||
"src/bk_gpio_driver.c",
|
||||
"src/bk_i2c_driver.c",
|
||||
|
||||
"$khdf_path/core/common/src/devmgr_service_start.c",
|
||||
"$khdf_path/core/common/src/devsmall_object_config.c",
|
||||
"$khdf_path/core/common/src/hdf_device_node_ext.c",
|
||||
|
||||
"$khdf_path/osal/src/osal_mem.c",
|
||||
"$khdf_path/osal/src/osal_mutex.c",
|
||||
"$khdf_path/osal/src/osal_sem.c",
|
||||
"$khdf_path/osal/src/osal_spinlock.c",
|
||||
"$khdf_path/osal/src/osal_thread.c",
|
||||
"$khdf_path/osal/src/osal_time.c",
|
||||
"$khdf_path/osal/src/osal_timer.c",
|
||||
|
||||
"$HDF_FRAMEWORKS_PATH/core/common/src/buildin_config_entry.c",
|
||||
"$HDF_FRAMEWORKS_PATH/core/common/src/hdf_attribute.c",
|
||||
"$HDF_FRAMEWORKS_PATH/utils/src/hcs_parser/device_resource_if.c",
|
||||
"$HDF_FRAMEWORKS_PATH/utils/src/hcs_parser/hcs_blob_if.c",
|
||||
"$HDF_FRAMEWORKS_PATH/utils/src/hcs_parser/hcs_buildin_parser.c",
|
||||
"$HDF_FRAMEWORKS_PATH/utils/src/hcs_parser/hcs_generate_tree.c",
|
||||
"$HDF_FRAMEWORKS_PATH/utils/src/hcs_parser/hcs_parser.c",
|
||||
"$HDF_FRAMEWORKS_PATH/utils/src/hcs_parser/hcs_tree_if.c",
|
||||
|
||||
"$HDF_FRAMEWORKS_PATH/support/platform/src/fwk/platform_device.c",
|
||||
"$HDF_FRAMEWORKS_PATH/support/platform/src/fwk/platform_manager.c",
|
||||
"$HDF_FRAMEWORKS_PATH/support/platform/src/fwk/platform_common.c",
|
||||
"$HDF_FRAMEWORKS_PATH/support/platform/src/fwk/platform_event.c",
|
||||
|
||||
"$HDF_FRAMEWORKS_PATH/core/common/src/buildin_config_entry.c",
|
||||
"$HDF_FRAMEWORKS_PATH/core/common/src/hdf_attribute.c",
|
||||
"$HDF_FRAMEWORKS_PATH/core/host/src/devhost_service.c",
|
||||
"$HDF_FRAMEWORKS_PATH/core/host/src/devmgr_service_clnt.c",
|
||||
"$HDF_FRAMEWORKS_PATH/core/host/src/devsvc_manager_clnt.c",
|
||||
@@ -71,14 +42,38 @@ static_library("bk_hdf_driver") {
|
||||
"$HDF_FRAMEWORKS_PATH/core/shared/src/hdf_device_info.c",
|
||||
"$HDF_FRAMEWORKS_PATH/core/shared/src/hdf_object_manager.c",
|
||||
"$HDF_FRAMEWORKS_PATH/core/shared/src/hdf_service_record.c",
|
||||
"$HDF_FRAMEWORKS_PATH/support/platform/src/fwk/platform_common.c",
|
||||
"$HDF_FRAMEWORKS_PATH/support/platform/src/fwk/platform_device.c",
|
||||
"$HDF_FRAMEWORKS_PATH/support/platform/src/fwk/platform_event.c",
|
||||
"$HDF_FRAMEWORKS_PATH/support/platform/src/fwk/platform_manager.c",
|
||||
"$HDF_FRAMEWORKS_PATH/support/platform/src/gpio/gpio_core.c",
|
||||
"$HDF_FRAMEWORKS_PATH/support/platform/src/gpio/gpio_manager.c",
|
||||
"$HDF_FRAMEWORKS_PATH/utils/src/hcs_parser/device_resource_if.c",
|
||||
"$HDF_FRAMEWORKS_PATH/utils/src/hcs_parser/hcs_blob_if.c",
|
||||
"$HDF_FRAMEWORKS_PATH/utils/src/hcs_parser/hcs_buildin_parser.c",
|
||||
"$HDF_FRAMEWORKS_PATH/utils/src/hcs_parser/hcs_generate_tree.c",
|
||||
"$HDF_FRAMEWORKS_PATH/utils/src/hcs_parser/hcs_parser.c",
|
||||
"$HDF_FRAMEWORKS_PATH/utils/src/hcs_parser/hcs_tree_if.c",
|
||||
"$HDF_FRAMEWORKS_PATH/utils/src/hdf_cstring.c",
|
||||
"$HDF_FRAMEWORKS_PATH/utils/src/hdf_map.c",
|
||||
"$HDF_FRAMEWORKS_PATH/utils/src/hdf_sbuf.c",
|
||||
"$HDF_FRAMEWORKS_PATH/utils/src/hdf_sbuf_impl_raw.c",
|
||||
"$HDF_FRAMEWORKS_PATH/utils/src/hdf_slist.c",
|
||||
"$HDF_FRAMEWORKS_PATH/utils/src/hdf_sref.c",
|
||||
"$HDF_FRAMEWORKS_PATH/support/platform/src/gpio/gpio_core.c",
|
||||
"$HDF_FRAMEWORKS_PATH/support/platform/src/gpio/gpio_manager.c",
|
||||
"$khdf_path/core/common/src/devmgr_service_start.c",
|
||||
"$khdf_path/core/common/src/devsmall_object_config.c",
|
||||
"$khdf_path/core/common/src/hdf_device_node_ext.c",
|
||||
"$khdf_path/osal/src/osal_mem.c",
|
||||
"$khdf_path/osal/src/osal_mutex.c",
|
||||
"$khdf_path/osal/src/osal_sem.c",
|
||||
"$khdf_path/osal/src/osal_spinlock.c",
|
||||
"$khdf_path/osal/src/osal_thread.c",
|
||||
"$khdf_path/osal/src/osal_time.c",
|
||||
"$khdf_path/osal/src/osal_timer.c",
|
||||
"src/bk_gpio_driver.c",
|
||||
"src/bk_i2c_driver.c",
|
||||
"src/bk_uart_driver.c",
|
||||
"src/devmgr_loader.c",
|
||||
]
|
||||
include_dirs = [
|
||||
"include",
|
||||
@@ -106,8 +101,6 @@ static_library("bk_hdf_driver") {
|
||||
"$HDF_FRAMEWORKS_PATH/support/platform/include/fwk",
|
||||
"$HDF_FRAMEWORKS_PATH/support/platform/include/gpio",
|
||||
"//drivers/hdf_core/adapter/khdf/liteos_m/osal/include",
|
||||
|
||||
|
||||
]
|
||||
include_dirs += bk_hal_include_dirs
|
||||
|
||||
|
||||
+108
-46
@@ -1,47 +1,109 @@
|
||||
# Copyright (C) 2022 Beken Corporation
|
||||
# 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
|
||||
# Copyright (C) 2022 Beken Corporation
|
||||
# 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.
|
||||
|
||||
import("//build/lite/config/subsystem/lite_subsystem.gni")
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
module_name = get_path_info(rebase_path("."), "name")
|
||||
module_switch = defined(LOSCFG_BOARD_BK7235X)
|
||||
kernel_module(module_name) {
|
||||
#deps = [ "$product_path/hdf_config:hdf_hcs" ]
|
||||
}
|
||||
|
||||
declare_args() {
|
||||
}
|
||||
|
||||
lite_subsystem("bk_sdk") {
|
||||
subsystem_components = [ ":cjson" ]
|
||||
}
|
||||
|
||||
lite_component("cjson") {
|
||||
features = []
|
||||
|
||||
deps = [
|
||||
"//build/lite/config/component/cJSON:cjson_static",
|
||||
]
|
||||
}
|
||||
|
||||
build_ext_component("run_wifiiot_scons") {
|
||||
exec_path = rebase_path(".",root_build_dir)
|
||||
outdir = rebase_path(root_out_dir)
|
||||
command = "sh build_sdk.sh $outdir"
|
||||
deps = [
|
||||
"//device/soc/beken/bk7235/hals/communication/wifi_lite/wifiservice:wifiservice",
|
||||
"//build/lite:ohos",
|
||||
"adapter"
|
||||
]
|
||||
}
|
||||
|
||||
import("//build/lite/config/subsystem/lite_subsystem.gni")
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
import("${board_adapter_dir}/hals/sdk_dir.gni")
|
||||
|
||||
module_name = get_path_info(rebase_path("."), "name")
|
||||
module_switch = defined(LOSCFG_BOARD_BK7235X)
|
||||
kernel_module(module_name) {
|
||||
deps = [
|
||||
#"$product_path/hdf_config:hdf_hcs",
|
||||
"${third_party_adatpter_path}/arch",
|
||||
"${third_party_adatpter_path}/musl",
|
||||
]
|
||||
}
|
||||
|
||||
declare_args() {
|
||||
}
|
||||
|
||||
config("public") {
|
||||
include_dirs = [
|
||||
"${beken_sdk_dir}/components/bk_ps/include",
|
||||
"${beken_sdk_dir}/components/bk_startup/liteos_m",
|
||||
"${beken_sdk_dir}/components/bk_startup/liteos_m",
|
||||
"${beken_sdk_dir}/components/bk_common/include",
|
||||
"${beken_sdk_dir}/components/bk_ble",
|
||||
"${beken_sdk_dir}/components/media/include",
|
||||
"${beken_sdk_dir}/components/release",
|
||||
"${beken_sdk_dir}/components/bk_libs/include",
|
||||
"${beken_sdk_dir}/components/easy_flash",
|
||||
]
|
||||
include_dirs += bk_hal_include_dirs
|
||||
|
||||
lib_dirs = [ "$root_out_dir/libs" ]
|
||||
ldflags = [
|
||||
"-lc",
|
||||
"-Wl,--cref",
|
||||
|
||||
"-fno-rtti",
|
||||
"-fno-lto",
|
||||
"-T$device_path/bk7235_ota.ld",
|
||||
]
|
||||
defines = [
|
||||
# "WIFI_STATE_NOT_AVALIABLE=WIFI_STATE_NOT_AVAILABLE",
|
||||
]
|
||||
libs = [
|
||||
"sdk_adapter",
|
||||
"gcc",
|
||||
"bt",
|
||||
"wifi",
|
||||
]
|
||||
|
||||
if (build_xts) {
|
||||
ldflags += [
|
||||
"-Wl,--whole-archive",
|
||||
"-lbootstrap",
|
||||
"-lbroadcast",
|
||||
"-lbegetutil",
|
||||
"-lcjson_static",
|
||||
"-lhctest",
|
||||
"-lhal_sysparam",
|
||||
"-lhal_update_static",
|
||||
"-lhota",
|
||||
"-lhuks_test_common",
|
||||
"-linithook",
|
||||
"-lmbedtls_static",
|
||||
"-lmodule_ActsBootstrapTest",
|
||||
"-lmodule_ActsDfxFuncTest",
|
||||
"-lmodule_ActsHieventLiteTest",
|
||||
"-lmodule_ActsHuksHalFunctionTest",
|
||||
|
||||
# "-lmodule_ActsParameterTest",
|
||||
"-lmodule_ActsSamgrTest",
|
||||
"-lmodule_ActsUpdaterFuncTest",
|
||||
"-lmodule_ActsUtilsFileTest",
|
||||
"-lmodule_ActsWifiIotTest",
|
||||
|
||||
#"-lmodule_ActsWifiServiceTest",
|
||||
"-lwifiservice",
|
||||
"-Wl,--no-whole-archive",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
lite_subsystem("bk_sdk") {
|
||||
subsystem_components = [ ":cjson" ]
|
||||
deps = [
|
||||
"adapter",
|
||||
"//build/lite:ohos",
|
||||
"//device/soc/beken/bk7235/hals/communication/wifi_lite/wifiservice:wifiservice",
|
||||
]
|
||||
}
|
||||
|
||||
lite_component("cjson") {
|
||||
features = []
|
||||
|
||||
deps = [ "//build/lite/config/component/cJSON:cjson_static" ]
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,80 +1,75 @@
|
||||
# Copyright (C) 2022 Beken Corporation
|
||||
# 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
|
||||
# Copyright (C) 2022 Beken Corporation
|
||||
# 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.
|
||||
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
import("//build/lite/config/subsystem/lite_subsystem.gni")
|
||||
import("${board_adapter_dir}/hals/sdk_dir.gni")
|
||||
|
||||
declare_args() {
|
||||
HDF_FRAMEWORKS_PATH = "//drivers/hdf_core/framework"
|
||||
}
|
||||
|
||||
static_library("sdk_adapter") {
|
||||
sources = [
|
||||
"sdk_adapter.c",
|
||||
]
|
||||
include_dirs = [
|
||||
"include",
|
||||
"//kernel/liteos_m/kal/cmsis",
|
||||
]
|
||||
include_dirs += [
|
||||
"$HDF_FRAMEWORKS_PATH/include",
|
||||
"$HDF_FRAMEWORKS_PATH/include/osal",
|
||||
"$HDF_FRAMEWORKS_PATH/include/utils",
|
||||
"$HDF_FRAMEWORKS_PATH/utils/include",
|
||||
"$HDF_FRAMEWORKS_PATH/include/platform",
|
||||
"$HDF_FRAMEWORKS_PATH/include/core",
|
||||
"$HDF_FRAMEWORKS_PATH/include/net",
|
||||
"$HDF_FRAMEWORKS_PATH/include/wifi",
|
||||
"$HDF_FRAMEWORKS_PATH/model/network/common/netdevice",
|
||||
"$HDF_FRAMEWORKS_PATH/ability/sbuf/include",
|
||||
"$HDF_FRAMEWORKS_PATH/support/platform/include",
|
||||
"$HDF_FRAMEWORKS_PATH/core/host/include",
|
||||
"$HDF_FRAMEWORKS_PATH/core/manager/include",
|
||||
"$HDF_FRAMEWORKS_PATH/core/shared/include",
|
||||
"$HDF_FRAMEWORKS_PATH/core/common/include/manager",
|
||||
"$HDF_FRAMEWORKS_PATH/core/common/include/host",
|
||||
"$HDF_FRAMEWORKS_PATH/core/adapter/vnode/include",
|
||||
"$HDF_FRAMEWORKS_PATH/core/adapter/syscall/include",
|
||||
|
||||
"$HDF_FRAMEWORKS_PATH/include/platform",
|
||||
"$HDF_FRAMEWORKS_PATH/support/platform/include",
|
||||
"$HDF_FRAMEWORKS_PATH/support/platform/include/fwk",
|
||||
"//drivers/hdf_core/adapter/khdf/liteos_m/osal/include",
|
||||
]
|
||||
include_dirs += bk_hal_include_dirs
|
||||
include_dirs += [
|
||||
"//utils/native/lite/include",
|
||||
"//base/iot_hardware/peripheral/interfaces/kits",
|
||||
]
|
||||
}
|
||||
|
||||
lite_component("adapter") {
|
||||
features = [
|
||||
":sdk_adapter"
|
||||
]
|
||||
|
||||
deps = [
|
||||
"//base/startup/syspara_lite/frameworks/parameter/src:sysparam",
|
||||
"//foundation/systemabilitymgr/samgr_lite/samgr:samgr",
|
||||
"//foundation/systemabilitymgr/samgr_lite/communication/broadcast:broadcast",
|
||||
"//kernel/liteos_m/kal:kal",
|
||||
"//foundation/communication/wifi_lite:wifi",
|
||||
# "//foundation/communication/bluetooth/services/bluetooth:bluetooth",
|
||||
"//base/hiviewdfx/hilog_lite/frameworks/mini:hilog_lite",
|
||||
"//base/hiviewdfx/hievent_lite:hievent_lite",
|
||||
"//base/update/ota_lite/frameworks:ota_lite",
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
import("//build/lite/config/subsystem/lite_subsystem.gni")
|
||||
import("${board_adapter_dir}/hals/sdk_dir.gni")
|
||||
|
||||
declare_args() {
|
||||
HDF_FRAMEWORKS_PATH = "//drivers/hdf_core/framework"
|
||||
}
|
||||
|
||||
static_library("sdk_adapter") {
|
||||
sources = [ "sdk_adapter.c" ]
|
||||
include_dirs = [
|
||||
"include",
|
||||
"//kernel/liteos_m/kal/cmsis",
|
||||
]
|
||||
include_dirs += [
|
||||
"$HDF_FRAMEWORKS_PATH/include",
|
||||
"$HDF_FRAMEWORKS_PATH/include/osal",
|
||||
"$HDF_FRAMEWORKS_PATH/include/utils",
|
||||
"$HDF_FRAMEWORKS_PATH/utils/include",
|
||||
"$HDF_FRAMEWORKS_PATH/include/platform",
|
||||
"$HDF_FRAMEWORKS_PATH/include/core",
|
||||
"$HDF_FRAMEWORKS_PATH/include/net",
|
||||
"$HDF_FRAMEWORKS_PATH/include/wifi",
|
||||
"$HDF_FRAMEWORKS_PATH/model/network/common/netdevice",
|
||||
"$HDF_FRAMEWORKS_PATH/ability/sbuf/include",
|
||||
"$HDF_FRAMEWORKS_PATH/support/platform/include",
|
||||
"$HDF_FRAMEWORKS_PATH/core/host/include",
|
||||
"$HDF_FRAMEWORKS_PATH/core/manager/include",
|
||||
"$HDF_FRAMEWORKS_PATH/core/shared/include",
|
||||
"$HDF_FRAMEWORKS_PATH/core/common/include/manager",
|
||||
"$HDF_FRAMEWORKS_PATH/core/common/include/host",
|
||||
"$HDF_FRAMEWORKS_PATH/core/adapter/vnode/include",
|
||||
"$HDF_FRAMEWORKS_PATH/core/adapter/syscall/include",
|
||||
|
||||
"$HDF_FRAMEWORKS_PATH/include/platform",
|
||||
"$HDF_FRAMEWORKS_PATH/support/platform/include",
|
||||
"$HDF_FRAMEWORKS_PATH/support/platform/include/fwk",
|
||||
"//drivers/hdf_core/adapter/khdf/liteos_m/osal/include",
|
||||
]
|
||||
include_dirs += bk_hal_include_dirs
|
||||
include_dirs += [
|
||||
"//utils/native/lite/include",
|
||||
"//base/iot_hardware/peripheral/interfaces/kits",
|
||||
]
|
||||
}
|
||||
|
||||
lite_component("adapter") {
|
||||
features = [ ":sdk_adapter" ]
|
||||
|
||||
deps = [
|
||||
"//base/hiviewdfx/hievent_lite:hievent_lite",
|
||||
|
||||
# "//foundation/communication/bluetooth/services/bluetooth:bluetooth",
|
||||
"//base/hiviewdfx/hilog_lite/frameworks/mini:hilog_lite",
|
||||
"//base/startup/syspara_lite/frameworks/parameter/src:sysparam",
|
||||
"//base/update/sys_installer_lite/frameworks:sys_installer_lite",
|
||||
"//foundation/communication/wifi_lite:wifi",
|
||||
"//foundation/systemabilitymgr/samgr_lite/communication/broadcast:broadcast",
|
||||
"//foundation/systemabilitymgr/samgr_lite/samgr:samgr",
|
||||
"//kernel/liteos_m/kal:kal",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include "cmsis_os2.h"
|
||||
#include "ohos_types.h"
|
||||
#include "sdkconfig.h"
|
||||
#include "platform.h"
|
||||
#include "bk_cli.h"
|
||||
|
||||
@@ -27,52 +25,51 @@ void HalIrqEnable(uint32 irq_no)
|
||||
set_csr(NDS_MIE, (1<<irq_no));
|
||||
}
|
||||
|
||||
int __wrap_vprintf(const char *fmt, va_list ap)
|
||||
void bk_wrap__ctype_ptr__(void)
|
||||
{
|
||||
int len;
|
||||
char string[128];
|
||||
}
|
||||
void HAL_NVIC_SystemReset(void)
|
||||
{
|
||||
}
|
||||
|
||||
len = __wrap_vsnprintf(string, sizeof(string) - 1, fmt, ap);
|
||||
string[127] = 0;
|
||||
uart_write_string(CONFIG_UART_PRINT_PORT, string);
|
||||
|
||||
return len;
|
||||
#define vprintf_buf_len 128
|
||||
int bk_wrap_vprintf(const char *fmt, va_list ap)
|
||||
{
|
||||
int len;
|
||||
char string[vprintf_buf_len];
|
||||
|
||||
len = __wrap_vsnprintf(string, sizeof(string) - 1, fmt, ap);
|
||||
string[vprintf_buf_len-1] = 0;
|
||||
uart_write_string(CONFIG_UART_PRINT_PORT, string);
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
__attribute__((section(".interrupt.HalTrapVector.text")))
|
||||
void HalSetLocalInterPri(UINT32 interPriNum, UINT16 prior)
|
||||
{
|
||||
__nds__plic_set_priority(interPriNum, prior);
|
||||
__nds__plic_set_priority(interPriNum, prior);
|
||||
}
|
||||
|
||||
static int hdf_log_default_level = 4;
|
||||
|
||||
int hal_trace_printf(int attr, const char *fmt, ...)
|
||||
{
|
||||
if (attr <= hdf_log_default_level) {
|
||||
va_list ap;
|
||||
int len;
|
||||
char string[128];
|
||||
if (attr <= hdf_log_default_level) {
|
||||
va_list ap;
|
||||
int len;
|
||||
char string[vprintf_buf_len];
|
||||
|
||||
va_start(ap, fmt);
|
||||
len = __wrap_vsnprintf(string, sizeof(string) - 1, fmt, ap);
|
||||
string[127] = 0;
|
||||
uart_write_string(CONFIG_UART_PRINT_PORT, string);
|
||||
va_end(ap);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
unsigned int __stack_chk_guard = 0xd00a0dff;
|
||||
|
||||
void __stack_chk_fail(VOID)
|
||||
{
|
||||
printf("here you go!!!\n");
|
||||
printf("add is %lu\n", __builtin_return_address(0));
|
||||
va_start(ap, fmt);
|
||||
len = __wrap_vsnprintf(string, sizeof(string) - 1, fmt, ap);
|
||||
string[sizeof(string)-1] = 0;
|
||||
uart_write_string(CONFIG_UART_PRINT_PORT, string);
|
||||
va_end(ap);
|
||||
}
|
||||
}
|
||||
|
||||
ssize_t _write(int filedes, const void *buf, size_t nbytes)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* This file is generated by nds_ldsag (version (2021-12-20) ). */
|
||||
ENTRY(_start)
|
||||
START_AND_IRQ_STACK_SIZE = 8K;
|
||||
SECTIONS
|
||||
{
|
||||
PROVIDE (__executable_start = 0x00000000);
|
||||
@@ -73,8 +74,11 @@ SECTIONS
|
||||
CPU0_LOAD2_BEGIN = NDS_SAG_LMA_CPU0_LOAD2;
|
||||
. = 0 + NDS_SAG_LMA_CPU0_LOAD2;
|
||||
.interrupt.text . : AT(NDS_SAG_LMA_CPU0_LOAD2) { KEEP(*(.interrupt.text )) }
|
||||
.interrupt.HalTrapVector.text : AT(LOADADDR (.interrupt.text) + SIZEOF (.interrupt.text))
|
||||
{ KEEP(*(.interrupt.HalTrapVector.text )) }
|
||||
|
||||
. = ALIGN(8);
|
||||
. = ALIGN(ALIGNOF(.interrupt.HalTrapVector.text));
|
||||
.interrupt.HalTrapVector.text : AT(ALIGN(ALIGN(LOADADDR (.interrupt.text) + SIZEOF (.interrupt.text), ALIGNOF(.interrupt.HalTrapVector.text )), 8))
|
||||
{ *(.interrupt.HalTrapVector.text ) }
|
||||
.itcm : AT(LOADADDR (.interrupt.HalTrapVector.text) + SIZEOF (.interrupt.HalTrapVector.text))
|
||||
{ KEEP(*(.itcm )) }
|
||||
. = ALIGN(8);
|
||||
@@ -457,6 +461,8 @@ SECTIONS
|
||||
PROVIDE (end = .);
|
||||
PROVIDE (_stack = 0x20007FE0);
|
||||
SRAM_DATA_SIZE = . - SRAM_DATA_BEGIN;
|
||||
__start_and_irq_stack_top = _stack;
|
||||
__except_stack_top = __start_and_irq_stack_top - START_AND_IRQ_STACK_SIZE;
|
||||
CPU0_LOAD2_SIZE = LOADADDR(.sdata_f) + SIZEOF(.sdata_f) - CPU0_LOAD2_BEGIN;
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
EXEC_PATH=$(cd "$(dirname "$0")"&&pwd)
|
||||
OUTPUT_DST_DIR=$1
|
||||
|
||||
export OUTPUT_DST_DIR
|
||||
|
||||
beken_chip_type=bk7235
|
||||
|
||||
echo "begin sdk build..."
|
||||
rm -rf $EXEC_PATH/build
|
||||
mkdir -p $EXEC_PATH/build
|
||||
make -C $EXEC_PATH -f Makefile all
|
||||
|
||||
if [ -f build/${beken_chip_type}_sdk_crc.bin ]; then
|
||||
cp build/${beken_chip_type}_sdk_crc.bin $OUTPUT_DST_DIR/${beken_chip_type}_sdk_crc.bin
|
||||
fi
|
||||
if [ -f build/all_2M.1220.bin ]; then
|
||||
cp build/all_2M.1220.bin $OUTPUT_DST_DIR/${beken_chip_type}_sdk_ota.bin
|
||||
fi
|
||||
|
||||
echo "finsh sdk build."
|
||||
+121
-96
@@ -1,97 +1,122 @@
|
||||
# Copyright (C) 2022 Beken Corporation
|
||||
# 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
|
||||
# Copyright (C) 2022 Beken Corporation
|
||||
# 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"
|
||||
|
||||
# Board CPU type, e.g. "cortex-a7", "riscv32".
|
||||
board_cpu = ""
|
||||
|
||||
# Board arch, e.g. "armv7-a", "rv32imac".
|
||||
board_arch = "rv32imac"
|
||||
|
||||
# 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 toolchain.
|
||||
board_toolchain = "riscv32-unknown-elf"
|
||||
|
||||
# The toolchain path installed, it's not mandatory if you have added toolchain path to your ~/.bashrc.
|
||||
board_toolchain_path = ""
|
||||
|
||||
# Compiler prefix.
|
||||
board_toolchain_prefix = "riscv32-unknown-elf-"
|
||||
|
||||
# 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
|
||||
xts_list = product_conf.xts_list
|
||||
tests_list = product_conf.tests_list
|
||||
}
|
||||
# Board related common compile flags.
|
||||
board_cflags = [
|
||||
"-std=c99",
|
||||
"-mstrict-align",
|
||||
"-Wl,--gc-sections",
|
||||
"-ffunction-sections",
|
||||
"-fdata-sections",
|
||||
"-D__LITEOS__",
|
||||
"-DCFG_SUPPORT_LITEOS",
|
||||
"-DBEKEN_PLATFORM",
|
||||
"-Wno-strict-prototypes",
|
||||
"-Wno-parentheses",
|
||||
|
||||
]
|
||||
board_cxx_flags = board_cflags
|
||||
board_ld_flags = []
|
||||
board_asmflags = []
|
||||
|
||||
beken_chip_type = "bk7235"
|
||||
soc_company = "beken"
|
||||
beken_sdk_dir = "${ohos_root_path}/device/soc/${soc_company}/${beken_chip_type}/liteos_m/bk_sdk_armino"
|
||||
extra_include_dir = "${ohos_root_path}/device/soc/${soc_company}/${beken_chip_type}/liteos_m/inc"
|
||||
|
||||
# Board related headfiles search path.
|
||||
board_include_dirs = [
|
||||
"${extra_include_dir}",
|
||||
"${ohos_root_path}utils/native/lite/include",
|
||||
"${ohos_root_path}third_party/bounds_checking_function/include",
|
||||
"${ohos_root_path}kernel/liteos_m/config",
|
||||
"${ohos_root_path}kernel/liteos_m/kal/cmsis",
|
||||
"${ohos_root_path}kernel/liteos_m/utils",
|
||||
"${ohos_root_path}kernel/liteos_m/components/cpup",
|
||||
"${ohos_root_path}kernel/liteos_m/components/power",
|
||||
"${ohos_root_path}kernel/liteos_m/kernel/include",
|
||||
"${ohos_root_path}kernel/liteos_m/arch/include",
|
||||
"${ohos_root_path}kernel/liteos_m/arch/risc-v/riscv32/gcc",
|
||||
"${ohos_root_path}kernel/liteos_m/arch/risc-v/riscv32/gcc/asm",
|
||||
"${ohos_root_path}third_party/musl/porting/liteos_m/kernel/include",
|
||||
|
||||
"${beken_sdk_dir}/build/openharmony/${beken_chip_type}/config",
|
||||
|
||||
]
|
||||
|
||||
# Board adapter dir for OHOS components.
|
||||
board_adapter_dir = "${ohos_root_path}device/soc/${soc_company}/${beken_chip_type}"
|
||||
|
||||
# Sysroot path.
|
||||
board_configed_sysroot = ""
|
||||
|
||||
# Board storage type, it used for file system generation.
|
||||
storage_type = ""
|
||||
|
||||
# Kernel type, e.g. "linux", "liteos_a", "liteos_m".
|
||||
kernel_type = "liteos_m"
|
||||
|
||||
# Kernel version.
|
||||
kernel_version = "3.0"
|
||||
|
||||
# Board CPU type, e.g. "cortex-a7", "riscv32".
|
||||
board_cpu = ""
|
||||
|
||||
# Board arch, e.g. "armv7-a", "rv32imac".
|
||||
board_arch = "rv32imac"
|
||||
|
||||
# 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 toolchain.
|
||||
board_toolchain = "riscv32-unknown-elf"
|
||||
|
||||
# The toolchain path installed, it's not mandatory if you have added toolchain path to your ~/.bashrc.
|
||||
board_toolchain_path = ""
|
||||
|
||||
# Compiler prefix.
|
||||
board_toolchain_prefix = "riscv32-unknown-elf-"
|
||||
|
||||
# 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
|
||||
xts_list = product_conf.xts_list
|
||||
tests_list = product_conf.tests_list
|
||||
}
|
||||
|
||||
# Board related common compile flags.not in --start-group
|
||||
board_cflags = [
|
||||
"-std=c99",
|
||||
"-mstrict-align",
|
||||
"-Wl,--gc-sections",
|
||||
"-ffunction-sections",
|
||||
"-fdata-sections",
|
||||
"-D__LITEOS__",
|
||||
"-DCFG_SUPPORT_LITEOS",
|
||||
"-DBEKEN_PLATFORM",
|
||||
"-Wno-strict-prototypes",
|
||||
"-Wno-parentheses",
|
||||
"-nostdlib",
|
||||
"-Wl,-wrap,strlen",
|
||||
"-Wl,-wrap,malloc",
|
||||
"-Wl,-wrap,_malloc_r",
|
||||
"-Wl,-wrap,free",
|
||||
"-Wl,-wrap,_free_r",
|
||||
"-Wl,-wrap,zalloc",
|
||||
"-Wl,-wrap,calloc",
|
||||
"-Wl,-wrap,realloc",
|
||||
"-Wl,-wrap,_realloc_r",
|
||||
"-Wl,-wrap,printf",
|
||||
"-Wl,-wrap,vsnprintf",
|
||||
"-Wl,-wrap,snprintf",
|
||||
"-Wl,-wrap,sprintf",
|
||||
"-Wl,-wrap,puts",
|
||||
"-Wl,--defsym,vprintf=bk_wrap_vprintf",
|
||||
"-Wl,--defsym,__ctype_ptr__=bk_wrap__ctype_ptr__",
|
||||
"-Wl,-wrap,strncmp",
|
||||
"-Wl,-wrap,HalTrapEntry",
|
||||
"-Wl,-wrap,HalTrapVector",
|
||||
"-Wl,--defsym,memcpy=memcpy_ss",
|
||||
"-Wl,--defsym,memcmp=memcmp_ss",
|
||||
"-Wl,--defsym,siprintf=sprintf",
|
||||
"-Wl,--defsym,sniprintf=snprintf",
|
||||
]
|
||||
board_cxx_flags = board_cflags
|
||||
board_ld_flags = []
|
||||
board_asmflags = []
|
||||
|
||||
beken_chip_type = "bk7235"
|
||||
soc_company = "beken"
|
||||
beken_sdk_dir = "${ohos_root_path}/device/soc/${soc_company}/${beken_chip_type}/liteos_m/bk_sdk_armino"
|
||||
extra_include_dir = "${ohos_root_path}/device/soc/${soc_company}/${beken_chip_type}/liteos_m/inc"
|
||||
third_party_adatpter_path = "${ohos_root_path}/device/soc/${soc_company}/${beken_chip_type}/liteos_m/third_party_adapter"
|
||||
|
||||
# Board related headfiles search path.
|
||||
board_include_dirs = [
|
||||
"${extra_include_dir}",
|
||||
"${ohos_root_path}utils/native/lite/include",
|
||||
"${ohos_root_path}third_party/bounds_checking_function/include",
|
||||
"${ohos_root_path}kernel/liteos_m/config",
|
||||
"${ohos_root_path}kernel/liteos_m/kal/cmsis",
|
||||
"${ohos_root_path}kernel/liteos_m/utils",
|
||||
"${ohos_root_path}kernel/liteos_m/components/cpup",
|
||||
"${ohos_root_path}kernel/liteos_m/components/power",
|
||||
"${ohos_root_path}kernel/liteos_m/kernel/include",
|
||||
"${ohos_root_path}kernel/liteos_m/arch/include",
|
||||
"${ohos_root_path}kernel/liteos_m/arch/risc-v/riscv32/gcc",
|
||||
"${ohos_root_path}kernel/liteos_m/arch/risc-v/riscv32/gcc/asm",
|
||||
"${ohos_root_path}third_party/musl/porting/liteos_m/kernel/include",
|
||||
|
||||
"${beken_sdk_dir}/build/openharmony/${beken_chip_type}/config",
|
||||
]
|
||||
|
||||
# Board adapter dir for OHOS components.
|
||||
board_adapter_dir =
|
||||
"${ohos_root_path}device/soc/${soc_company}/${beken_chip_type}"
|
||||
|
||||
# Sysroot path.
|
||||
board_configed_sysroot = ""
|
||||
|
||||
# Board storage type, it used for file system generation.
|
||||
storage_type = ""
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/usr/bin/sh
|
||||
if [ $# != 1 ]; then
|
||||
echo "no dir param"
|
||||
exit 1
|
||||
fi
|
||||
SDK_LIBS_DIR=$1
|
||||
SDK_LIBS=$(ls $SDK_LIBS_DIR)
|
||||
#SDK_LIBS=$(basename $SDK_LIBS)
|
||||
RESULT=$(echo $SDK_LIBS | sed 's/libbk7236_sdk.a//' | sed 's/\.a//g' | sed 's/lib/-l/g')
|
||||
echo $RESULT
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
"parts": {
|
||||
"device_bk7235x": {
|
||||
"module_list": [
|
||||
"//device/board/beken/bk7235x:bk7235x_group"
|
||||
"//device/soc/beken/bk7235:build_7235_sdk"
|
||||
]
|
||||
}
|
||||
},
|
||||
"subsystem": "device_bk7235x"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user