Skip to content

Fix Log code size - #996

Open
Jean-Francois Penven (jepenven-silabs) wants to merge 2 commits into
release_2.10-1.6.1from
fix_log_code_size
Open

Jean-Francois Penven (jepenven-silabs) wants to merge 2 commits into
release_2.10-1.6.1from
fix_log_code_size

Conversation

@jepenven-silabs

@jepenven-silabs Jean-Francois Penven (jepenven-silabs) commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_LEVEL fallback in sl_matter_config.h to SL_MATTER_LOG_NONE.
  • Add SL_MATTER_LOG_LEVEL = SL_MATTER_LOG_PROGRESS overrides to many example/application .slcp projects 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_LEVEL entries 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 thread slc/config/sl_matter_config.h
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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants