Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… into OTA_test
  • Loading branch information
mykrupp committed Feb 17, 2022
2 parents 5f2ebc1 + c098a0d commit 46828f9
Show file tree
Hide file tree
Showing 306 changed files with 11,964 additions and 44,837 deletions.
110 changes: 108 additions & 2 deletions .github/.wordlist.txt

Large diffs are not rendered by default.

20 changes: 14 additions & 6 deletions .github/workflows/android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,23 @@ jobs:
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Build Android CHIPTool and CHIPTest
- name: Build Android CHIPTool and CHIPTest (ARM)
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-{arm,arm64}-chip-*' build"
# - name: Build Android Studio build (arm64 only)
# run: |
# ./scripts/run_in_build_env.sh \
# "./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-androidstudio-arm64-chip-tool' build"
"./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-arm-chip-*' build"
- name: Clean out build output
run: rm -rf ./out
- name: Build Android CHIPTool and CHIPTest (ARM64)
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-arm64-chip-*' build"
- name: Run Android build rule tests
run: |
./scripts/run_in_build_env.sh \
"ninja -C out/android-arm64-chip-tool build/chip/java/tests:java_build_test.tests"
- name: Clean out build output
run: rm -rf ./out
# - name: Build Android Studio build (arm64 only)
# run: |
# ./scripts/run_in_build_env.sh \
# "./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-androidstudio-arm64-chip-tool' build"
6 changes: 3 additions & 3 deletions .github/workflows/examples-linux-imx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ jobs:
submodules: true

- name: Build App
timeout-minutes: 10
timeout-minutes: 30
run: |
./scripts/examples/imxlinux_example.sh \
examples/lighting-app/linux/ examples/lighting-app/linux/out/aarch64
- name: Build chip-tool
timeout-minutes: 10
timeout-minutes: 30
run: |
./scripts/examples/imxlinux_example.sh \
examples/chip-tool examples/chip-tool/out/aarch64
examples/chip-tool examples/chip-tool/out/aarch64
6 changes: 3 additions & 3 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -436,19 +436,19 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {

if (enable_k32w_lighting_app_build) {
group("k32w_lighting_app") {
deps = [ "${chip_root}/examples/lighting-app/k32w(${chip_root}/config/k32w/toolchain:k32w_lighting_app)" ]
deps = [ "${chip_root}/examples/lighting-app/nxp/k32w/k32w0/(${chip_root}/config/k32w/toolchain:k32w_lighting_app)" ]
}
}

if (enable_k32w_lock_app_build) {
group("k32w_lock_app") {
deps = [ "${chip_root}/examples/lock-app/k32w(${chip_root}/config/k32w/toolchain:k32w_lock_app)" ]
deps = [ "${chip_root}/examples/lock-app/nxp/k32w/k32w0/(${chip_root}/config/k32w/toolchain:k32w_lock_app)" ]
}
}

if (enable_k32w_shell_app_build) {
group("k32w_shell_app") {
deps = [ "${chip_root}/examples/shell/k32w(${chip_root}/config/k32w/toolchain:k32w_shell_app)" ]
deps = [ "${chip_root}/examples/shell/nxp/k32w/k32w0/(${chip_root}/config/k32w/toolchain:k32w_shell_app)" ]
}
}

Expand Down
6 changes: 3 additions & 3 deletions config/k32w/toolchain/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ import("${build_root}/toolchain/arm_gcc/arm_toolchain.gni")
arm_toolchain("k32w_lighting_app") {
toolchain_args = {
current_os = "freertos"
import("${chip_root}/examples/lighting-app/k32w/args.gni")
import("${chip_root}/examples/lighting-app/nxp/k32w/k32w0/args.gni")
}
}

arm_toolchain("k32w_lock_app") {
toolchain_args = {
current_os = "freertos"
import("${chip_root}/examples/lock-app/k32w/args.gni")
import("${chip_root}/examples/lock-app/nxp/k32w/k32w0/args.gni")
}
}

arm_toolchain("k32w_shell_app") {
toolchain_args = {
current_os = "freertos"
import("${chip_root}/examples/shell/k32w/args.gni")
import("${chip_root}/examples/shell/nxp/k32w/k32w0/args.gni")
}
}
68 changes: 41 additions & 27 deletions config/mbed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ string(APPEND CHIP_GN_ARGS)

# C/C++ compiler flags which should not be forwarded to CHIP
# build system (e.g. because CHIP configures them on its own)
set(CHIP_CFLAG_EXCLUDES
set(CHIP_CFLAG_EXCLUDES
"-fno-asynchronous-unwind-tables"
"-fno-common"
"-fno-defer-pop"
Expand Down Expand Up @@ -149,7 +149,7 @@ list(APPEND CHIP_CFLAGS_CC ${CMAKE_CXX_FLAGS_INIT})
mbed_get_target_common_compile_flags(CHIP_MBEDCMSISCM_CFLAGS mbed-cmsis-cortex-m)
list(APPEND CHIP_CFLAGS ${CHIP_MBEDCMSISCM_CFLAGS})
if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W")
mbed_get_target_common_compile_flags(CHIP_MBEDCMSISCY8_CFLAGS mbed-cy8cproto-062-4343w)
mbed_get_target_common_compile_flags(CHIP_MBEDCMSISCY8_CFLAGS mbed-cy8cproto-062-4343w)
list(APPEND CHIP_CFLAGS ${CHIP_MBEDCMSISCY8_CFLAGS})
mbed_get_target_common_compile_flags(CHIP_MBEDPSOC6_CFLAGS mbed-psoc6)
list(APPEND CHIP_CFLAGS ${CHIP_MBEDPSOC6_CFLAGS})
Expand All @@ -159,15 +159,15 @@ if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W")
list(APPEND CHIP_CFLAGS ${CHIP_MBEDCMSISCY8MODUS_CFLAGS})
endif()

# Add support for Mbed Posix Socket
# Add support for Mbed Posix Socket
mbed_get_target_common_compile_flags(CHIP_MBEDPOSIXSOCKET_CFLAGS mbed-os-posix-socket)
list(APPEND CHIP_CFLAGS ${CHIP_MBEDPOSIXSOCKET_CFLAGS})

# Add support for Mbed BLE
mbed_get_target_common_compile_flags(CHIP_MBEDBLE_CFLAGS mbed-ble)
list(APPEND CHIP_CFLAGS ${CHIP_MBEDBLE_CFLAGS})

# Add support for Mbed event
# Add support for Mbed event
mbed_get_target_common_compile_flags(CHIP_MBEDEVENTS_CFLAGS mbed-events)
list(APPEND CHIP_CFLAGS ${CHIP_MBEDEVENTS_CFLAGS})

Expand All @@ -179,7 +179,7 @@ list(APPEND CHIP_CFLAGS ${CHIP_MBEDRTOS_CFLAGS})
mbed_get_target_common_compile_flags(CHIP_MBEDSTORAGE_CFLAGS mbed-storage-kv-global-api)
list(APPEND CHIP_CFLAGS ${CHIP_MBEDSTORAGE_CFLAGS})

# Add support for Mbed Socket
# Add support for Mbed Socket
mbed_get_target_common_compile_flags(CHIP_MBEDNETSOCKET_CFLAGS mbed-netsocket)
list(APPEND CHIP_CFLAGS ${CHIP_MBEDNETSOCKET_CFLAGS})

Expand All @@ -190,12 +190,12 @@ endif()

mbed_get_gnu_cpp_standard(CHIP_CFLAGS_CC)

list(APPEND CHIP_CFLAGS
list(APPEND CHIP_CFLAGS
\"-D__LINUX_ERRNO_EXTENSIONS__=1\"
)

if (CONFIG_MBED_BSD_SOCKET_TRACE)
list(APPEND CHIP_CFLAGS
list(APPEND CHIP_CFLAGS
\"-DMBED_BSD_SOCKET_TRACE=1\"
)
endif()
Expand Down Expand Up @@ -240,7 +240,7 @@ set(CHIP_DEFAULT_CONFIG_FILE "<${CHIP_ROOT}/config/mbed/CHIPProjectConfig.h>")
set(CHIP_PROJECT_CONFIG ${CHIP_DEFAULT_CONFIG_FILE})

if (CONFIG_CHIP_PROJECT_CONFIG)
get_filename_component(CHIP_PROJECT_CONFIG
get_filename_component(CHIP_PROJECT_CONFIG
${CONFIG_CHIP_PROJECT_CONFIG}
REALPATH
BASE_DIR ${CMAKE_SOURCE_DIR}
Expand Down Expand Up @@ -298,7 +298,7 @@ ExternalProject_Add(
BUILD_COMMAND ninja
INSTALL_COMMAND ""
BUILD_BYPRODUCTS ${CHIP_LIBRARIES}
CONFIGURE_ALWAYS TRUE
CONFIGURE_ALWAYS TRUE
BUILD_ALWAYS TRUE
USES_TERMINAL_CONFIGURE TRUE
USES_TERMINAL_BUILD TRUE
Expand Down Expand Up @@ -335,23 +335,23 @@ if("capsense" IN_LIST MBED_TARGET_LABELS)
target_link_libraries(${APP_TARGET} capsense)
endif()

list(APPEND CHIP_INCLUDES
list(APPEND CHIP_INCLUDES
${CHIP_ROOT}/config/mbed/mbedtls
)

list(APPEND CHIP_DEFINES
list(APPEND CHIP_DEFINES
__LINUX_ERRNO_EXTENSIONS__=1
)

if (CONFIG_MBED_BSD_SOCKET_TRACE)
list(APPEND CHIP_DEFINES
list(APPEND CHIP_DEFINES
MBED_BSD_SOCKET_TRACE=1
)
endif()

if (CONFIG_CHIP_PW_RPC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17" PARENT_SCOPE)
list(APPEND CHIP_DEFINES
list(APPEND CHIP_DEFINES
CHIP_PW_RPC=1
)
endif()
Expand Down Expand Up @@ -412,7 +412,7 @@ if (CONFIG_CHIP_PW_RPC_ECHO_PROTO)
${CMAKE_CURRENT_BINARY_DIR}/protocol_buffer/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos.proto_library/nanopb_rpc
${CMAKE_CURRENT_BINARY_DIR}/protocol_buffer/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos.proto_library/nanopb
)
list(APPEND CHIP_DEFINES
list(APPEND CHIP_DEFINES
CHIP_PW_RPC_ECHO_PROTO=1
)
endif(CONFIG_CHIP_PW_RPC_ECHO_PROTO)
Expand All @@ -425,7 +425,7 @@ if (CONFIG_CHIP_PW_RPC_COMMON_PROTO)
${CMAKE_CURRENT_BINARY_DIR}/protocol_buffer/gen/third_party/connectedhomeip/examples/common/pigweed/device_service.proto_library/nanopb
${CMAKE_CURRENT_BINARY_DIR}/protocol_buffer/gen/third_party/connectedhomeip/examples/common/pigweed/device_service.proto_library/nanopb_rpc
)
list(APPEND CHIP_DEFINES
list(APPEND CHIP_DEFINES
CHIP_PW_RPC_COMMON_PROTO=1
)
endif(CONFIG_CHIP_PW_RPC_COMMON_PROTO)
Expand All @@ -435,7 +435,7 @@ if (CONFIG_CHIP_PW_RPC_LIGHTING_PROTO)
${CMAKE_CURRENT_BINARY_DIR}/protocol_buffer/gen/third_party/connectedhomeip/examples/common/pigweed/lighting_service.proto_library/nanopb
${CMAKE_CURRENT_BINARY_DIR}/protocol_buffer/gen/third_party/connectedhomeip/examples/common/pigweed/lighting_service.proto_library/nanopb_rpc
)
list(APPEND CHIP_DEFINES
list(APPEND CHIP_DEFINES
CHIP_PW_RPC_LIGHTING_PROTO=1
)
endif(CONFIG_CHIP_PW_RPC_LIGHTING_PROTO)
Expand All @@ -445,7 +445,7 @@ if (CONFIG_CHIP_PW_RPC_LOCKING_PROTO)
${CMAKE_CURRENT_BINARY_DIR}/protocol_buffer/gen/third_party/connectedhomeip/examples/common/pigweed/locking_service.proto_library/nanopb
${CMAKE_CURRENT_BINARY_DIR}/protocol_buffer/gen/third_party/connectedhomeip/examples/common/pigweed/locking_service.proto_library/nanopb_rpc
)
list(APPEND CHIP_DEFINES
list(APPEND CHIP_DEFINES
CHIP_PW_RPC_LOCKING_PROTO=1
)
endif(CONFIG_CHIP_PW_RPC_LOCKING_PROTO)
Expand All @@ -454,25 +454,39 @@ endif(CONFIG_CHIP_PW_RPC)

if (CONFIG_CHIP_OTA_REQUESTOR)
target_include_directories(${APP_TARGET} PRIVATE
${CHIP_ROOT}/zzz_generated/ota-requestor-app
${CHIP_ROOT}/src/app/clusters/ota-requestor
${CHIP_ROOT}/src/platform
${CHIP_ROOT}/src/platform/mbed
${CHIP_ROOT}/src/include/platform
)

target_sources(${APP_TARGET} PRIVATE
${CHIP_ROOT}/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp
${CHIP_ROOT}/zzz_generated/ota-requestor-app/zap-generated/IMClusterCommandHandler.cpp

${CHIP_ROOT}/src/app/clusters/ota-requestor/OTARequestor.cpp
${CHIP_ROOT}/src/app/clusters/ota-requestor/BDXDownloader.cpp
${CHIP_ROOT}/src/app/clusters/ota-requestor/ota-requestor-server.cpp

${CHIP_ROOT}/src/platform/mbed/OTAImageProcessorImpl.cpp
${CHIP_ROOT}/src/platform/mbed/OTARequestorDriverImpl.cpp
)

if (NOT ${APP_TARGET} MATCHES "shell")
target_sources(${APP_TARGET} PRIVATE
${CHIP_ROOT}/src/app/clusters/ota-requestor/ota-requestor-server.cpp
)
else()
include(${CHIP_ROOT}/src/app/chip_data_model.cmake)
chip_configure_data_model(${APP_TARGET}
ZAP_FILE ${CHIP_ROOT}/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap
GEN_DIR ${CHIP_ROOT}/zzz_generated/ota-requestor-app/zap-generated
)
target_include_directories(${APP_TARGET} PRIVATE
${GEN_DIR}/ota-requestor-app
)
target_sources(${APP_TARGET} PRIVATE
${GEN_DIR}//ota-requestor-app/zap-generated/callback-stub.cpp
${GEN_DIR}/ota-requestor-app/zap-generated/IMClusterCommandHandler.cpp
)
endif()

list(APPEND CHIP_DEFINES
list(APPEND CHIP_DEFINES
CHIP_OTA_REQUESTOR=1
)
endif(CONFIG_CHIP_OTA_REQUESTOR)
Expand Down Expand Up @@ -507,16 +521,16 @@ if(BOOT_ENABLED)
"-DMBED_APP_SIZE=${APP_SIZE}"
)

list(APPEND CHIP_DEFINES
list(APPEND CHIP_DEFINES
BOOT_ENABLED=1
)
endif()


target_include_directories(${APP_TARGET} PRIVATE
target_include_directories(${APP_TARGET} PRIVATE
${CHIP_INCLUDES}
)

target_compile_definitions(${APP_TARGET} PRIVATE
${CHIP_DEFINES}
${CHIP_DEFINES}
)
8 changes: 4 additions & 4 deletions docs/QUICK_START.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ and platforms.
Use one of the controllers listed above and then a Border Router and Node
combination listed below.

| <div style="width:200px">Border Router</div> | <div style="width:200px">Node</div> | Description |
| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [**ot-br**](https://openthread.io/guides/border-router/build)<br>Thread Border Router <li>RasPi <li>BeagleBone | **lighting-app** <li>[Nordic nRF5x](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/nrfconnect/README.md) <li> [NXP K32W](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/k32w/README.md) <li> [Qorvo QPG6100](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/qpg) <li> [Silicon Labs EFR32](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/efr32/README.md) | The Lighting example is supported by many of the available Thread platforms. See the chip-tool controller instructions for how to actuate the light on/off cluster. |
| [**ot-br**](https://openthread.io/guides/border-router/build)<br>Thread Border Router <li>RasPi <li>BeagleBone | **lock-app** <li>[Nordic nRF5x](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/nrfconnect/README.md) <li> [NXP K32W](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/k32w/README.md) <li> [Qorvo QPG6100](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/qpg) <li> [Silicon Labs EFR32](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/efr32/README.md) <li> [TI CC13x2x7](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/cc13x2x7_26x2x7/README.md) | The Lock example is supported by many of the available Thread and Wi-Fi platforms. |
| <div style="width:200px">Border Router</div> | <div style="width:200px">Node</div> | Description |
| -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [**ot-br**](https://openthread.io/guides/border-router/build)<br>Thread Border Router <li>RasPi <li>BeagleBone | **lighting-app** <li>[Nordic nRF5x](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/nrfconnect/README.md) <li> [NXP K32W](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/nxp/k32w/k32w0/README.md) <li> [Qorvo QPG6100](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/qpg) <li> [Silicon Labs EFR32](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/efr32/README.md) | The Lighting example is supported by many of the available Thread platforms. See the chip-tool controller instructions for how to actuate the light on/off cluster. |
| [**ot-br**](https://openthread.io/guides/border-router/build)<br>Thread Border Router <li>RasPi <li>BeagleBone | **lock-app** <li>[Nordic nRF5x](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/nrfconnect/README.md) <li> [NXP K32W](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/nxp/k32w/k32w0/README.md) <li> [Qorvo QPG6100](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/qpg) <li> [Silicon Labs EFR32](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/efr32/README.md) <li> [TI CC13x2x7](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/cc13x2x7_26x2x7/README.md) | The Lock example is supported by many of the available Thread and Wi-Fi platforms. |

## Controllers

Expand Down
4 changes: 2 additions & 2 deletions docs/guides/nxp_k32w_android_commissioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,11 @@ To make your PC work as a Thread Border Router, complete the following tasks:
## Building and programming NXP K32W Lock/Light Example Application

See
[NXP K32W Lock Example Application README](../../examples/lock-app/k32w/README.md)
[NXP K32W Lock Example Application README](../../examples/lock-app/nxp/k32w/k32w0/README.md)
to learn how to build and program the lock example onto an K32W061 DK6.

See
[NXP K32W Light Example Application README](../../examples/lighting-app/k32w/README.md)
[NXP K32W Light Example Application README](../../examples/lighting-app/nxp/k32w/k32w0/README.md)
to learn how to build and program the light example onto an K32W061 DK6.

<hr>
Expand Down
Loading

0 comments on commit 46828f9

Please sign in to comment.