diff --git a/components/esp32/esp_err_to_name.c b/components/esp32/esp_err_to_name.c index 9f24c2669a..96f77a4d93 100644 --- a/components/esp32/esp_err_to_name.c +++ b/components/esp32/esp_err_to_name.c @@ -28,9 +28,6 @@ #if __has_include("esp_ping.h") #include "esp_ping.h" #endif -#if __has_include("esp_slave.h") -#include "esp_slave.h" -#endif #if __has_include("esp_spi_flash.h") #include "esp_spi_flash.h" #endif @@ -95,10 +92,6 @@ static const esp_err_msg_t esp_err_msg_table[] = { # endif # ifdef ESP_ERR_INVALID_MAC ERR_TBL_IT(ESP_ERR_INVALID_MAC), /* 267 0x10b MAC address was invalid */ -# endif - // examples/peripherals/sdio/host/components/esp_slave/include/esp_slave.h -# ifdef ESP_ERR_NOT_FINISHED - ERR_TBL_IT(ESP_ERR_NOT_FINISHED), /* 513 0x201 */ # endif // components/nvs_flash/include/nvs.h # ifdef ESP_ERR_NVS_BASE diff --git a/tools/gen_esp_err_to_name.py b/tools/gen_esp_err_to_name.py index f2c648745e..932dfd8bc8 100755 --- a/tools/gen_esp_err_to_name.py +++ b/tools/gen_esp_err_to_name.py @@ -25,6 +25,9 @@ import textwrap # list files here which should not be parsed ignore_files = [ 'components/mdns/test_afl_fuzz_host/esp32_compat.h' ] +# add directories here which should not be parsed +ignore_dirs = ( 'examples' ) + # macros from here have higher priorities in case of collisions priority_headers = [ 'components/esp32/include/esp_err.h' ] @@ -292,7 +295,7 @@ def main(): for filename in fnmatch.filter(filenames, '*.[ch]'): full_path = os.path.join(root, filename) path_in_idf = os.path.relpath(full_path, idf_path) - if path_in_idf in ignore_files: + if path_in_idf in ignore_files or path_in_idf.startswith(ignore_dirs): continue with open(full_path, "r+") as f: for line in f: