Skip to content

Commit 9864580

Browse files
authored
[Realtek] Adjust files struct (project-chip#39239)
* [Realtek] Adjust files struct * [Realtek] restore chip_device_platform * [Realtek] Restyle files
1 parent 70e4e7e commit 9864580

188 files changed

Lines changed: 8716 additions & 1806 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
path = third_party/freertos/repo
5151
url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git
5252
branch = V10.3.1-kernel-only
53-
platforms = ameba,cc13xx_26xx,bouffalolab,esp32,infineon,qpg,cc32xx,realtek_bee
53+
platforms = ameba,cc13xx_26xx,bouffalolab,esp32,infineon,qpg,cc32xx,realtek
5454
[submodule "simw-top-mini"]
5555
path = third_party/simw-top-mini/repo
5656
url = https://github.com/NXP/plug-and-trust.git
@@ -353,4 +353,4 @@
353353
[submodule "third_party/openthread/ot-realtek"]
354354
path = third_party/openthread/ot-realtek
355355
url = https://github.com/rtkconnectivity/ot-realtek.git
356-
platforms = realtek_bee
356+
platforms = realtek
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import("//build_overrides/build.gni")
1616

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

2020
# CHIP uses angle bracket includes.
2121
check_system_includes = true
@@ -24,5 +24,5 @@ default_args = {
2424
target_cpu = "arm"
2525
target_os = "freertos"
2626

27-
import("//args.gni")
27+
import("//config/realtek/bee/args.gni")
2828
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@
1818
import("//build_overrides/build.gni")
1919
import("//build_overrides/chip.gni")
2020

21-
import("${chip_root}/build/chip/tests.gni")
21+
import("//build/chip/tests.gni")
2222

2323
declare_args() {
2424
chip_build_pw_rpc_lib = false
2525
}
2626

27-
group("realtek_bee") {
28-
deps = [ "${chip_root}/src/lib" ]
27+
group("bee") {
28+
deps = [ "//src/lib" ]
2929

3030
if (chip_build_pw_rpc_lib) {
31-
deps += [ "//lib/pw_rpc" ]
31+
deps += [ "//config/realtek/bee/lib/pw_rpc" ]
3232
}
3333

3434
if (chip_build_tests) {
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ import("//build_overrides/pigweed.gni")
2121
chip_device_platform = "realtek_bee"
2222

2323
# ARM architecture flags will be set for Bee
24-
arm_platform_config = "${chip_root}/config/realtek_bee/bee_arm.gni"
24+
arm_platform_config = "//config/realtek/bee/bee_arm.gni"
2525

2626
chip_project_config_include = ""
2727
chip_system_project_config_include = ""
2828
chip_ble_project_config_include = ""
2929

30-
mbedtls_target = "//mbedtls:mbedtls"
30+
mbedtls_target = "//config/realtek/bee/mbedtls:mbedtls"
3131
lwip_platform = "external"
3232

3333
chip_build_tests = false
@@ -43,8 +43,7 @@ chip_enable_ota_requestor = false
4343
chip_system_config_use_openthread_inet_endpoints = true
4444
chip_with_lwip = false
4545
openthread_root = ""
46-
chip_openthread_target = "${chip_root}/config/realtek_bee/openthread:openthread"
46+
chip_openthread_target = "//config/realtek/bee/openthread:openthread"
4747

4848
chip_config_network_layer_ble = true
49-
custom_toolchain =
50-
"//third_party/connectedhomeip/config/realtek_bee/toolchain:realtek_bee"
49+
custom_toolchain = "//config/realtek/bee/toolchain:bee"
Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ list(
2323
-DCHIP_PROJECT=1
2424
-DCONFIG_USE_MBEDTLS_ROM_ALG
2525
-DDM_ODM_SUPPORT_TYPE=32
26-
-DCHIP_DEVICE_LAYER_TARGET=Realtek_bee
2726
-D_POSIX_REALTIME_SIGNALS
2827
-DCHIP_SHELL_MAX_TOKENS=11
2928
)
@@ -58,13 +57,13 @@ list(
5857
APPEND CHIP_INC
5958

6059
${inc_path}
61-
${CHIP_ROOT}/config/realtek_bee
60+
${CHIP_ROOT}/config/realtek/bee
6261
${CHIP_ROOT}/src/include
6362
${CHIP_ROOT}/src/lib
6463
${CHIP_ROOT}/src
6564
${CHIP_ROOT}/src/system
6665
${CHIP_ROOT}/src/app
67-
${CHIP_ROOT}/src/platform/Realtek_bee
66+
${CHIP_ROOT}/src/platform/realtek/BEE
6867
${CHIP_ROOT}/src/platform/OpenThread
6968
${CHIP_ROOT}/third_party/nlassert/repo/include
7069
${CHIP_ROOT}/third_party/nlio/repo/include
@@ -101,7 +100,7 @@ foreach(tmp IN LISTS GLOBAL_CXX_FLAGS)
101100
endforeach()
102101
string(APPEND chip_cpp_flags "${chip_c_flags}")
103102

104-
set(import_str "import(\"//args.gni\")\n" )
103+
set(import_str "import(\"//config/realtek/bee/args.gni\")\n" )
105104

106105
string(APPEND CHIP_GN_ARGS "${import_str}")
107106

@@ -134,12 +133,12 @@ endif (matter_enable_persistentstorage_audit)
134133
# Build RPC
135134
if (matter_enable_rpc)
136135
string(APPEND CHIP_GN_ARGS "chip_build_pw_rpc_lib = true\n")
137-
string(APPEND CHIP_GN_ARGS "pw_log_BACKEND = \"//third_party/connectedhomeip/third_party/pigweed/repo/pw_log_basic\"\n")
138-
string(APPEND CHIP_GN_ARGS "pw_assert_BACKEND = \"//third_party/connectedhomeip/third_party/pigweed/repo/pw_assert_log:check_backend\"\n")
139-
string(APPEND CHIP_GN_ARGS "pw_sys_io_BACKEND = \"//third_party/connectedhomeip/examples/platform/realtek_bee/pw_sys_io:pw_sys_io_bee\"\n")
140-
string(APPEND CHIP_GN_ARGS "dir_pw_third_party_nanopb = \"//third_party/connectedhomeip/third_party/nanopb/repo\"\n")
141-
string(APPEND CHIP_GN_ARGS "pw_build_LINK_DEPS = [\"//third_party/connectedhomeip/third_party/pigweed/repo/pw_assert:impl\", \"//third_party/connectedhomeip/third_party/pigweed/repo/pw_log:impl\"]\n")
142-
string(APPEND CHIP_GN_ARGS "pw_rpc_CONFIG = \"//third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc:disable_global_mutex\"")
136+
string(APPEND CHIP_GN_ARGS "pw_log_BACKEND = \"//third_party/pigweed/repo/pw_log_basic\"\n")
137+
string(APPEND CHIP_GN_ARGS "pw_assert_BACKEND = \"//third_party/pigweed/repo/pw_assert_log:check_backend\"\n")
138+
string(APPEND CHIP_GN_ARGS "pw_sys_io_BACKEND = \"//examples/platform/realtek/bee/pw_sys_io:pw_sys_io_bee\"\n")
139+
string(APPEND CHIP_GN_ARGS "dir_pw_third_party_nanopb = \"//third_party/nanopb/repo\"\n")
140+
string(APPEND CHIP_GN_ARGS "pw_build_LINK_DEPS = [\"//third_party/pigweed/repo/pw_assert:impl\", \"//third_party/pigweed/repo/pw_log:impl\"]\n")
141+
string(APPEND CHIP_GN_ARGS "pw_rpc_CONFIG = \"//third_party/pigweed/repo/pw_rpc:disable_global_mutex\"")
143142
endif (matter_enable_rpc)
144143

145144
if(matter_enable_ftd)
@@ -182,12 +181,19 @@ ExternalProject_Add(
182181
PREFIX ${CMAKE_CURRENT_BINARY_DIR}
183182
SOURCE_DIR ${CHIP_ROOT}
184183
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}
185-
CONFIGURE_COMMAND gn --root=${CHIP_ROOT}/config/realtek_bee gen --check --fail-on-unused-args ${CHIP_OUTPUT}
186-
BUILD_COMMAND ninja -C ${CHIP_OUTPUT} :realtek_bee
184+
CONFIGURE_COMMAND gn
185+
--root=${CHIP_ROOT}
186+
--root-target=${CHIP_ROOT}/config/realtek/bee
187+
--dotfile=${CHIP_ROOT}/config/realtek/bee/.gn
188+
gen
189+
--check
190+
--fail-on-unused-args
191+
"${CHIP_OUTPUT}"
192+
BUILD_COMMAND ninja -C "${CHIP_OUTPUT}" bee
187193
INSTALL_COMMAND ""
188194
BUILD_BYPRODUCTS -lCHIP -lPwRpc
189-
CONFIGURE_ALWAYS TRUE
195+
CONFIGURE_ALWAYS TRUE
190196
BUILD_ALWAYS TRUE
191197
USES_TERMINAL_CONFIGURE TRUE
192198
USES_TERMINAL_BUILD TRUE
193-
)
199+
)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ static_library("pw_rpc") {
2323
deps = [
2424
"$dir_pw_rpc:server",
2525
"$dir_pw_rpc/nanopb:echo_service",
26-
"${chip_root}/examples/platform/realtek_bee/pw_sys_io:pw_sys_io_bee",
26+
"${chip_root}/examples/platform/realtek/bee/pw_sys_io:pw_sys_io_bee",
2727
dir_pw_assert,
2828
dir_pw_hdlc,
2929
dir_pw_log,
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ declare_args() {
2424
bee_cpu = ""
2525
}
2626

27-
gcc_toolchain("realtek_bee") {
27+
gcc_toolchain("bee") {
2828
ar = bee_ar
2929
cc = bee_cc
3030
cxx = bee_cxx
@@ -33,6 +33,6 @@ gcc_toolchain("realtek_bee") {
3333
current_os = "freertos"
3434
current_cpu = bee_cpu
3535
is_clang = false
36-
import("${chip_root}/src/platform/Realtek_bee/args.gni")
36+
import("${chip_root}/src/platform/realtek/BEE/args.gni")
3737
}
3838
}

0 commit comments

Comments
 (0)