Skip to content

Commit 57b9ca6

Browse files
[platform][mcxw71] Use ota.gni
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
1 parent 4fe2561 commit 57b9ca6

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

src/platform/nxp/mcxw71_k32w1/BUILD.gn

+8-16
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import("//build_overrides/openthread.gni")
1818

1919
import("${chip_root}/src/crypto/crypto.gni")
2020
import("${chip_root}/src/platform/device.gni")
21+
import("${chip_root}/src/platform/nxp/common/ota/ota.gni")
2122

2223
import("${nxp_sdk_build_root}/nxp_sdk.gni")
2324

@@ -53,22 +54,7 @@ source_set("nxp_factory_data") {
5354
source_set("nxp_ota") {
5455
public = [ "../common/ota/OTAImageProcessorImpl.h" ]
5556

56-
sources = [
57-
"../common/ota/OTAFirmwareProcessor.cpp",
58-
"../common/ota/OTAFirmwareProcessor.h",
59-
"../common/ota/OTAHooks.cpp",
60-
"../common/ota/OTAImageProcessorImpl.cpp",
61-
"../common/ota/OTAImageProcessorImpl.h",
62-
"../common/ota/OTATlvProcessor.cpp",
63-
"../common/ota/OTATlvProcessor.h",
64-
]
65-
66-
if (nxp_use_factory_data && nxp_enable_ota_factory_data_processor) {
67-
sources += [
68-
"../common/ota/OTAFactoryDataProcessor.cpp",
69-
"../common/ota/OTAFactoryDataProcessor.h",
70-
]
71-
}
57+
sources = ota_sources
7258

7359
deps = [
7460
":nxp_platform",
@@ -150,6 +136,12 @@ static_library("nxp_platform") {
150136
]
151137
}
152138

139+
# When the app is built using cmake, we must ensure the OTA platform files are also compiled.
140+
# When the app is built using gn, the app selects the nxp_ota target through its build file.
141+
if (nxp_external_sdk && chip_enable_ota_requestor) {
142+
sources += ota_sources
143+
}
144+
153145
if (nxp_use_plain_dac_key) {
154146
defines += [ "CHIP_USE_PLAIN_DAC_KEY=1" ]
155147
} else {

0 commit comments

Comments
 (0)