1 //Do not edit this file because it is autogenerated by gen_esp_err_to_name.py
4 #if __has_include("soc/soc.h")
7 #if __has_include("apps/ping/esp_ping.h")
8 #include "apps/ping/esp_ping.h"
10 #if __has_include("esp32/ulp.h")
11 #include "esp32/ulp.h"
13 #if __has_include("esp_err.h")
16 #if __has_include("esp_http_client.h")
17 #include "esp_http_client.h"
19 #if __has_include("esp_image_format.h")
20 #include "esp_image_format.h"
22 #if __has_include("esp_mesh.h")
25 #if __has_include("esp_now.h")
28 #if __has_include("esp_ota_ops.h")
29 #include "esp_ota_ops.h"
31 #if __has_include("esp_spi_flash.h")
32 #include "esp_spi_flash.h"
34 #if __has_include("esp_wifi.h")
37 #if __has_include("esp_wps.h")
40 #if __has_include("http_server.h")
41 #include "http_server.h"
43 #if __has_include("nvs.h")
46 #if __has_include("tcpip_adapter.h")
47 #include "tcpip_adapter.h"
50 #ifdef CONFIG_ESP_ERR_TO_NAME_LOOKUP
51 #define ERR_TBL_IT(err) {err, #err}
58 static const esp_err_msg_t esp_err_msg_table[] = {
59 // components/esp32/include/esp_err.h
61 ERR_TBL_IT(ESP_FAIL), /* -1 Generic esp_err_t code indicating failure */
64 ERR_TBL_IT(ESP_OK), /* 0 esp_err_t value indicating success (no error) */
66 # ifdef ESP_ERR_NO_MEM
67 ERR_TBL_IT(ESP_ERR_NO_MEM), /* 257 0x101 Out of memory */
69 # ifdef ESP_ERR_INVALID_ARG
70 ERR_TBL_IT(ESP_ERR_INVALID_ARG), /* 258 0x102 Invalid argument */
72 # ifdef ESP_ERR_INVALID_STATE
73 ERR_TBL_IT(ESP_ERR_INVALID_STATE), /* 259 0x103 Invalid state */
75 # ifdef ESP_ERR_INVALID_SIZE
76 ERR_TBL_IT(ESP_ERR_INVALID_SIZE), /* 260 0x104 Invalid size */
78 # ifdef ESP_ERR_NOT_FOUND
79 ERR_TBL_IT(ESP_ERR_NOT_FOUND), /* 261 0x105 Requested resource not found */
81 # ifdef ESP_ERR_NOT_SUPPORTED
82 ERR_TBL_IT(ESP_ERR_NOT_SUPPORTED), /* 262 0x106 Operation or feature not supported */
84 # ifdef ESP_ERR_TIMEOUT
85 ERR_TBL_IT(ESP_ERR_TIMEOUT), /* 263 0x107 Operation timed out */
87 # ifdef ESP_ERR_INVALID_RESPONSE
88 ERR_TBL_IT(ESP_ERR_INVALID_RESPONSE), /* 264 0x108 Received response was invalid */
90 # ifdef ESP_ERR_INVALID_CRC
91 ERR_TBL_IT(ESP_ERR_INVALID_CRC), /* 265 0x109 CRC or checksum was invalid */
93 # ifdef ESP_ERR_INVALID_VERSION
94 ERR_TBL_IT(ESP_ERR_INVALID_VERSION), /* 266 0x10a Version was invalid */
96 # ifdef ESP_ERR_INVALID_MAC
97 ERR_TBL_IT(ESP_ERR_INVALID_MAC), /* 267 0x10b MAC address was invalid */
99 // components/nvs_flash/include/nvs.h
100 # ifdef ESP_ERR_NVS_BASE
101 ERR_TBL_IT(ESP_ERR_NVS_BASE), /* 4352 0x1100 Starting number of error codes */
103 # ifdef ESP_ERR_NVS_NOT_INITIALIZED
104 ERR_TBL_IT(ESP_ERR_NVS_NOT_INITIALIZED), /* 4353 0x1101 The storage driver is not initialized */
106 # ifdef ESP_ERR_NVS_NOT_FOUND
107 ERR_TBL_IT(ESP_ERR_NVS_NOT_FOUND), /* 4354 0x1102 Id namespace doesn’t exist yet and mode is
110 # ifdef ESP_ERR_NVS_TYPE_MISMATCH
111 ERR_TBL_IT(ESP_ERR_NVS_TYPE_MISMATCH), /* 4355 0x1103 The type of set or get operation doesn't
112 match the type of value stored in NVS */
114 # ifdef ESP_ERR_NVS_READ_ONLY
115 ERR_TBL_IT(ESP_ERR_NVS_READ_ONLY), /* 4356 0x1104 Storage handle was opened as read only */
117 # ifdef ESP_ERR_NVS_NOT_ENOUGH_SPACE
118 ERR_TBL_IT(ESP_ERR_NVS_NOT_ENOUGH_SPACE), /* 4357 0x1105 There is not enough space in the underlying
119 storage to save the value */
121 # ifdef ESP_ERR_NVS_INVALID_NAME
122 ERR_TBL_IT(ESP_ERR_NVS_INVALID_NAME), /* 4358 0x1106 Namespace name doesn’t satisfy constraints */
124 # ifdef ESP_ERR_NVS_INVALID_HANDLE
125 ERR_TBL_IT(ESP_ERR_NVS_INVALID_HANDLE), /* 4359 0x1107 Handle has been closed or is NULL */
127 # ifdef ESP_ERR_NVS_REMOVE_FAILED
128 ERR_TBL_IT(ESP_ERR_NVS_REMOVE_FAILED), /* 4360 0x1108 The value wasn’t updated because flash write
129 operation has failed. The value was written
130 however, and update will be finished after
131 re-initialization of nvs, provided that
132 flash operation doesn’t fail again. */
134 # ifdef ESP_ERR_NVS_KEY_TOO_LONG
135 ERR_TBL_IT(ESP_ERR_NVS_KEY_TOO_LONG), /* 4361 0x1109 Key name is too long */
137 # ifdef ESP_ERR_NVS_PAGE_FULL
138 ERR_TBL_IT(ESP_ERR_NVS_PAGE_FULL), /* 4362 0x110a Internal error; never returned by nvs API
141 # ifdef ESP_ERR_NVS_INVALID_STATE
142 ERR_TBL_IT(ESP_ERR_NVS_INVALID_STATE), /* 4363 0x110b NVS is in an inconsistent state due to a
143 previous error. Call nvs_flash_init and
144 nvs_open again, then retry. */
146 # ifdef ESP_ERR_NVS_INVALID_LENGTH
147 ERR_TBL_IT(ESP_ERR_NVS_INVALID_LENGTH), /* 4364 0x110c String or blob length is not sufficient to
150 # ifdef ESP_ERR_NVS_NO_FREE_PAGES
151 ERR_TBL_IT(ESP_ERR_NVS_NO_FREE_PAGES), /* 4365 0x110d NVS partition doesn't contain any empty
152 pages. This may happen if NVS partition was
153 truncated. Erase the whole partition and
154 call nvs_flash_init again. */
156 # ifdef ESP_ERR_NVS_VALUE_TOO_LONG
157 ERR_TBL_IT(ESP_ERR_NVS_VALUE_TOO_LONG), /* 4366 0x110e String or blob length is longer than
158 supported by the implementation */
160 # ifdef ESP_ERR_NVS_PART_NOT_FOUND
161 ERR_TBL_IT(ESP_ERR_NVS_PART_NOT_FOUND), /* 4367 0x110f Partition with specified name is not found
162 in the partition table */
164 # ifdef ESP_ERR_NVS_NEW_VERSION_FOUND
165 ERR_TBL_IT(ESP_ERR_NVS_NEW_VERSION_FOUND), /* 4368 0x1110 NVS partition contains data in new format
166 and cannot be recognized by this version of
169 // components/ulp/include/esp32/ulp.h
170 # ifdef ESP_ERR_ULP_BASE
171 ERR_TBL_IT(ESP_ERR_ULP_BASE), /* 4608 0x1200 Offset for ULP-related error codes */
173 # ifdef ESP_ERR_ULP_SIZE_TOO_BIG
174 ERR_TBL_IT(ESP_ERR_ULP_SIZE_TOO_BIG), /* 4609 0x1201 Program doesn't fit into RTC memory reserved
177 # ifdef ESP_ERR_ULP_INVALID_LOAD_ADDR
178 ERR_TBL_IT(ESP_ERR_ULP_INVALID_LOAD_ADDR), /* 4610 0x1202 Load address is outside of RTC memory
179 reserved for the ULP */
181 # ifdef ESP_ERR_ULP_DUPLICATE_LABEL
182 ERR_TBL_IT(ESP_ERR_ULP_DUPLICATE_LABEL), /* 4611 0x1203 More than one label with the same number was
185 # ifdef ESP_ERR_ULP_UNDEFINED_LABEL
186 ERR_TBL_IT(ESP_ERR_ULP_UNDEFINED_LABEL), /* 4612 0x1204 Branch instructions references an undefined label */
188 # ifdef ESP_ERR_ULP_BRANCH_OUT_OF_RANGE
189 ERR_TBL_IT(ESP_ERR_ULP_BRANCH_OUT_OF_RANGE), /* 4613 0x1205 Branch target is out of range of B
190 instruction (try replacing with BX) */
192 // components/app_update/include/esp_ota_ops.h
193 # ifdef ESP_ERR_OTA_BASE
194 ERR_TBL_IT(ESP_ERR_OTA_BASE), /* 5376 0x1500 Base error code for ota_ops api */
196 # ifdef ESP_ERR_OTA_PARTITION_CONFLICT
197 ERR_TBL_IT(ESP_ERR_OTA_PARTITION_CONFLICT), /* 5377 0x1501 Error if request was to write or erase the
198 current running partition */
200 # ifdef ESP_ERR_OTA_SELECT_INFO_INVALID
201 ERR_TBL_IT(ESP_ERR_OTA_SELECT_INFO_INVALID), /* 5378 0x1502 Error if OTA data partition contains invalid
204 # ifdef ESP_ERR_OTA_VALIDATE_FAILED
205 ERR_TBL_IT(ESP_ERR_OTA_VALIDATE_FAILED), /* 5379 0x1503 Error if OTA app image is invalid */
207 // components/bootloader_support/include/esp_image_format.h
208 # ifdef ESP_ERR_IMAGE_BASE
209 ERR_TBL_IT(ESP_ERR_IMAGE_BASE), /* 8192 0x2000 */
211 # ifdef ESP_ERR_IMAGE_FLASH_FAIL
212 ERR_TBL_IT(ESP_ERR_IMAGE_FLASH_FAIL), /* 8193 0x2001 */
214 # ifdef ESP_ERR_IMAGE_INVALID
215 ERR_TBL_IT(ESP_ERR_IMAGE_INVALID), /* 8194 0x2002 */
217 // components/esp32/include/esp_err.h
218 # ifdef ESP_ERR_WIFI_BASE
219 ERR_TBL_IT(ESP_ERR_WIFI_BASE), /* 12288 0x3000 Starting number of WiFi error codes */
221 // components/esp32/include/esp_wifi.h
222 # ifdef ESP_ERR_WIFI_NOT_INIT
223 ERR_TBL_IT(ESP_ERR_WIFI_NOT_INIT), /* 12289 0x3001 WiFi driver was not installed by esp_wifi_init */
225 # ifdef ESP_ERR_WIFI_NOT_STARTED
226 ERR_TBL_IT(ESP_ERR_WIFI_NOT_STARTED), /* 12290 0x3002 WiFi driver was not started by esp_wifi_start */
228 # ifdef ESP_ERR_WIFI_NOT_STOPPED
229 ERR_TBL_IT(ESP_ERR_WIFI_NOT_STOPPED), /* 12291 0x3003 WiFi driver was not stopped by esp_wifi_stop */
231 # ifdef ESP_ERR_WIFI_IF
232 ERR_TBL_IT(ESP_ERR_WIFI_IF), /* 12292 0x3004 WiFi interface error */
234 # ifdef ESP_ERR_WIFI_MODE
235 ERR_TBL_IT(ESP_ERR_WIFI_MODE), /* 12293 0x3005 WiFi mode error */
237 # ifdef ESP_ERR_WIFI_STATE
238 ERR_TBL_IT(ESP_ERR_WIFI_STATE), /* 12294 0x3006 WiFi internal state error */
240 # ifdef ESP_ERR_WIFI_CONN
241 ERR_TBL_IT(ESP_ERR_WIFI_CONN), /* 12295 0x3007 WiFi internal control block of station or
244 # ifdef ESP_ERR_WIFI_NVS
245 ERR_TBL_IT(ESP_ERR_WIFI_NVS), /* 12296 0x3008 WiFi internal NVS module error */
247 # ifdef ESP_ERR_WIFI_MAC
248 ERR_TBL_IT(ESP_ERR_WIFI_MAC), /* 12297 0x3009 MAC address is invalid */
250 # ifdef ESP_ERR_WIFI_SSID
251 ERR_TBL_IT(ESP_ERR_WIFI_SSID), /* 12298 0x300a SSID is invalid */
253 # ifdef ESP_ERR_WIFI_PASSWORD
254 ERR_TBL_IT(ESP_ERR_WIFI_PASSWORD), /* 12299 0x300b Password is invalid */
256 # ifdef ESP_ERR_WIFI_TIMEOUT
257 ERR_TBL_IT(ESP_ERR_WIFI_TIMEOUT), /* 12300 0x300c Timeout error */
259 # ifdef ESP_ERR_WIFI_WAKE_FAIL
260 ERR_TBL_IT(ESP_ERR_WIFI_WAKE_FAIL), /* 12301 0x300d WiFi is in sleep state(RF closed) and wakeup fail */
262 # ifdef ESP_ERR_WIFI_WOULD_BLOCK
263 ERR_TBL_IT(ESP_ERR_WIFI_WOULD_BLOCK), /* 12302 0x300e The caller would block */
265 # ifdef ESP_ERR_WIFI_NOT_CONNECT
266 ERR_TBL_IT(ESP_ERR_WIFI_NOT_CONNECT), /* 12303 0x300f Station still in disconnect status */
268 // components/esp32/include/esp_wps.h
269 # ifdef ESP_ERR_WIFI_REGISTRAR
270 ERR_TBL_IT(ESP_ERR_WIFI_REGISTRAR), /* 12339 0x3033 WPS registrar is not supported */
272 # ifdef ESP_ERR_WIFI_WPS_TYPE
273 ERR_TBL_IT(ESP_ERR_WIFI_WPS_TYPE), /* 12340 0x3034 WPS type error */
275 # ifdef ESP_ERR_WIFI_WPS_SM
276 ERR_TBL_IT(ESP_ERR_WIFI_WPS_SM), /* 12341 0x3035 WPS state machine is not initialized */
278 // components/esp32/include/esp_now.h
279 # ifdef ESP_ERR_ESPNOW_BASE
280 ERR_TBL_IT(ESP_ERR_ESPNOW_BASE), /* 12388 0x3064 ESPNOW error number base. */
282 # ifdef ESP_ERR_ESPNOW_NOT_INIT
283 ERR_TBL_IT(ESP_ERR_ESPNOW_NOT_INIT), /* 12389 0x3065 ESPNOW is not initialized. */
285 # ifdef ESP_ERR_ESPNOW_ARG
286 ERR_TBL_IT(ESP_ERR_ESPNOW_ARG), /* 12390 0x3066 Invalid argument */
288 # ifdef ESP_ERR_ESPNOW_NO_MEM
289 ERR_TBL_IT(ESP_ERR_ESPNOW_NO_MEM), /* 12391 0x3067 Out of memory */
291 # ifdef ESP_ERR_ESPNOW_FULL
292 ERR_TBL_IT(ESP_ERR_ESPNOW_FULL), /* 12392 0x3068 ESPNOW peer list is full */
294 # ifdef ESP_ERR_ESPNOW_NOT_FOUND
295 ERR_TBL_IT(ESP_ERR_ESPNOW_NOT_FOUND), /* 12393 0x3069 ESPNOW peer is not found */
297 # ifdef ESP_ERR_ESPNOW_INTERNAL
298 ERR_TBL_IT(ESP_ERR_ESPNOW_INTERNAL), /* 12394 0x306a Internal error */
300 # ifdef ESP_ERR_ESPNOW_EXIST
301 ERR_TBL_IT(ESP_ERR_ESPNOW_EXIST), /* 12395 0x306b ESPNOW peer has existed */
303 # ifdef ESP_ERR_ESPNOW_IF
304 ERR_TBL_IT(ESP_ERR_ESPNOW_IF), /* 12396 0x306c Interface error */
306 // components/esp32/include/esp_err.h
307 # ifdef ESP_ERR_MESH_BASE
308 ERR_TBL_IT(ESP_ERR_MESH_BASE), /* 16384 0x4000 Starting number of MESH error codes */
310 // components/esp32/include/esp_mesh.h
311 # ifdef ESP_ERR_MESH_WIFI_NOT_START
312 ERR_TBL_IT(ESP_ERR_MESH_WIFI_NOT_START), /* 16385 0x4001 */
314 # ifdef ESP_ERR_MESH_NOT_INIT
315 ERR_TBL_IT(ESP_ERR_MESH_NOT_INIT), /* 16386 0x4002 */
317 # ifdef ESP_ERR_MESH_NOT_CONFIG
318 ERR_TBL_IT(ESP_ERR_MESH_NOT_CONFIG), /* 16387 0x4003 */
320 # ifdef ESP_ERR_MESH_NOT_START
321 ERR_TBL_IT(ESP_ERR_MESH_NOT_START), /* 16388 0x4004 */
323 # ifdef ESP_ERR_MESH_NOT_SUPPORT
324 ERR_TBL_IT(ESP_ERR_MESH_NOT_SUPPORT), /* 16389 0x4005 */
326 # ifdef ESP_ERR_MESH_NOT_ALLOWED
327 ERR_TBL_IT(ESP_ERR_MESH_NOT_ALLOWED), /* 16390 0x4006 */
329 # ifdef ESP_ERR_MESH_NO_MEMORY
330 ERR_TBL_IT(ESP_ERR_MESH_NO_MEMORY), /* 16391 0x4007 */
332 # ifdef ESP_ERR_MESH_ARGUMENT
333 ERR_TBL_IT(ESP_ERR_MESH_ARGUMENT), /* 16392 0x4008 */
335 # ifdef ESP_ERR_MESH_EXCEED_MTU
336 ERR_TBL_IT(ESP_ERR_MESH_EXCEED_MTU), /* 16393 0x4009 */
338 # ifdef ESP_ERR_MESH_TIMEOUT
339 ERR_TBL_IT(ESP_ERR_MESH_TIMEOUT), /* 16394 0x400a */
341 # ifdef ESP_ERR_MESH_DISCONNECTED
342 ERR_TBL_IT(ESP_ERR_MESH_DISCONNECTED), /* 16395 0x400b */
344 # ifdef ESP_ERR_MESH_QUEUE_FAIL
345 ERR_TBL_IT(ESP_ERR_MESH_QUEUE_FAIL), /* 16396 0x400c */
347 # ifdef ESP_ERR_MESH_QUEUE_FULL
348 ERR_TBL_IT(ESP_ERR_MESH_QUEUE_FULL), /* 16397 0x400d */
350 # ifdef ESP_ERR_MESH_NO_PARENT_FOUND
351 ERR_TBL_IT(ESP_ERR_MESH_NO_PARENT_FOUND), /* 16398 0x400e */
353 # ifdef ESP_ERR_MESH_NO_ROUTE_FOUND
354 ERR_TBL_IT(ESP_ERR_MESH_NO_ROUTE_FOUND), /* 16399 0x400f */
356 # ifdef ESP_ERR_MESH_OPTION_NULL
357 ERR_TBL_IT(ESP_ERR_MESH_OPTION_NULL), /* 16400 0x4010 */
359 # ifdef ESP_ERR_MESH_OPTION_UNKNOWN
360 ERR_TBL_IT(ESP_ERR_MESH_OPTION_UNKNOWN), /* 16401 0x4011 */
362 # ifdef ESP_ERR_MESH_XON_NO_WINDOW
363 ERR_TBL_IT(ESP_ERR_MESH_XON_NO_WINDOW), /* 16402 0x4012 */
365 # ifdef ESP_ERR_MESH_INTERFACE
366 ERR_TBL_IT(ESP_ERR_MESH_INTERFACE), /* 16403 0x4013 */
368 # ifdef ESP_ERR_MESH_DISCARD_DUPLICATE
369 ERR_TBL_IT(ESP_ERR_MESH_DISCARD_DUPLICATE), /* 16404 0x4014 */
371 # ifdef ESP_ERR_MESH_DISCARD
372 ERR_TBL_IT(ESP_ERR_MESH_DISCARD), /* 16405 0x4015 */
374 # ifdef ESP_ERR_MESH_VOTING
375 ERR_TBL_IT(ESP_ERR_MESH_VOTING), /* 16406 0x4016 */
377 // components/tcpip_adapter/include/tcpip_adapter.h
378 # ifdef ESP_ERR_TCPIP_ADAPTER_BASE
379 ERR_TBL_IT(ESP_ERR_TCPIP_ADAPTER_BASE), /* 20480 0x5000 */
381 # ifdef ESP_ERR_TCPIP_ADAPTER_INVALID_PARAMS
382 ERR_TBL_IT(ESP_ERR_TCPIP_ADAPTER_INVALID_PARAMS), /* 20481 0x5001 */
384 # ifdef ESP_ERR_TCPIP_ADAPTER_IF_NOT_READY
385 ERR_TBL_IT(ESP_ERR_TCPIP_ADAPTER_IF_NOT_READY), /* 20482 0x5002 */
387 # ifdef ESP_ERR_TCPIP_ADAPTER_DHCPC_START_FAILED
388 ERR_TBL_IT(ESP_ERR_TCPIP_ADAPTER_DHCPC_START_FAILED), /* 20483 0x5003 */
390 # ifdef ESP_ERR_TCPIP_ADAPTER_DHCP_ALREADY_STARTED
391 ERR_TBL_IT(ESP_ERR_TCPIP_ADAPTER_DHCP_ALREADY_STARTED), /* 20484 0x5004 */
393 # ifdef ESP_ERR_TCPIP_ADAPTER_DHCP_ALREADY_STOPPED
394 ERR_TBL_IT(ESP_ERR_TCPIP_ADAPTER_DHCP_ALREADY_STOPPED), /* 20485 0x5005 */
396 # ifdef ESP_ERR_TCPIP_ADAPTER_NO_MEM
397 ERR_TBL_IT(ESP_ERR_TCPIP_ADAPTER_NO_MEM), /* 20486 0x5006 */
399 # ifdef ESP_ERR_TCPIP_ADAPTER_DHCP_NOT_STOPPED
400 ERR_TBL_IT(ESP_ERR_TCPIP_ADAPTER_DHCP_NOT_STOPPED), /* 20487 0x5007 */
402 // components/lwip/include/apps/ping/esp_ping.h
403 # ifdef ESP_ERR_PING_BASE
404 ERR_TBL_IT(ESP_ERR_PING_BASE), /* 24576 0x6000 */
406 # ifdef ESP_ERR_PING_INVALID_PARAMS
407 ERR_TBL_IT(ESP_ERR_PING_INVALID_PARAMS), /* 24577 0x6001 */
409 # ifdef ESP_ERR_PING_NO_MEM
410 ERR_TBL_IT(ESP_ERR_PING_NO_MEM), /* 24578 0x6002 */
412 // components/esp_http_client/include/esp_http_client.h
413 # ifdef ESP_ERR_HTTP_BASE
414 ERR_TBL_IT(ESP_ERR_HTTP_BASE), /* 28672 0x7000 Starting number of HTTP error codes */
416 # ifdef ESP_ERR_HTTP_MAX_REDIRECT
417 ERR_TBL_IT(ESP_ERR_HTTP_MAX_REDIRECT), /* 28673 0x7001 The error exceeds the number of HTTP redirects */
419 # ifdef ESP_ERR_HTTP_CONNECT
420 ERR_TBL_IT(ESP_ERR_HTTP_CONNECT), /* 28674 0x7002 Error open the HTTP connection */
422 # ifdef ESP_ERR_HTTP_WRITE_DATA
423 ERR_TBL_IT(ESP_ERR_HTTP_WRITE_DATA), /* 28675 0x7003 Error write HTTP data */
425 # ifdef ESP_ERR_HTTP_FETCH_HEADER
426 ERR_TBL_IT(ESP_ERR_HTTP_FETCH_HEADER), /* 28676 0x7004 Error read HTTP header from server */
428 # ifdef ESP_ERR_HTTP_INVALID_TRANSPORT
429 ERR_TBL_IT(ESP_ERR_HTTP_INVALID_TRANSPORT), /* 28677 0x7005 There are no transport support for the input
432 // components/http_server/include/http_server.h
433 # ifdef ESP_ERR_HTTPD_BASE
434 ERR_TBL_IT(ESP_ERR_HTTPD_BASE), /* 32768 0x8000 Starting number of HTTPD error codes */
436 # ifdef ESP_ERR_HTTPD_HANDLERS_FULL
437 ERR_TBL_IT(ESP_ERR_HTTPD_HANDLERS_FULL), /* 32769 0x8001 All slots for registering URI handlers have
440 # ifdef ESP_ERR_HTTPD_HANDLER_EXISTS
441 ERR_TBL_IT(ESP_ERR_HTTPD_HANDLER_EXISTS), /* 32770 0x8002 URI handler with same method and target URI
442 already registered */
444 # ifdef ESP_ERR_HTTPD_INVALID_REQ
445 ERR_TBL_IT(ESP_ERR_HTTPD_INVALID_REQ), /* 32771 0x8003 Invalid request pointer */
447 # ifdef ESP_ERR_HTTPD_RESULT_TRUNC
448 ERR_TBL_IT(ESP_ERR_HTTPD_RESULT_TRUNC), /* 32772 0x8004 Result string truncated */
450 # ifdef ESP_ERR_HTTPD_RESP_HDR
451 ERR_TBL_IT(ESP_ERR_HTTPD_RESP_HDR), /* 32773 0x8005 Response header field larger than supported */
453 # ifdef ESP_ERR_HTTPD_RESP_SEND
454 ERR_TBL_IT(ESP_ERR_HTTPD_RESP_SEND), /* 32774 0x8006 Error occured while sending response packet */
456 # ifdef ESP_ERR_HTTPD_ALLOC_MEM
457 ERR_TBL_IT(ESP_ERR_HTTPD_ALLOC_MEM), /* 32775 0x8007 Failed to dynamically allocate memory for
460 # ifdef ESP_ERR_HTTPD_TASK
461 ERR_TBL_IT(ESP_ERR_HTTPD_TASK), /* 32776 0x8008 Failed to launch server task/thread */
463 // components/spi_flash/include/esp_spi_flash.h
464 # ifdef ESP_ERR_FLASH_BASE
465 ERR_TBL_IT(ESP_ERR_FLASH_BASE), /* 65552 0x10010 */
467 # ifdef ESP_ERR_FLASH_OP_FAIL
468 ERR_TBL_IT(ESP_ERR_FLASH_OP_FAIL), /* 65553 0x10011 */
470 # ifdef ESP_ERR_FLASH_OP_TIMEOUT
471 ERR_TBL_IT(ESP_ERR_FLASH_OP_TIMEOUT), /* 65554 0x10012 */
474 #endif //CONFIG_ESP_ERR_TO_NAME_LOOKUP
476 static const char esp_unknown_msg[] =
477 #ifdef CONFIG_ESP_ERR_TO_NAME_LOOKUP
481 #endif //CONFIG_ESP_ERR_TO_NAME_LOOKUP
483 const char *esp_err_to_name(esp_err_t code)
485 #ifdef CONFIG_ESP_ERR_TO_NAME_LOOKUP
488 for (i = 0; i < sizeof(esp_err_msg_table)/sizeof(esp_err_msg_table[0]); ++i) {
489 if (esp_err_msg_table[i].code == code) {
490 return esp_err_msg_table[i].msg;
493 #endif //CONFIG_ESP_ERR_TO_NAME_LOOKUP
495 return esp_unknown_msg;
498 const char *esp_err_to_name_r(esp_err_t code, char *buf, size_t buflen)
500 #ifdef CONFIG_ESP_ERR_TO_NAME_LOOKUP
503 for (i = 0; i < sizeof(esp_err_msg_table)/sizeof(esp_err_msg_table[0]); ++i) {
504 if (esp_err_msg_table[i].code == code) {
505 strlcpy(buf, esp_err_msg_table[i].msg, buflen);
509 #endif //CONFIG_ESP_ERR_TO_NAME_LOOKUP
511 if (strerror_r(code, buf, buflen) == 0) {
515 snprintf(buf, buflen, "%s 0x%x(%d)", esp_unknown_msg, code, code);