assert: disable function/line print if DEBUG_ASSERTIONS_FILENAME disabled

Test on sim/nsh:
(CONFIG_DEBUG_ASSERTIONS=y CONFIG_DEFAULT_SMALL=y)
   text	   data	    bss	    dec	    hex	filename
 423626	  27152	   4128	 454906	  6f0fa	nuttx     /* before */
 417010	  27152	   4128	 448290	  6d722	nuttx     /* after */
  -6616

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an
2023-06-08 22:08:23 +08:00
committed by Xiang Xiao
parent 2369e3cbc8
commit 3ce2796175
3 changed files with 28 additions and 10 deletions
+9
View File
@@ -665,6 +665,15 @@ config DEBUG_ASSERTIONS_EXPRESSION
function when it is triggered. This option maybe will take up a lot
of space.
config DEBUG_ASSERTIONS_FILENAME
bool "Enable Debug Assertions show file name"
default !DEFAULT_SMALL
depends on DEBUG_ASSERTIONS
---help---
This option can display the file information of the ASSERT()
function when it is enabled. This option maybe will take up a lot
of space.
comment "Subsystem Debug Options"
config DEBUG_AUDIO