1# Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
2# SPDX-License-Identifier: Apache-2.0
3
4if SOC_SERIES_ESP32C2 || SOC_SERIES_ESP32C3 || SOC_SERIES_ESP32C6
5
6config GEN_ISR_TABLES
7	default y
8
9config GEN_SW_ISR_TABLE
10	default y
11
12config GEN_IRQ_VECTOR_TABLE
13	default n
14
15config DYNAMIC_INTERRUPTS
16	default y
17
18config ISR_STACK_SIZE
19	default 2048
20
21config ATOMIC_OPERATIONS_C
22	default y
23
24config XTAL_FREQ_HZ
25	int
26	default $(dt_node_int_prop_int,/cpus/cpu@0,xtal-freq)
27
28config SYS_CLOCK_HW_CYCLES_PER_SEC
29	default 10400000 if XTAL_FREQ_HZ = 26000000
30	default 16000000 if XTAL_FREQ_HZ = 40000000
31
32config SYS_CLOCK_TICKS_PER_SEC
33	default 1000
34
35config MINIMAL_LIBC_OPTIMIZE_STRING_FOR_SIZE
36	default n
37
38config SOC_FLASH_ESP32
39	default y
40
41if BOOTLOADER_MCUBOOT
42
43config HAS_FLASH_LOAD_OFFSET
44	default y
45
46config MCUBOOT_GENERATE_UNSIGNED_IMAGE
47	default y
48
49config MCUBOOT_GENERATE_CONFIRMED_IMAGE
50	default y
51
52config ROM_START_OFFSET
53	default 0x20
54
55endif # BOOTLOADER_MCUBOOT
56
57endif # SOC_SERIES_ESP32C2 || SOC_SERIES_ESP32C3 || SOC_SERIES_ESP32C6
58
59if SOC_SERIES_ESP32 || SOC_SERIES_ESP32S2 || SOC_SERIES_ESP32S3
60
61# Xtensa default options for ESP32 family
62config XTENSA_RESET_VECTOR
63	default n
64
65config XTENSA_USE_CORE_CRT1
66	default n
67
68config GEN_ISR_TABLES
69	default y
70
71config GEN_IRQ_VECTOR_TABLE
72	default n
73
74config CLOCK_CONTROL
75	default y
76
77config SOC_FLASH_ESP32
78	default y
79
80config SYS_CLOCK_HW_CYCLES_PER_SEC
81	default $(dt_node_int_prop_int,/cpus/cpu@0,clock-frequency)
82
83config XTENSA_CCOUNT_HZ
84	default SYS_CLOCK_HW_CYCLES_PER_SEC
85
86config MINIMAL_LIBC_OPTIMIZE_STRING_FOR_SIZE
87	default n
88
89if BOOTLOADER_MCUBOOT
90
91config HAS_FLASH_LOAD_OFFSET
92	default y
93
94config MCUBOOT_GENERATE_UNSIGNED_IMAGE
95	default y
96
97config MCUBOOT_GENERATE_CONFIRMED_IMAGE
98	default y
99
100config ROM_START_OFFSET
101	default 0x20
102
103endif # BOOTLOADER_MCUBOOT
104
105endif # SOC_SERIES_ESP32 || SOC_SERIES_ESP32S2 || SOC_SERIES_ESP32S3
106