Compile Arduino libs with ESP_LOGx
There are 2 primary approaches and both of them involve editing fileconfigs/defconfig.common.Edit the file directly and then build.Later you cangitrestoreconfigs/defconfig.common to go back.Copy the filecpconfigs/defconfig.commonconfigs/defconfig.debug and edit the debug version.
vimconfigs/defconfig.common orvimconfigs/defconfig.debug
Editline 44 containing by defaultCONFIG_LOG_DEFAULT_LEVEL_ERROR=y to one of the following lines depending on your desired log level:
CONFIG_LOG_DEFAULT_LEVEL_NONE=y# No outputCONFIG_LOG_DEFAULT_LEVEL_ERROR=y# Errors - defaultCONFIG_LOG_DEFAULT_LEVEL_WARN=y# WarningsCONFIG_LOG_DEFAULT_LEVEL_INFO=y# InfoCONFIG_LOG_DEFAULT_LEVEL_DEBUG=y# DebugCONFIG_LOG_DEFAULT_LEVEL_VERBOSE=y# Verbose
Then simply build the libs for all SoCs or one specific SoC. Note that building for all SoCs takes a lot of time, so if you are working only with specific SoC(s), build only for those.
Note
If you have copied thedefconfig file and the debug settings are in fileconfigs/defconfig.debug add flagdebug to compilation command.Example :./build.shdebug
Option 1: Build for all SoCs:
./build.shOption 2: Build for one SoC:
./build.sh-t<soc>. The exact text to choose the SoC:esp32esp32s2esp32c3esp32s3Example:
./build.sh-tesp32A wrong format or non-existing SoC will result in the error sed: can’t read sdkconfig: No such file or directory