sdkconfig.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 iosabi
3  * Copyright (C) 2024 Gunar Schorcht
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
10 #pragma once
11 
31 #ifndef DOXYGEN
32 
33 #include "esp_idf_ver.h"
34 
35 #if defined(CPU_FAM_ESP32)
37 #elif defined(CPU_FAM_ESP32C3)
39 #elif defined(CPU_FAM_ESP32S2)
41 #elif defined(CPU_FAM_ESP32S3)
43 #else
44 #error "ESP32x family implementation missing"
45 #endif
46 
48 
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
52 
53 #define CONFIG_BOOTLOADER_PROJECT_VER 1
54 
55 #if MODULE_ESP_LOG_COLORED
56 # define CONFIG_BOOTLOADER_LOG_COLORS 1
57 #endif
58 
59 #ifndef CONFIG_BOOTLOADER_LOG_LEVEL
60 /*
61  * SDK Log levels:
62  *
63  * 0 = NONE
64  * 1 = ERROR
65  * 2 = WARN
66  * 3 = INFO
67  * 4 = DEBUG
68  * 5 = VERBOSE
69  */
70 #if MODULE_ESP_LOG_STARTUP
71 #define CONFIG_BOOTLOADER_LOG_LEVEL 3 /* INFO */
72 #else
73 #define CONFIG_BOOTLOADER_LOG_LEVEL 0 /* NONE */
74 #endif
75 #endif
76 
80 #if !defined(CONFIG_FLASHMODE_DOUT) && \
81  !defined(CONFIG_FLASHMODE_DIO) && \
82  !defined(CONFIG_FLASHMODE_QOUT) && \
83  !defined(CONFIG_FLASHMODE_QIO)
84 #error "Flash mode not configured"
85 #endif
86 
87 /*
88  * Bootloader output baudrate, defined by the app settings as BAUD or
89  * BOOTLOADER_BAUD.
90  */
91 #define CONFIG_ESP_CONSOLE_UART_BAUDRATE (RIOT_BOOTLOADER_BAUD)
92 
93 /*
94  * If custom TX and RX are defined, use custom UART configuration for 2nd stage
95  * bootloader.
96  */
97 #if defined(CONFIG_CONSOLE_UART_TX) && defined(CONFIG_CONSOLE_UART_RX)
98 #define CONFIG_ESP_CONSOLE_UART_CUSTOM 1
99 #define CONFIG_ESP_CONSOLE_UART_TX_GPIO CONFIG_CONSOLE_UART_TX
100 #define CONFIG_ESP_CONSOLE_UART_RX_GPIO CONFIG_CONSOLE_UART_RX
101 #else
102 #define CONFIG_ESP_CONSOLE_UART_DEFAULT 1
103 #endif
104 
105 #if defined(CONFIG_CONSOLE_UART_NUM)
106 #define CONFIG_ESP_CONSOLE_UART_NUM CONFIG_CONSOLE_UART_NUM
107 #else
108 #define CONFIG_ESP_CONSOLE_UART_NUM 0
109 #endif
110 
111 #define CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM CONFIG_ESP_CONSOLE_UART_NUM
112 
113 #define CONFIG_LOG_TAG_LEVEL_IMPL_CACHE_AND_LINKED_LIST 1
114 
115 #ifdef __cplusplus
116 }
117 #endif
118 
119 #endif /* DOXYGEN */
Default SDK configuration for all ESP32x SoC bootloaders.
Default SDK configuration for the ESP32 SoC bootloader.
Default SDK configuration for the ESP32-C3 SoC bootloader.
Default SDK configuration for the ESP32-S2 SoC bootloader.
Default SDK configuration for the ESP32-S3 SoC bootloader.