未验证 提交 b58e7ab0 编写于 作者: T Tomáš Pilný 提交者: GitHub

Doc addition: How to compile libs with different debug level (#7193)

* Initial commit with guide on building libs wirh higher debug level

* Added reference to FAQ

* Reword portion of core_debug.rst

* Removed extra empty line
Co-authored-by: NVojtěch Bartoška <76958047+VojtechBartoska@users.noreply.github.com>
上级 9025c686
......@@ -11,3 +11,7 @@ To use the arduino-esp32 core with a modified sdkconfig option, you need to use
Note that modifying ``sdkconfig`` or ``sdkconfig.h`` files found in the arduino-esp32 project tree **does not** result in changes to these options. This is because ESP-IDF libraries are included into the arduino-esp32 project tree as pre-built libraries.
How to compile libs with different debug level?
-----------------------------------------------
The short answer is ``esp32-arduino-lib-builder/configs/defconfig.common:44``. A guide explaining the process can be found here <guides/core_debug>
##################################
Compile Arduino libs with ESP_LOGx
##################################
There are 2 primary approaches and both of them involve editing file ``configs/defconfig.common``.
Edit the file directly and then build.
Later you can ``git restore configs/defconfig.common`` to go back.
Copy the file ``cp configs/defconfig.common configs/defconfig.debug`` and edit the debug version.
``vim configs/defconfig.common`` or ``vim configs/defconfig.debug``
Edit **line 44** containing by default ``CONFIG_LOG_DEFAULT_LEVEL_ERROR=y`` to one of the following lines depending on your desired log level:
.. code-block:: bash
CONFIG_LOG_DEFAULT_LEVEL_NONE=y # No output
CONFIG_LOG_DEFAULT_LEVEL_ERROR=y # Errors - default
CONFIG_LOG_DEFAULT_LEVEL_WARN=y # Warnings
CONFIG_LOG_DEFAULT_LEVEL_INFO=y # Info
CONFIG_LOG_DEFAULT_LEVEL_DEBUG=y # Debug
CONFIG_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 the ``defconfig`` file and the debug settings are in file ``configs/defconfig.debug`` add flag ``debug`` to compilation command.
Example : ``./build.sh debug``
- **Option 1**: Build for all SoCs: ``./build.sh``
- **Option 2**: Build for one SoC: ``./build.sh -t <soc>``. The exact text to choose the SoC:
- ``esp32``
- ``esp32s2``
- ``esp32c3``
- ``esp32s3``
- Example: ``./build.sh -t esp32``
- A wrong format or non-existing SoC will result in the error sed: can't read sdkconfig: No such file or directory
- **Option 3**: Build for multiple SoCs (not all) - simply write them down separated with space: ``./build.sh -t <soc1> <soc2> <soc3>``
- Example: ``./build.sh -t esp32 esp32-c3``
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册