Fix Log code size - #996
Open
Jean-Francois Penven (jepenven-silabs) wants to merge 2 commits into
Open
Jean-Francois Penven (jepenven-silabs) wants to merge 2 commits into
Jean-Francois Penven (jepenven-silabs) wants to merge 2 commits into
Conversation
Jean-Francois Penven (jepenven-silabs)
requested a review
from a team
as a code owner
August 14, 2026 18:16
Copilot started reviewing on behalf of
Jean-Francois Penven (jepenven-silabs)
August 14, 2026 18:17
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reduces firmware code size by changing the default Silicon Labs Matter log level to SL_MATTER_LOG_NONE, so log strings are not compiled in unless an application explicitly opts into a higher log level via its .slcp configuration.
Changes:
- Set the default
SL_MATTER_LOG_LEVELfallback insl_matter_config.htoSL_MATTER_LOG_NONE. - Add
SL_MATTER_LOG_LEVEL = SL_MATTER_LOG_PROGRESSoverrides to many example/application.slcpprojects to preserve prior logging behavior by default for those apps. - Introduce/modify per-app log-level configuration points in project files (note: a couple of apps end up with duplicate
SL_MATTER_LOG_LEVELentries and need cleanup).
Reviewed changes
Copilot reviewed 41 out of 41 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| slc/config/sl_matter_config.h | Changes the default Matter log level fallback to NONE. |
| slc/apps/window_app/wifi/matter_wifi_soc_window_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/window_app/wifi/matter_wifi_917_ncp_window_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/window_app/thread/matter_thread_soc_window_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/wake_on_matter/thread/matter_thread_soc_wake_on_matter_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/thermostat/wifi/matter_wifi_soc_thermostat_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/thermostat/wifi/matter_wifi_917_ncp_thermostat_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/thermostat/thread/matter_thread_soc_thermostat_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/refrigerator_app/wifi/matter_wifi_soc_refrigerator_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/refrigerator_app/thread/matter_thread_soc_refrigerator_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/rangehood_app/wifi/matter_wifi_soc_rangehood_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/rangehood_app/thread/matter_thread_soc_rangehood_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/platform_template/wifi/matter_wifi_soc_platform_template_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/platform_template/thread/matter_thread_soc_platform_template_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/performance_test_app/thread/matter_thread_soc_performance_test_app_freertos.slcp | Adds a PROGRESS log-level define (currently duplicates an existing NONE entry). |
| slc/apps/oven_app/wifi/matter_wifi_soc_oven_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/onoff_plug_app/wifi/matter_wifi_soc_onoff_plug_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/onoff_plug_app/thread/matter_thread_soc_onoff_plug_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/multi_sensor_app/wifi/matter_wifi_soc_multi_sensor_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/multi_sensor_app/thread/matter_thread_soc_multi_sensor_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/lock_app/wifi/matter_wifi_soc_lock_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/lock_app/wifi/matter_wifi_917_ncp_lock_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/lock_app/wifi/matter_wifi_917_ncp_lock_app_dual_stack_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/lock_app/thread/matter_thread_soc_lock_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/lighting_app/wifi/matter_wifi_soc_lighting_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/lighting_app/thread/trustzone/matter_thread_soc_lighting_app_trustzone_ns_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/lighting_app/thread/matter_thread_soc_lighting_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/light_switch_app/wifi/matter_wifi_soc_light_switch_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/light_switch_app/thread/matter_thread_soc_light_switch_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/fan_control_app/wifi/matter_wifi_soc_fan_control_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/fan_control_app/wifi/matter_wifi_917_ncp_fan_control_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/fan_control_app/thread/matter_thread_soc_fan_control_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/evse_app/wifi/matter_wifi_soc_evse_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/evse_app/thread/matter_thread_soc_evse_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/dishwasher_app/wifi/matter_wifi_soc_dishwasher_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/dishwasher_app/thread/matter_thread_soc_dishwasher_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/code_size_sensor/thread/matter_thread_soc_code_size_sensor_freertos.slcp | Adds a PROGRESS log-level define (currently duplicates an existing NONE entry). |
| slc/apps/closure_app/wifi/matter_wifi_soc_closure_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/closure_app/thread/matter_thread_soc_closure_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/air_quality_sensor_app/wifi/matter_wifi_soc_air_quality_sensor_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
| slc/apps/air_quality_sensor_app/thread/matter_thread_soc_air_quality_sensor_app_freertos.slcp | Explicitly sets Matter log level to PROGRESS for this app. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
113
to
116
| - name: SL_MATTER_LOG_LEVEL | ||
| value: SL_MATTER_LOG_PROGRESS | ||
| - name: SL_MATTER_LOG_LEVEL | ||
| value: "SL_MATTER_LOG_NONE" |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue Link:
#MATTER-6305
Description of Problem/Feature:
the macro SL_MATTER_LOG_LEVEL is directly linked to the Matter log level with the default level Progress, even if the LOG_ENABLED macro is set to 0 the actual logs are compiled but excluded (maybe/surely?) at the linking process.
Description of Fix/Solution:
The PR removes the guess work related to the optimization factor and to which toolchain we actually uses. By default no logs string will be compiled unless we override the define in the SLCP file with an Actual log level.
another possible solution would be to add a define switch that sets this level to NONE if LOG_ENABLED is set to false but sometime you want logs, just not from the Matter stack (e.g. OT logs requires LOG_ENABLED to be true in order to get pushed to the UART/RTT)
Testing Done:
Tested locally with a MG24