-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[NXP][CMake][MCXW7x] Fix build issues when enabling "factory-data" and "OTA" #39853
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
[NXP][CMake][MCXW7x] Fix build issues when enabling "factory-data" and "OTA" #39853
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces several fixes and optimizations for the NXP CMake build system, particularly for factory data and OTA configurations. The changes include adjusting debug optimization levels, disabling warnings as errors in debug builds, and enabling persistent subscriptions for MTD devices, which are all reasonable improvements.
However, I've identified an issue in config/nxp/cmake/Kconfig.matter.common
where an if
condition for ICD-related settings has been moved, incorrectly exposing some ICD-specific options even when ICD support is disabled. This could lead to user confusion and should be corrected. Details are in the specific comment.
PR #39853: Size comparison from 02d5c4a to 7cfc855 Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
The ICD manager is included in the Matter data interaction model and this forces always the build of the ICDConfigurationData.cpp/h source file pair, disregarding whether the device is an ICD or not. These source files require at minimum that the ICD fast poll and ICD slow poll intervals be defined (otherwise the build breaks), hence these parameters must be defined at all times, even when the ICD feature is disabled. Signed-off-by: Marian Chereji <marian.chereji@nxp.com>
ICD behavior makes sense only for MTDs (Minimal Thread Devices) therefore it should be disabled by default for any other type of devices. Signed-off-by: Marian Chereji <marian.chereji@nxp.com>
Subscription persistence should be enabled for all MTDs (Minimal Thread Devices) generated with CMake in order to align them with the applications generated via GN. Signed-off-by: Marian Chereji <marian.chereji@nxp.com>
…ion rather than "-O0" in debug mode The MCXW71 platform internal flash size does not afford the use of the "-O0" optimization level in debug mode for Matter core libraries and, therefore, an optimization level which generates a reduced size binary image is more appropriate. "-Og" is a debug optimization level which generates reduced size binary images while still providing a reasonable debuging experience. Signed-off-by: Marian Chereji <marian.chereji@nxp.com>
…ibraries in debug mode In debug mode the Matter core libraries are generating quite a number of build warnings and this frequently breaks the build if they are all treated as errors. In order to avoid this issue, the "treat_warnings_as_errors=false" build option will be used when building the Matter SDK in debug mode. Signed-off-by: Marian Chereji <marian.chereji@nxp.com>
7cfc855
to
1785118
Compare
PR #39853: Size comparison from dd23712 to 1785118 Full report (72 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
Summary
A series of fixes and optimizations of the newly added CMake build system for NXP Matter apps.
Testing
Manually tested.