jingfei195887 commented on issue #20414: URL: https://github.com/apache/nuttx/issues/20414#issuecomment-6858187363
@acassis thanks, good point. #21853 adds `CONFIG_SYSLOG_OPENLOG` (default `!DEFAULT_SMALL`). When it is off, `openlog()` and `closelog()` remain as functions that do nothing, so programs that call them still build and link, and the messages have no ident, as when a program never calls `openlog()`. On `stm32f103-minimum:nsh` this gives back all of the growth from #21128: flash -304 B, bss -40 B. With the option on, the image is the same size as master. @casaroli thanks for pointing to `CONFIG_LIBC_PRINTF_MINIMAL`. I measured it on the same board on top of #21853: | printf profile | text (B) | |---|---:| | Default | 53,728 | | Minimal | 53,176 (-552) | | Minimal + `LIBC_PRINTF_LONG_LONG` | 53,376 (-352) | One thing to note for nsh: Minimal turns `LIBC_PRINTF_LONG_LONG` off, and `hexdump` prints its offset with `%08jx`, which would then print `?` on a 32-bit CPU (per the Kconfig help; I have not checked it on hardware). Keeping `LONG_LONG` on avoids this and still saves 352 B. Should `DEFAULT_SMALL` select the Minimal profile by default? That would change the printf output of the 140 board configurations that set `DEFAULT_SMALL`, so I'd like your opinion before I send a patch. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
