README.md
1# Custom Flash Driver Example
2
3This example shows how to override the default chip driver list provided by IDF. Please make sure the SPI_FLASH_OVERRIDE_CHIP_DRIVER_LIST config option is enabled when you build this project (though it should already be enabled by default via `sdkconfig.defaults`). See [the programming guide](https://docs.espressif.com/projects/esp-idf/en/stable/api-reference/storage/spi_flash_override_driver.html) for more details regarding this feature.
4
5**CAUTION: This is only an example showing how to extend your own flash chip driver. Espressif doesn't guarantee the chip driver in the example is reliable for mass production, nor the reliability of the flash models that appear in this example. Please refer to the specification of your flash chip, or contact the flash vendor if you have any problems with the flash chip.**
6
7(See the README.md file in the upper level 'examples' directory for more information about examples.)
8
9## How to use example
10
11Follow detailed instructions provided specifically for this example.
12
13Select the instructions depending on Espressif chip installed on your development board:
14
15- [ESP32 Getting Started Guide](https://docs.espressif.com/projects/esp-idf/en/stable/get-started/index.html)
16- [ESP32-S2 Getting Started Guide](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/get-started/index.html)
17
18
19## Example folder contents
20
21The project **custom_flash_driver** contains one source file in C language [main.c](main/main.c). The file is located in folder [main](main).
22
23The component **custom_chip_driver** placed under **components** folder, provides
24
25ESP-IDF projects are built using CMake. The project build configuration is contained in `CMakeLists.txt` files that provide set of directives and instructions describing the project's source files and targets (executable, library, or both).
26
27Below is short explanation of remaining files in the project folder.
28
29```
30├── CMakeLists.txt
31├── sdkconfig.defaults Default options to add into sdkconfig file (mainly to enable the SPI_FLASH_OVERRIDE_CHIP_DRIVER_LIST option)
32├── example_test.py Python script used for automated example testing
33├── main
34│ ├── CMakeLists.txt
35│ ├── component.mk Component make file
36│ └── main.c
37├── components/custom_chip_driver
38│ ├── CMakeLists.txt
39│ ├── component.mk Component make file
40│ ├── linker.lf Linker script to put the customized chip driver into internal RAM
41│ ├── project_include.cmake Global cmake file to add dependency to spi_flash
42│ ├── chip_drivers.c
43│ └── spi_flash_chip_eon.c
44├── Makefile Makefile used by legacy GNU Make
45└── README.md This is the file you are currently reading
46```
47
48For more information on structure and contents of ESP-IDF projects, please refer to Section [Build System](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html) of the ESP-IDF Programming Guide.
49
50## Troubleshooting
51
52* Program upload failure
53
54 * Hardware connection is not correct: run `idf.py -p PORT monitor`, and reboot your board to see if there are any output logs.
55 * The baud rate for downloading is too high: lower your baud rate in the `menuconfig` menu, and try again.
56
57## Technical support and feedback
58
59Please use the following feedback channels:
60
61* For technical queries, go to the [esp32.com](https://esp32.com/) forum
62* For a feature request or bug report, create a [GitHub issue](https://github.com/espressif/esp-idf/issues)
63
64We will get back to you as soon as possible.
65