arduino-esp32/docs/source/faq.rst
Tomáš Pilný a2c892073b
Updated preferences and FAQ documentation (added SPIFFS) (#8150)
* Updated preferences.rst

* Added into FAQ info about SPIFFS failed mount
2023-05-11 13:49:30 +03:00

34 lines
No EOL
1.6 KiB
ReStructuredText

##########################
Frequently Asked Questions
##########################
How to modify an sdkconfig option in Arduino?
---------------------------------------------
Arduino-esp32 project is based on ESP-IDF. While ESP-IDF supports configuration of various compile-time options (known as "Kconfig options" or "sdkconfig options") via a "menuconfig" tool, this feature is not available in Arduino IDE.
To use the arduino-esp32 core with a modified sdkconfig option, you need to use ESP-IDF to compile Arduino libraries. Please see :doc:`esp-idf_component` and :doc:`lib_builder` for the two solutions available.
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>
SPIFFS mount failed
-------------------
When you come across and error like this:
.. code-block:: shell
E (588) SPIFFS: mount failed, -10025
[E][SPIFFS.cpp:47] begin(): Mounting SPIFFS failed! Error: -1
Try enforcing format on fail in your code by adding ``true`` in the ``begin`` method such as this:
.. code-block:: c++
SPIFFS.begin(true);
See the method prototype for reference: ``bool begin(bool formatOnFail=false, const char * basePath="/spiffs", uint8_t maxOpenFiles=10, const char * partitionLabel=NULL);``