Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bee4 test #36973

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
path = third_party/freertos/repo
url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git
branch = V10.3.1-kernel-only
platforms = ameba,cc13xx_26xx,bouffalolab,esp32,infineon,qpg,cc32xx
platforms = ameba,cc13xx_26xx,bouffalolab,esp32,infineon,qpg,cc32xx,realtek_bee
[submodule "simw-top-mini"]
path = third_party/simw-top-mini/repo
url = https://github.com/NXP/plug-and-trust.git
Expand Down Expand Up @@ -349,3 +349,7 @@
path = third_party/re2/src
url = https://github.com/google/re2.git
platforms = linux,darwin
[submodule "third_party/openthread/ot-realtek"]
path = third_party/openthread/ot-realtek
url = https://github.com/rtkconnectivity/ot-realtek.git
platforms = realtek_bee
18 changes: 18 additions & 0 deletions build_overrides/bee_sdk.gni
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) 2020-2021 Project CHIP Authors
#
# 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.

declare_args() {
# Root directory for Bee SDK.
bee_sdk_build_root = "//third_party/bee_sdk"
}
28 changes: 28 additions & 0 deletions config/realtek_bee/.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright (c) 2020 Project CHIP Authors
#
# 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_overrides/build.gni")

# The location of the build configuration file.
buildconfig = "${build_root}/config/BUILDCONFIG.gn"

# CHIP uses angle bracket includes.
check_system_includes = true

default_args = {
target_cpu = "arm"
target_os = "freertos"

import("//args.gni")
}
37 changes: 37 additions & 0 deletions config/realtek_bee/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright (c) 2020 Project CHIP Authors
#
# 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.

# Options from standalone-chip.mk that differ from configure defaults. These
# options are used from examples/.

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")

import("${chip_root}/build/chip/tests.gni")

declare_args() {
chip_build_pw_rpc_lib = false
}

group("realtek_bee") {
deps = [ "${chip_root}/src/lib" ]

if (chip_build_pw_rpc_lib) {
deps += [ "//lib/pw_rpc" ]
}

if (chip_build_tests) {
deps += [ "${chip_root}/src:tests" ]
}
}
44 changes: 44 additions & 0 deletions config/realtek_bee/app/bootloader.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#
# Copyright (c) 2023 Project CHIP Authors
#
# 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.
#

# Enable this option in case if restoring the slot0 partition is expected from slot1
# partition in case if slot0 is not bootable or damaged
CONFIG_BOOT_BOOTSTRAP=y

# Enable this option in case if SWAP_MOVE logic need to be used
CONFIG_BOOT_SWAP_USING_MOVE=y

# Enable this option in case if SWAP_MOVE using scratch logic need to be used
# Enabling this option expecting the availability of scratch partition in DTS
CONFIG_BOOT_SWAP_USING_SCRATCH=n

# Enable this option in case if the whole slot0 image need to be validated
# With disabled option the only image magic is validated
CONFIG_BOOT_VALIDATE_SLOT0=y

# Maximum number of image sectors supported by the bootloader.
CONFIG_BOOT_MAX_IMG_SECTORS=4096

# Sets log level for modules which don't specify it explicitly.
# When set to 0 it means log will not be activated for those modules.
# Levels are:
# - 0 OFF, do not write by default
# - 1 ERROR, default to only write LOG_LEVEL_ERR
# - 2 WARNING, default to write LOG_LEVEL_WRN
# - 3 INFO, default to write LOG_LEVEL_INFO
# - 4 DEBUG, default to write LOG_LEVEL_DBG
CONFIG_LOG_DEFAULT_LEVEL=1

19 changes: 19 additions & 0 deletions config/realtek_bee/app/enable-gnu-std.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
# Copyright (c) 2021 Project CHIP Authors
#
# 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.
#

add_library(gnu17 INTERFACE)
target_compile_options(gnu17 INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-std=gnu++17> $<$<COMPILE_LANGUAGE:CXX>:-Wno-register> -D_DEFAULT_SOURCE)
target_link_libraries(app PRIVATE gnu17)
54 changes: 54 additions & 0 deletions config/realtek_bee/args.gni
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Copyright (c) 2020 Project CHIP Authors
#
# 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.

# Options from standalone-chip.mk that differ from configure defaults. These
# options are used from examples/.

import("//build_overrides/chip.gni")
import("//build_overrides/pigweed.gni")

chip_device_platform = "realtek_bee"

# ARM architecture flags will be set for Bee
arm_platform_config = "${chip_root}/config/realtek_bee/bee_arm.gni"

chip_project_config_include = ""
chip_system_project_config_include = ""
chip_ble_project_config_include = ""

mbedtls_target = "//mbedtls:mbedtls"
lwip_platform = "external"

chip_build_tests = false

chip_enable_openthread = true

chip_inet_config_enable_ipv4 = false
chip_inet_config_enable_tcp_endpoint = false
chip_enable_nfc = false
chip_build_libshell = false
chip_enable_ota_requestor = false
#chip_inet_config_enable_tcp_endpoint = true
#chip_inet_config_enable_udp_endpoint = true
#chip_system_config_use_open_thread_inet_endpoints = true
#chip_with_lwip = false
openthread_root = ""

chip_config_network_layer_ble = true

custom_toolchain = "//third_party/connectedhomeip/config/realtek_bee/toolchain:realtek_bee"

#pw_build_PIP_CONSTRAINTS =
# [ "//third_party/connectedhomeip/scripts/setup/constraints.txt" ]
#cpp_standard = "c++17"
22 changes: 22 additions & 0 deletions config/realtek_bee/bee_arm.gni
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright (c) 2020 Project CHIP Authors
#
# 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.



arm_arch = "armv8.1-m.main+dsp+mve+fp"
#arm_abi = "aapcs"
#arm_cpu = "cortex-m4"

arm_float_abi = "hard"
#arm_fpu = "fpv5-sp-d16"
1 change: 1 addition & 0 deletions config/realtek_bee/build
1 change: 1 addition & 0 deletions config/realtek_bee/build_overrides
29 changes: 29 additions & 0 deletions config/realtek_bee/chip-gn/.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (c) 2021 Project CHIP Authors
#
# 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_overrides/build.gni")
import("//build_overrides/chip.gni")

# The location of the build configuration file.
buildconfig = "${build_root}/config/BUILDCONFIG.gn"

# CHIP uses angle bracket includes.
check_system_includes = true

default_args = {
target_cpu = "arm"
target_os = "zephyr"

import("${chip_root}/config/realtek_bee/chip-gn/args.gni")
}
40 changes: 40 additions & 0 deletions config/realtek_bee/chip-gn/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Copyright (c) 2022 Project CHIP Authors
#
# 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_overrides/build.gni")
import("//build_overrides/chip.gni")

import("${chip_root}/build/chip/tests.gni")

assert(current_os == "zephyr")

declare_args() {
chip_build_example_providers = false
}

group("realtek_bee_zephyr") {
deps = [ "${chip_root}/src/lib" ]

if (chip_build_tests) {
deps += [ "${chip_root}/src:tests" ]
}

if (chip_build_example_providers) {
deps += [ "${chip_root}/examples/providers:device_info_provider" ]
}
}

group("default") {
deps = [ ":realtek_bee_zephyr" ]
}
32 changes: 32 additions & 0 deletions config/realtek_bee/chip-gn/args.gni
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright (c) 2021 Project CHIP Authors
#
# 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_overrides/chip.gni")

import("${chip_root}/src/crypto/crypto.gni")

chip_device_platform = "realtek_bee_zephyr"

chip_build_tests = false

chip_project_config_include = ""
chip_system_project_config_include = ""
chip_ble_project_config_include = ""

chip_crypto = "mbedtls"
chip_external_mbedtls = true

custom_toolchain = "${chip_root}/config/realtek_bee/chip-gn/toolchain:zephyr"

pw_build_PIP_CONSTRAINTS = [ "${chip_root}/scripts/setup/constraints.txt" ]
34 changes: 34 additions & 0 deletions config/realtek_bee/chip-gn/toolchain/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright (c) 2021 Project CHIP Authors
#
# 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_overrides/build.gni")

import("${build_root}/toolchain/arm_gcc/arm_toolchain.gni")

declare_args() {
zephyr_ar = ""
zephyr_cc = ""
zephyr_cxx = ""
}

gcc_toolchain("zephyr") {
ar = zephyr_ar
cc = zephyr_cc
cxx = zephyr_cxx

toolchain_args = {
current_os = "zephyr"
is_clang = false
}
}
Loading
Loading