Skip to content

Commit f32223a

Browse files
gudnimgfabiobaltieri
authored andcommitted
debug: ASSERT_VERBOSE depends on PRINTK
When both PRINTK and ASSERT are disabled, the firmware image will still contain a symbol for assert_print function which increases the memory footprint by 14 bytes. In this case the function doesn't do anything and so these 14 bytes are not useful. This change also reduces the memory footprint elsewhere such as in the bluetooth subsystem which implements BT_ASSERT_VERBOSE. Now it will be nop. On nRF52832 this is on the order of 300 - 400 bytes when configured for peripheral only (just as an example). Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
1 parent f6821fb commit f32223a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎subsys/debug/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ config FORCE_NO_ASSERT
228228
config ASSERT_VERBOSE
229229
bool "Verbose assertions"
230230
default y
231+
depends on PRINTK
231232
help
232233
This option enables printing an assert message with information about
233234
the assertion that occurred. This includes printing the location,

0 commit comments

Comments
 (0)