@@ -23,9 +23,7 @@ declare_args() {
23
23
qpg_sdk_root = " ${ chip_root } /third_party/qpg_sdk/repo"
24
24
25
25
# subdirectory in qpg_sdk_root where the binary library builds (.a) are to be found
26
- # for connectedhomeip-qpg: Binaries (default)
27
- # for matter endnodes sdk: Work
28
- qpg_sdk_lib_dir = " Binaries"
26
+ qpg_sdk_lib_dir = " Work"
29
27
30
28
# Target IC for QPG SDK
31
29
qpg_target_ic = " qpg6105"
@@ -69,28 +67,12 @@ template("qpg_sdk") {
69
67
" ${ qpg_sdk_root } /Components/Qorvo/BSP/qvIO/inc" ,
70
68
" ${ qpg_sdk_root } /Libraries/Qorvo/mbedtls_alt/inc" ,
71
69
" ${ qpg_sdk_root } /Components/ThirdParty/Silex/cryptosoc/mbedtls_alt" ,
72
- " ${ qpg_sdk_root } /Components/ThirdParty/Lwip" ,
73
- " ${ qpg_sdk_root } /Components/ThirdParty/Lwip/arch" ,
74
70
" ${ mbedtls_root } /repo/include" ,
75
71
" ${ openthread_root } /include" ,
76
72
]
77
73
78
74
lib_dirs = []
79
75
80
- if (qpg_sdk_include_platform_libs ) {
81
- libs += [
82
- " ${ qpg_sdk_root } /${ qpg_sdk_lib_dir } /MatterQorvoGlue_${ qpg_target_ic } _libbuild/libMatterQorvoGlue_${ qpg_target_ic } _libbuild.a" ,
83
- " ${ qpg_sdk_root } /${ qpg_sdk_lib_dir } /QorvoStack_${ qpg_target_ic } /libQorvoStack_${ qpg_target_ic } .a" ,
84
- " ${ qpg_sdk_root } /${ qpg_sdk_lib_dir } /mbedtls_alt_${ qpg_target_ic } /libmbedtls_alt_${ qpg_target_ic } .a" ,
85
- " ${ qpg_sdk_root } /${ qpg_sdk_lib_dir } /Bootloader_${ qpg_target_ic } _compr_secure/libBootloader_${ qpg_target_ic } _compr_secure.a" ,
86
- ]
87
- }
88
-
89
- ldflags = [
90
- " -Wl,-u_binary_bl_userlicense_bin_start" ,
91
- " -Wl,-u_binary_bootloader_bin_start" ,
92
- ]
93
-
94
76
# MBed TLS built from third_party/mbedtls tree - OT config not used
95
77
defines = [
96
78
" QORVO_CRYPTO_ENGINE" ,
@@ -111,114 +93,69 @@ template("qpg_sdk") {
111
93
112
94
source_set (sdk_target_name ) {
113
95
sources = [
114
- " ${ chip_root } /third_party/mbedtls/repo/include/mbedtls/platform.h" ,
115
- " ${ chip_root } /third_party/mbedtls/repo/library/aes.c" ,
116
- " ${ chip_root } /third_party/mbedtls/repo/library/aesni.c" ,
117
- " ${ chip_root } /third_party/mbedtls/repo/library/arc4.c" ,
118
- " ${ chip_root } /third_party/mbedtls/repo/library/aria.c" ,
96
+ " ${ qpg_sdk_root } /Applications/Matter/shared/config/inc/FreeRTOSConfig.h" ,
97
+ " ${ qpg_sdk_root } /Applications/Matter/shared/config/src/hooks.c" ,
98
+ ]
99
+
100
+ chip_glue_sources = [
101
+ #
102
+ " ${ qpg_sdk_root } /Components/Qorvo/BSP/qvIO/inc/qvIO.h" ,
103
+ " ${ qpg_sdk_root } /Components/Qorvo/Matter/qvCHIP/inc/qvCHIP.h" ,
104
+ ]
105
+ sources += chip_glue_sources
106
+
107
+ mbedtls_alt_sources = [
108
+ # Add alt src
109
+ " ${ qpg_sdk_root } /Components/ThirdParty/Silex/cryptosoc/mbedtls_alt/aes_alt.h" ,
110
+ " ${ qpg_sdk_root } /Components/ThirdParty/Silex/cryptosoc/mbedtls_alt/ccm_alt.h" ,
111
+ " ${ qpg_sdk_root } /Components/ThirdParty/Silex/cryptosoc/mbedtls_alt/ecjpake_alt.h" ,
112
+ " ${ qpg_sdk_root } /Components/ThirdParty/Silex/cryptosoc/mbedtls_alt/ecp_alt.h" ,
113
+ " ${ qpg_sdk_root } /Components/ThirdParty/Silex/cryptosoc/mbedtls_alt/sha256_alt.h" ,
114
+ " ${ qpg_sdk_root } /Libraries/Qorvo/mbedtls_alt/inc/${ qpg_target_ic } -mbedtls-config.h" ,
115
+ " ${ qpg_sdk_root } /Libraries/Qorvo/mbedtls_alt/src/trng.c" ,
116
+ ]
117
+ mbedtls_sources = [
119
118
" ${ chip_root } /third_party/mbedtls/repo/library/asn1parse.c" ,
120
119
" ${ chip_root } /third_party/mbedtls/repo/library/asn1write.c" ,
121
- " ${ chip_root } /third_party/mbedtls/repo/library/base64.c" ,
122
120
" ${ chip_root } /third_party/mbedtls/repo/library/bignum.c" ,
123
- " ${ chip_root } /third_party/mbedtls/repo/library/blowfish.c" ,
124
- " ${ chip_root } /third_party/mbedtls/repo/library/camellia.c" ,
125
121
" ${ chip_root } /third_party/mbedtls/repo/library/ccm.c" ,
126
- " ${ chip_root } /third_party/mbedtls/repo/library/certs.c" ,
127
- " ${ chip_root } /third_party/mbedtls/repo/library/chacha20.c" ,
128
- " ${ chip_root } /third_party/mbedtls/repo/library/chachapoly.c" ,
129
122
" ${ chip_root } /third_party/mbedtls/repo/library/cipher.c" ,
130
123
" ${ chip_root } /third_party/mbedtls/repo/library/cipher_wrap.c" ,
131
- " ${ chip_root } /third_party/mbedtls/repo/library/cmac.c" ,
132
- " ${ chip_root } /third_party/mbedtls/repo/library/constant_time.c" ,
133
124
" ${ chip_root } /third_party/mbedtls/repo/library/ctr_drbg.c" ,
134
- " ${ chip_root } /third_party/mbedtls/repo/library/debug.c" ,
135
- " ${ chip_root } /third_party/mbedtls/repo/library/des.c" ,
136
- " ${ chip_root } /third_party/mbedtls/repo/library/dhm.c" ,
137
- " ${ chip_root } /third_party/mbedtls/repo/library/ecdh.c" ,
138
125
" ${ chip_root } /third_party/mbedtls/repo/library/ecdsa.c" ,
139
- " ${ chip_root } /third_party/mbedtls/repo/library/ecjpake.c" ,
140
- " ${ chip_root } /third_party/mbedtls/repo/library/ecp.c" ,
141
- " ${ chip_root } /third_party/mbedtls/repo/library/ecp_curves.c" ,
142
126
" ${ chip_root } /third_party/mbedtls/repo/library/entropy.c" ,
143
- " ${ chip_root } /third_party/mbedtls/repo/library/entropy_poll.c" ,
144
- " ${ chip_root } /third_party/mbedtls/repo/library/error.c" ,
145
- " ${ chip_root } /third_party/mbedtls/repo/library/gcm.c" ,
146
- " ${ chip_root } /third_party/mbedtls/repo/library/havege.c" ,
147
127
" ${ chip_root } /third_party/mbedtls/repo/library/hkdf.c" ,
148
128
" ${ chip_root } /third_party/mbedtls/repo/library/hmac_drbg.c" ,
149
129
" ${ chip_root } /third_party/mbedtls/repo/library/md.c" ,
150
- " ${ chip_root } /third_party/mbedtls/repo/library/md2.c" ,
151
- " ${ chip_root } /third_party/mbedtls/repo/library/md4.c" ,
152
- " ${ chip_root } /third_party/mbedtls/repo/library/md5.c" ,
153
- " ${ chip_root } /third_party/mbedtls/repo/library/memory_buffer_alloc.c" ,
154
- " ${ chip_root } /third_party/mbedtls/repo/library/net_sockets.c" ,
155
- " ${ chip_root } /third_party/mbedtls/repo/library/nist_kw.c" ,
156
130
" ${ chip_root } /third_party/mbedtls/repo/library/oid.c" ,
157
- " ${ chip_root } /third_party/mbedtls/repo/library/padlock.c" ,
158
- " ${ chip_root } /third_party/mbedtls/repo/library/pem.c" ,
159
131
" ${ chip_root } /third_party/mbedtls/repo/library/pk.c" ,
160
132
" ${ chip_root } /third_party/mbedtls/repo/library/pk_wrap.c" ,
161
- " ${ chip_root } /third_party/mbedtls/repo/library/pkcs11.c" ,
162
- " ${ chip_root } /third_party/mbedtls/repo/library/pkcs12.c" ,
163
133
" ${ chip_root } /third_party/mbedtls/repo/library/pkcs5.c" ,
164
134
" ${ chip_root } /third_party/mbedtls/repo/library/pkparse.c" ,
165
135
" ${ chip_root } /third_party/mbedtls/repo/library/pkwrite.c" ,
166
136
" ${ chip_root } /third_party/mbedtls/repo/library/platform.c" ,
167
137
" ${ chip_root } /third_party/mbedtls/repo/library/platform_util.c" ,
168
- " ${ chip_root } /third_party/mbedtls/repo/library/poly1305.c" ,
169
- " ${ chip_root } /third_party/mbedtls/repo/library/psa_crypto.c" ,
170
- " ${ chip_root } /third_party/mbedtls/repo/library/psa_crypto_driver_wrappers.c" ,
171
- " ${ chip_root } /third_party/mbedtls/repo/library/psa_crypto_se.c" ,
172
- " ${ chip_root } /third_party/mbedtls/repo/library/psa_crypto_slot_management.c" ,
173
- " ${ chip_root } /third_party/mbedtls/repo/library/psa_crypto_storage.c" ,
174
- " ${ chip_root } /third_party/mbedtls/repo/library/psa_its_file.c" ,
175
- " ${ chip_root } /third_party/mbedtls/repo/library/ripemd160.c" ,
176
- " ${ chip_root } /third_party/mbedtls/repo/library/rsa.c" ,
177
- " ${ chip_root } /third_party/mbedtls/repo/library/rsa_internal.c" ,
178
138
" ${ chip_root } /third_party/mbedtls/repo/library/sha1.c" ,
179
139
" ${ chip_root } /third_party/mbedtls/repo/library/sha256.c" ,
180
- " ${ chip_root } /third_party/mbedtls/repo/library/sha512.c" ,
181
- " ${ chip_root } /third_party/mbedtls/repo/library/ssl_cache.c" ,
182
- " ${ chip_root } /third_party/mbedtls/repo/library/ssl_ciphersuites.c" ,
183
- " ${ chip_root } /third_party/mbedtls/repo/library/ssl_cli.c" ,
184
- " ${ chip_root } /third_party/mbedtls/repo/library/ssl_cookie.c" ,
185
- " ${ chip_root } /third_party/mbedtls/repo/library/ssl_msg.c" ,
186
- " ${ chip_root } /third_party/mbedtls/repo/library/ssl_srv.c" ,
187
- " ${ chip_root } /third_party/mbedtls/repo/library/ssl_ticket.c" ,
188
- " ${ chip_root } /third_party/mbedtls/repo/library/ssl_tls.c" ,
189
- " ${ chip_root } /third_party/mbedtls/repo/library/ssl_tls13_keys.c" ,
190
- " ${ chip_root } /third_party/mbedtls/repo/library/threading.c" ,
191
- " ${ chip_root } /third_party/mbedtls/repo/library/timing.c" ,
192
- " ${ chip_root } /third_party/mbedtls/repo/library/version.c" ,
193
- " ${ chip_root } /third_party/mbedtls/repo/library/version_features.c" ,
194
- " ${ chip_root } /third_party/mbedtls/repo/library/x509.c" ,
195
140
" ${ chip_root } /third_party/mbedtls/repo/library/x509_create.c" ,
196
- " ${ chip_root } /third_party/mbedtls/repo/library/x509_crl.c" ,
197
- " ${ chip_root } /third_party/mbedtls/repo/library/x509_crt.c" ,
198
- " ${ chip_root } /third_party/mbedtls/repo/library/x509_csr.c" ,
199
- " ${ chip_root } /third_party/mbedtls/repo/library/x509write_crt.c" ,
200
141
" ${ chip_root } /third_party/mbedtls/repo/library/x509write_csr.c" ,
201
- " ${ chip_root } /third_party/mbedtls/repo/library/xtea.c" ,
202
- " ${ qpg_sdk_root } /Applications/Matter/shared/config/inc/FreeRTOSConfig.h" ,
203
- " ${ qpg_sdk_root } /Applications/Matter/shared/config/src/hooks.c" ,
204
- " ${ qpg_sdk_root } /Components/ThirdParty/Silex/cryptosoc/mbedtls_alt/aes_alt.h" ,
205
- " ${ qpg_sdk_root } /Components/ThirdParty/Silex/cryptosoc/mbedtls_alt/ccm_alt.h" ,
206
- " ${ qpg_sdk_root } /Components/ThirdParty/Silex/cryptosoc/mbedtls_alt/ecjpake_alt.h" ,
207
- " ${ qpg_sdk_root } /Components/ThirdParty/Silex/cryptosoc/mbedtls_alt/ecp_alt.h" ,
208
- " ${ qpg_sdk_root } /Components/ThirdParty/Silex/cryptosoc/mbedtls_alt/sha256_alt.h" ,
209
- " ${ qpg_sdk_root } /Libraries/Qorvo/mbedtls_alt/inc/${ qpg_target_ic } -mbedtls-config.h" ,
210
- " ${ qpg_sdk_root } /Libraries/Qorvo/mbedtls_alt/src/trng.c" ,
211
-
212
- # mbedtls_hardware_poll
213
- " ${ qpg_sdk_root } /Components/Qorvo/BSP/qvIO/inc/qvIO.h" ,
214
- " ${ qpg_sdk_root } /Components/Qorvo/Matter/qvCHIP/inc/qvCHIP.h" ,
215
142
]
143
+ sources += mbedtls_sources + mbedtls_alt_sources
216
144
217
145
if (defined (invoker .sources )) {
218
146
sources += invoker .sources
219
147
}
220
148
221
149
public_configs = [ " :${ sdk_target_name } _config" ]
222
150
public_deps = [ " ${ chip_root } /third_party/qpg_sdk:freertos" ]
151
+ if (qpg_sdk_include_platform_libs ) {
152
+ public_deps += [
153
+ " ${ chip_root } /third_party/qpg_sdk:qpg_bootloader_lib" ,
154
+ " ${ chip_root } /third_party/qpg_sdk:qpg_glue_lib" ,
155
+ " ${ chip_root } /third_party/qpg_sdk:qpg_mbedtls_alt_lib" ,
156
+ " ${ chip_root } /third_party/qpg_sdk:qpg_openthread_glue_lib" ,
157
+ " ${ chip_root } /third_party/qpg_sdk:qpg_stack_lib" ,
158
+ ]
159
+ }
223
160
}
224
161
}
0 commit comments