diff --git a/components/esp8266/include/esp_err.h b/components/esp8266/include/esp_err.h index b38a723b..f1fd783d 100644 --- a/components/esp8266/include/esp_err.h +++ b/components/esp8266/include/esp_err.h @@ -105,7 +105,7 @@ void _esp_error_check_failed(esp_err_t rc, const char *file, int line, const cha #define ESP_ERROR_CHECK(x) do { \ esp_err_t __err_rc = (x); \ if (__err_rc != ESP_OK) { \ - _esp_error_check_failed(__err_rc, __FILE__, __LINE__, \ + _esp_error_check_failed(__err_rc, __ESP_FILE__, __LINE__, \ __ASSERT_FUNC, #x); \ } \ } while(0); diff --git a/components/esp8266/include/esp_wifi_osi.h b/components/esp8266/include/esp_wifi_osi.h index f780d85e..bb2fb92d 100644 --- a/components/esp8266/include/esp_wifi_osi.h +++ b/components/esp8266/include/esp_wifi_osi.h @@ -126,19 +126,19 @@ extern wifi_osi_funcs_t s_wifi_osi_funcs; s_wifi_osi_funcs.timer_delete(t, tk) #define wifi_malloc(s, c) \ - s_wifi_osi_funcs.malloc(s, c, __FILE__, __LINE__) + s_wifi_osi_funcs.malloc(s, c, __ESP_FILE__, __LINE__) #define wifi_zalloc(s, c) \ - s_wifi_osi_funcs.zalloc(s, c, __FILE__, __LINE__) + s_wifi_osi_funcs.zalloc(s, c, __ESP_FILE__, __LINE__) #define wifi_calloc(cnt, s, c) \ - s_wifi_osi_funcs.calloc(cnt, s, c, __FILE__, __LINE__) + s_wifi_osi_funcs.calloc(cnt, s, c, __ESP_FILE__, __LINE__) #define wifi_realloc(ptr, s, c) \ - s_wifi_osi_funcs.realloc(ptr, s, c, __FILE__, __LINE__) + s_wifi_osi_funcs.realloc(ptr, s, c, __ESP_FILE__, __LINE__) #define wifi_free(p) \ - s_wifi_osi_funcs.free(p, __FILE__, __LINE__) + s_wifi_osi_funcs.free(p, __ESP_FILE__, __LINE__) #define wifi_get_free_heap_size() \ s_wifi_osi_funcs.get_free_heap_size() diff --git a/components/freertos/port/esp8266/include/freertos/portmacro.h b/components/freertos/port/esp8266/include/freertos/portmacro.h index 1f1bba39..c312c589 100644 --- a/components/freertos/port/esp8266/include/freertos/portmacro.h +++ b/components/freertos/port/esp8266/include/freertos/portmacro.h @@ -214,7 +214,7 @@ void show_critical_info(void); * @brief add trace information to allocated memory * * @param ptr memory pointer allocated by "os_maloc", "malloc" and so on - * @param trace trace information, file name(__FILE__) or "__builtin_return_address(0)" is OK + * @param trace trace information, file name(__ESP_FILE__) or "__builtin_return_address(0)" is OK * @param no number of trace information, file line(__LINE__) or -1(using "__builtin_return_address(0)") */ void esp_mem_trace(const void *ptr, const char *trace, int no); @@ -224,7 +224,7 @@ void esp_mem_trace(const void *ptr, const char *trace, int no); * * @param ptr memory pointer allocated by "os_maloc", "malloc" and so on */ -#define esp_mem_mark_file(ptr) esp_mem_trace((ptr), __FILE__, LINE__) +#define esp_mem_mark_file(ptr) esp_mem_trace((ptr), __ESP_FILE__, LINE__) /* * @brief check if CPU core interrupt is disable diff --git a/components/heap/include/esp_heap_caps.h b/components/heap/include/esp_heap_caps.h index ff99678d..587f510c 100644 --- a/components/heap/include/esp_heap_caps.h +++ b/components/heap/include/esp_heap_caps.h @@ -121,7 +121,7 @@ void esp_heap_caps_init_region(heap_region_t *region, size_t max_num); * * @return A pointer to the memory allocated on success, NULL on failure */ -#define heap_caps_malloc(size, caps) _heap_caps_malloc(size, caps, __FILE__, __LINE__) +#define heap_caps_malloc(size, caps) _heap_caps_malloc(size, caps, __ESP_FILE__, __LINE__) void *_heap_caps_malloc(size_t size, uint32_t caps, const char *file, size_t line); @@ -134,7 +134,7 @@ void *_heap_caps_malloc(size_t size, uint32_t caps, const char *file, size_t lin * * @param ptr Pointer to memory previously returned from heap_caps_(m/c/re/z)alloc(). Can be NULL. */ -#define heap_caps_free(p) _heap_caps_free(p, __FILE__, __LINE__) +#define heap_caps_free(p) _heap_caps_free(p, __ESP_FILE__, __LINE__) void _heap_caps_free(void *ptr, const char *file, size_t line); @@ -151,7 +151,7 @@ void _heap_caps_free(void *ptr, const char *file, size_t line); * * @return A pointer to the memory allocated on success, NULL on failure */ -#define heap_caps_calloc(n, size, caps) _heap_caps_calloc(n, size, caps, __FILE__, __LINE__) +#define heap_caps_calloc(n, size, caps) _heap_caps_calloc(n, size, caps, __ESP_FILE__, __LINE__) void *_heap_caps_calloc(size_t count, size_t size, uint32_t caps, const char *file, size_t line); @@ -171,7 +171,7 @@ void *_heap_caps_calloc(size_t count, size_t size, uint32_t caps, const char *fi * * @return Pointer to a new buffer of size 'size' with capabilities 'caps', or NULL if allocation failed. */ -#define heap_caps_realloc(ptr, size, caps) _heap_caps_realloc(ptr, size, caps, __FILE__, __LINE__) +#define heap_caps_realloc(ptr, size, caps) _heap_caps_realloc(ptr, size, caps, __ESP_FILE__, __LINE__) void *_heap_caps_realloc(void *mem, size_t newsize, uint32_t caps, const char *file, size_t line); @@ -188,7 +188,7 @@ void *_heap_caps_realloc(void *mem, size_t newsize, uint32_t caps, const char *f * * @return A pointer to the memory allocated on success, NULL on failure */ -#define heap_caps_zalloc(size, caps) _heap_caps_zalloc(size, caps, __FILE__, __LINE__) +#define heap_caps_zalloc(size, caps) _heap_caps_zalloc(size, caps, __ESP_FILE__, __LINE__) void *_heap_caps_zalloc(size_t size, uint32_t caps, const char *file, size_t line); diff --git a/components/lwip/lwip/src/include/lwip/arch.h b/components/lwip/lwip/src/include/lwip/arch.h index 55714e11..fc1bb72b 100644 --- a/components/lwip/lwip/src/include/lwip/arch.h +++ b/components/lwip/lwip/src/include/lwip/arch.h @@ -88,7 +88,7 @@ */ #ifndef LWIP_PLATFORM_ASSERT #define LWIP_PLATFORM_ASSERT(x) do {printf("Assertion \"%s\" failed at line %d in %s\n", \ - x, __LINE__, __FILE__); fflush(NULL); abort();} while(0) + x, __LINE__, __ESP_FILE__); fflush(NULL); abort();} while(0) #include #include #endif diff --git a/components/lwip/lwip/src/include/lwip/memp.h b/components/lwip/lwip/src/include/lwip/memp.h index 81a91d3f..290f8eb9 100644 --- a/components/lwip/lwip/src/include/lwip/memp.h +++ b/components/lwip/lwip/src/include/lwip/memp.h @@ -145,7 +145,7 @@ void memp_init(void); #error "MEMP_OVERFLOW_CHECK && ESP_LWIP_MEM_DBG cannot used" #endif void *memp_malloc_fn(memp_t type, const char* file, const int line); -#define memp_malloc(t) memp_malloc_fn((t), __FILE__, __LINE__) +#define memp_malloc(t) memp_malloc_fn((t), __ESP_FILE__, __LINE__) #else void *memp_malloc(memp_t type); #endif diff --git a/components/lwip/lwip/src/include/lwip/priv/memp_priv.h b/components/lwip/lwip/src/include/lwip/priv/memp_priv.h index c7a8febc..3213bc60 100644 --- a/components/lwip/lwip/src/include/lwip/priv/memp_priv.h +++ b/components/lwip/lwip/src/include/lwip/priv/memp_priv.h @@ -173,7 +173,7 @@ void memp_init_pool(const struct memp_desc *desc); #error "MEMP_OVERFLOW_CHECK && ESP_LWIP_MEM_DBG cannot used" #endif void *memp_malloc_pool_fn(const struct memp_desc* desc, const char* file, const int line); -#define memp_malloc_pool(d) memp_malloc_pool_fn((d), __FILE__, __LINE__) +#define memp_malloc_pool(d) memp_malloc_pool_fn((d), __ESP_FILE__, __LINE__) #else void *memp_malloc_pool(const struct memp_desc *desc); #endif diff --git a/components/lwip/port/esp8266/include/arch/cc.h b/components/lwip/port/esp8266/include/arch/cc.h index ea11e6f7..dc2fac1c 100644 --- a/components/lwip/port/esp8266/include/arch/cc.h +++ b/components/lwip/port/esp8266/include/arch/cc.h @@ -66,7 +66,7 @@ typedef int sys_prot_t; extern void sys_arch_assert(const char *file, int line); #define LWIP_PLATFORM_DIAG(x) do {printf x;} while(0) -#define LWIP_PLATFORM_ASSERT(x) do {printf(x); sys_arch_assert(__FILE__, __LINE__);} while(0) +#define LWIP_PLATFORM_ASSERT(x) do {printf(x); sys_arch_assert(__ESP_FILE__, __LINE__);} while(0) #else #define LWIP_PLATFORM_DIAG(x) #define LWIP_PLATFORM_ASSERT(x) diff --git a/components/newlib/newlib/include/assert.h b/components/newlib/newlib/include/assert.h index 8da55a38..7f9c7501 100644 --- a/components/newlib/newlib/include/assert.h +++ b/components/newlib/newlib/include/assert.h @@ -13,7 +13,7 @@ extern "C" { #ifdef NDEBUG /* required by ANSI standard */ # define assert(__e) ((__e) ? (void)0 : (void)0) #else -# define assert(__e) ((__e) ? (void)0 : __assert_func (__FILE__, __LINE__, \ +# define assert(__e) ((__e) ? (void)0 : __assert_func (__ESP_FILE__, __LINE__, \ __ASSERT_FUNC, #__e)) # ifndef __ASSERT_FUNC