1menu "Cache config"
2
3    choice ESP32S2_INSTRUCTION_CACHE_SIZE
4        prompt "Instruction cache size"
5        default ESP32S2_INSTRUCTION_CACHE_8KB
6        help
7            Instruction cache size to be set on application startup.
8            If you use 8KB instruction cache rather than 16KB instruction cache,
9            then the other 8KB will be added to the heap.
10
11        config ESP32S2_INSTRUCTION_CACHE_8KB
12            bool "8KB"
13        config ESP32S2_INSTRUCTION_CACHE_16KB
14            bool "16KB"
15    endchoice
16
17    choice ESP32S2_INSTRUCTION_CACHE_LINE_SIZE
18        prompt "Instruction cache line size"
19        default ESP32S2_INSTRUCTION_CACHE_LINE_32B
20        help
21            Instruction cache line size to be set on application startup.
22
23        config ESP32S2_INSTRUCTION_CACHE_LINE_16B
24            bool "16 Bytes"
25        config ESP32S2_INSTRUCTION_CACHE_LINE_32B
26            bool "32 Bytes"
27    endchoice
28
29    choice ESP32S2_DATA_CACHE_SIZE
30        prompt "Data cache size"
31        default ESP32S2_DATA_CACHE_8KB
32        help
33            Data cache size to be set on application startup.
34            If you use 0KB data cache, the other 16KB will be added to the heap
35            If you use 8KB data cache rather than 16KB data cache, the other 8KB will be added to the heap
36
37        config ESP32S2_DATA_CACHE_0KB
38            depends on !SPIRAM
39            bool "0KB"
40        config ESP32S2_DATA_CACHE_8KB
41            bool "8KB"
42        config ESP32S2_DATA_CACHE_16KB
43            bool "16KB"
44    endchoice
45
46    choice ESP32S2_DATA_CACHE_LINE_SIZE
47        prompt "Data cache line size"
48        default ESP32S2_DATA_CACHE_LINE_32B
49        help
50            Data cache line size to be set on application startup.
51
52        config ESP32S2_DATA_CACHE_LINE_16B
53            bool "16 Bytes"
54        config ESP32S2_DATA_CACHE_LINE_32B
55            bool "32 Bytes"
56    endchoice
57
58    config ESP32S2_INSTRUCTION_CACHE_WRAP
59        bool "Enable instruction cache wrap"
60        default "n"
61        help
62            If enabled, instruction cache will use wrap mode to read spi flash (maybe spiram).
63            The wrap length equals to INSTRUCTION_CACHE_LINE_SIZE.
64            However, it depends on complex conditions.
65
66    config ESP32S2_DATA_CACHE_WRAP
67        bool "Enable data cache wrap"
68        default "n"
69        help
70            If enabled, data cache will use wrap mode to read spiram (maybe spi flash).
71            The wrap length equals to DATA_CACHE_LINE_SIZE.
72            However, it depends on complex conditions.
73
74endmenu  # Cache config
75