I'm trying to slim down my application to fit in an nRF52832 (currently overflows RAM when building) so I'm carving things out using the prj.conf file. But I'm running into weirdness:
I set CONFIG_PRINTK=n hoping to suppress all the code and memory used by debug prints. Except while building I get:
warning: PRINTK (defined at subsys/debug/Kconfig:145) was assigned the value 'n' but got the value 'y'. See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_PRINTK and/or look up PRINTK in the menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful too.
Ok, seems legit so I follow the link and read up on CONFIG_PRINTK. According to the documentation, it is selected by CONFIG_BOOT_BANNER, CONFIG_LOG, CONFIG_LOG_MODE_MINIMAL all three of which I explicitly set to "n" in the prj.conf file. Weird, let's go check the zephyr/.config file. Turns out the CONFIG_LOG is set to "y" in that file, even though I explicitly set it to "n" and the build never gave a warning that the value was being overridden. Even stranger, none of the "selected by" options in the KConfig documentation for CONFIG_LOG are even present - one way or the other - in the .config file. So I add all to the prj.conf and set them to "n". No difference.
How do I make it actually remove printing/logging? I tried looking in the "nRF Kconfig GUI" in VS Code and "Logging" is unchecked and the "Send printk() to console" is checked but greyed out so I can't uncheck it.