forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Tizen] Platform builds for all-clusters and all-clusters-minimal apps (
project-chip#20480) * [Tizen] Platform build for all-clusters-minimal app * Add Tizen all-clusters-minimal app build to build script * [Tizen] Platform build for all-clusters app
- Loading branch information
Showing
25 changed files
with
612 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# 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_os = "tizen" | ||
import("//args.gni") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# 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/chip.gni") | ||
import("//build_overrides/tizen.gni") | ||
|
||
import("${chip_root}/build/chip/tools.gni") | ||
import("${chip_root}/src/app/common_flags.gni") | ||
|
||
import("${tizen_sdk_build_root}/tizen_sdk.gni") | ||
assert(chip_build_tools) | ||
|
||
source_set("chip-all-clusters-common") { | ||
sources = [ | ||
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", | ||
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", | ||
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", | ||
] | ||
|
||
deps = [ | ||
"${chip_root}/examples/all-clusters-app/all-clusters-common", | ||
"${chip_root}/src/lib/shell:shell_core", | ||
] | ||
|
||
include_dirs = | ||
[ "${chip_root}/examples/all-clusters-app/all-clusters-common/include" ] | ||
} | ||
|
||
executable("chip-all-clusters-app") { | ||
sources = [ | ||
"include/CHIPProjectAppConfig.h", | ||
"src/main.cpp", | ||
] | ||
|
||
deps = [ | ||
":chip-all-clusters-common", | ||
"${chip_root}/examples/platform/tizen:app-main", | ||
"${chip_root}/src/lib", | ||
] | ||
|
||
include_dirs = [ | ||
"${chip_root}/examples/all-clusters-app/all-clusters-common/include", | ||
"${chip_root}/zzz_generated/all-clusters-app", | ||
"include", | ||
] | ||
|
||
output_dir = root_out_dir | ||
} | ||
|
||
tizen_sdk_package("chip-all-clusters-app:tpk") { | ||
deps = [ ":chip-all-clusters-app" ] | ||
manifest = rebase_path("tizen-manifest.xml") | ||
sign_security_profile = "CHIP" | ||
} | ||
|
||
group("tizen") { | ||
deps = [ ":chip-all-clusters-app" ] | ||
} | ||
|
||
group("tizen:tpk") { | ||
deps = [ ":chip-all-clusters-app:tpk" ] | ||
} | ||
|
||
group("default") { | ||
deps = [ ":tizen" ] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# 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/chip.gni") | ||
|
||
import("${chip_root}/config/standalone/args.gni") | ||
|
||
chip_device_project_config_include = "<CHIPProjectAppConfig.h>" | ||
chip_project_config_include = "<CHIPProjectAppConfig.h>" | ||
chip_system_project_config_include = "<SystemProjectConfig.h>" | ||
|
||
chip_project_config_include_dirs = | ||
[ "${chip_root}/examples/all-clusters-app/tizen/include" ] | ||
chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../build_overrides |
31 changes: 31 additions & 0 deletions
31
examples/all-clusters-app/tizen/include/CHIPProjectAppConfig.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* | ||
* Copyright (c) 2020 Project CHIP Authors | ||
* All rights reserved. | ||
* | ||
* 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. | ||
*/ | ||
|
||
/** | ||
* @file | ||
* Example project configuration file for CHIP. | ||
* | ||
* This is a place to put application or project-specific overrides | ||
* to the default configuration values for general CHIP features. | ||
* | ||
*/ | ||
|
||
#pragma once | ||
|
||
// include the CHIPProjectConfig from config/standalone | ||
#include <CHIPProjectConfig.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* | ||
* Copyright (c) 2020 Project CHIP Authors | ||
* All rights reserved. | ||
* | ||
* 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. | ||
*/ | ||
|
||
#include <app-common/zap-generated/ids/Attributes.h> | ||
#include <app-common/zap-generated/ids/Clusters.h> | ||
#include <app/ConcreteAttributePath.h> | ||
#include <app/clusters/network-commissioning/network-commissioning.h> | ||
#include <app/util/af.h> | ||
|
||
#include <TizenServiceAppMain.h> | ||
#include <binding-handler.h> | ||
|
||
using namespace chip; | ||
using namespace chip::app; | ||
using namespace chip::app::Clusters; | ||
|
||
// Network commissioning | ||
namespace { | ||
constexpr EndpointId kNetworkCommissioningEndpointMain = 0; | ||
constexpr EndpointId kNetworkCommissioningEndpointSecondary = 0xFFFE; | ||
} // namespace | ||
|
||
void ApplicationInit() | ||
{ | ||
// Enable secondary endpoint only when we need it. | ||
emberAfEndpointEnableDisable(kNetworkCommissioningEndpointSecondary, false); | ||
} | ||
|
||
int main(int argc, char * argv[]) | ||
{ | ||
TizenServiceAppMain app; | ||
VerifyOrDie(app.Init(argc, argv) == 0); | ||
|
||
VerifyOrDie(InitBindingHandlers() == CHIP_NO_ERROR); | ||
|
||
return app.RunMainLoop(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns="http://tizen.org/ns/packages" api-version="6.0" package="org.tizen.matter.example.allclusters" version="1.0.0"> | ||
<profile name="mobile" /> | ||
<service-application appid="org.tizen.matter.example.allclusters" exec="chip-all-clusters-app" type="capp" multiple="false" taskmanage="false" nodisplay="true"> | ||
<label>Matter All Clusters Example</label> | ||
</service-application> | ||
<privileges> | ||
<privilege>http://tizen.org/privilege/bluetooth</privilege> | ||
<privilege>http://tizen.org/privilege/internet</privilege> | ||
<privilege>http://tizen.org/privilege/network.get</privilege> | ||
</privileges> | ||
<feature name="http://tizen.org/feature/network.bluetooth">true</feature> | ||
<feature name="http://tizen.org/feature/network.bluetooth.le">true</feature> | ||
<feature name="http://tizen.org/feature/network.bluetooth.le.gatt.server">true</feature> | ||
<feature name="http://tizen.org/feature/network.service_discovery.dnssd">true</feature> | ||
<feature name="http://tizen.org/feature/network.wifi">true</feature> | ||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# 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_os = "tizen" | ||
import("//args.gni") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# 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/chip.gni") | ||
import("//build_overrides/tizen.gni") | ||
|
||
import("${chip_root}/build/chip/tools.gni") | ||
import("${chip_root}/src/app/common_flags.gni") | ||
|
||
import("${tizen_sdk_build_root}/tizen_sdk.gni") | ||
assert(chip_build_tools) | ||
|
||
source_set("chip-all-clusters-common") { | ||
sources = [ | ||
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", | ||
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", | ||
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", | ||
] | ||
|
||
deps = [ | ||
"${chip_root}/examples/all-clusters-minimal-app/all-clusters-common", | ||
"${chip_root}/src/lib/shell:shell_core", | ||
] | ||
|
||
include_dirs = | ||
[ "${chip_root}/examples/all-clusters-app/all-clusters-common/include" ] | ||
} | ||
|
||
executable("chip-all-clusters-minimal-app") { | ||
sources = [ | ||
"include/CHIPProjectAppConfig.h", | ||
"src/main.cpp", | ||
] | ||
|
||
deps = [ | ||
":chip-all-clusters-common", | ||
"${chip_root}/examples/platform/tizen:app-main", | ||
"${chip_root}/src/lib", | ||
] | ||
|
||
include_dirs = [ | ||
"${chip_root}/examples/all-clusters-app/all-clusters-common/include", | ||
"${chip_root}/zzz_generated/all-clusters-minimal-app", | ||
"include", | ||
] | ||
|
||
output_dir = root_out_dir | ||
} | ||
|
||
tizen_sdk_package("chip-all-clusters-minimal-app:tpk") { | ||
deps = [ ":chip-all-clusters-minimal-app" ] | ||
manifest = rebase_path("tizen-manifest.xml") | ||
sign_security_profile = "CHIP" | ||
} | ||
|
||
group("tizen") { | ||
deps = [ ":chip-all-clusters-minimal-app" ] | ||
} | ||
|
||
group("tizen:tpk") { | ||
deps = [ ":chip-all-clusters-minimal-app:tpk" ] | ||
} | ||
|
||
group("default") { | ||
deps = [ ":tizen" ] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# 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/chip.gni") | ||
|
||
import("${chip_root}/config/standalone/args.gni") | ||
|
||
chip_device_project_config_include = "<CHIPProjectAppConfig.h>" | ||
chip_project_config_include = "<CHIPProjectAppConfig.h>" | ||
chip_system_project_config_include = "<SystemProjectConfig.h>" | ||
|
||
chip_project_config_include_dirs = | ||
[ "${chip_root}/examples/all-clusters-minimal-app/tizen/include" ] | ||
chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../build_overrides |
Oops, something went wrong.