Skip to content

Commit 0aaf8c0

Browse files
authored
Merge pull request #80 from home-assistant-libs/use-local-chip-project-config
Add and use local CHIP project config headers
2 parents 3a4e9ad + e88e787 commit 0aaf8c0

5 files changed

+96
-51
lines changed

.github/workflows/build.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ jobs:
114114
- name: Setup Build, Run Build and Run Tests
115115
run: |
116116
scripts/build/gn_gen.sh --args=" \
117+
chip_project_config_include_dirs=[\"//..\"] \
117118
chip_crypto=\"boringssl\"
118119
enable_rtti=true \
119120
enable_pylib=true \

0005-Enable-node-ID-logging-in-exchanges.patch

-26
This file was deleted.

0031-Python-Increase-maximum-devices-support.patch

-25
This file was deleted.

CHIPProjectConfig.h

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*
2+
*
3+
* Copyright (c) 2020-2022 Project CHIP Authors
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
/**
19+
* @file
20+
* CHIP project configuration for python builds on Linux and OS X.
21+
*
22+
*/
23+
#ifndef CHIPPROJECTCONFIG_H
24+
#define CHIPPROJECTCONFIG_H
25+
26+
#define CHIP_CONFIG_EVENT_LOGGING_NUM_EXTERNAL_CALLBACKS 2
27+
28+
// Uncomment this for a large Tunnel MTU.
29+
//#define CHIP_CONFIG_TUNNEL_INTERFACE_MTU (9000)
30+
31+
// Enable support functions for parsing command-line arguments
32+
#define CHIP_CONFIG_ENABLE_ARG_PARSER 1
33+
34+
// Use a default pairing code if one hasn't been provisioned in flash.
35+
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
36+
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00
37+
38+
// Enable reading DRBG seed data from /dev/(u)random.
39+
// This is needed for test applications and the CHIP device manager to function
40+
// properly when CHIP_CONFIG_RNG_IMPLEMENTATION_CHIPDRBG is enabled.
41+
#define CHIP_CONFIG_DEV_RANDOM_DRBG_SEED 1
42+
43+
// For convenience, Chip Security Test Mode can be enabled and the
44+
// requirement for authentication in various protocols can be disabled.
45+
//
46+
// WARNING: These options make it possible to circumvent basic Chip security functionality,
47+
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
48+
//
49+
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
50+
51+
#define CHIP_CONFIG_ENABLE_UPDATE 1
52+
53+
#define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE 0
54+
55+
#define CHIP_CONFIG_DATA_MANAGEMENT_CLIENT_EXPERIMENTAL 1
56+
57+
#define CONFIG_BUILD_FOR_HOST_UNIT_TEST 1
58+
59+
// Home Assistant Python Matter server specific configs
60+
#define CHIP_EXCHANGE_NODE_ID_LOGGING 1
61+
#define CHIP_CONFIG_CONTROLLER_MAX_ACTIVE_DEVICES 1024
62+
#define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS 256
63+
64+
#endif /* CHIPPROJECTCONFIG_H */

SystemProjectConfig.h

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
*
3+
* Copyright (c) 2020 Project CHIP Authors
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
/**
19+
* @file
20+
* chip::System project configuration for python builds on Linux and OS X.
21+
*
22+
*/
23+
#ifndef SYSTEMPROJECTCONFIG_H
24+
#define SYSTEMPROJECTCONFIG_H
25+
26+
#if CHIP_SYSTEM_CONFIG_USE_SOCKETS
27+
// Uncomment this for larger buffers (e.g. to support a bigger CHIP_CONFIG_TUNNEL_INTERFACE_MTU).
28+
//#define CHIP_SYSTEM_CONFIG_PACKETBUFFER_CAPACITY_MAX 9050
29+
#endif
30+
31+
#endif /* SYSTEMPROJECTCONFIG_H */

0 commit comments

Comments
 (0)