diff --git a/components/esp8266/include/esp_libc.h b/components/esp8266/include/esp_libc.h index 525bbb67..123bff35 100644 --- a/components/esp8266/include/esp_libc.h +++ b/components/esp8266/include/esp_libc.h @@ -73,11 +73,7 @@ unsigned long os_random(void); int os_get_random(unsigned char *buf, size_t len); #ifndef os_printf -/* NOTE: don't use printf_opt in irq handler, for test */ -#define os_printf(fmt, ...) do { \ - static const char flash_str[] ICACHE_RODATA_ATTR STORE_ATTR = fmt; \ - printf(flash_str, ##__VA_ARGS__); \ - } while(0) +#define os_printf printf #endif /* Note: check_memleak_debug_enable is a weak function inside SDK. diff --git a/components/lwip/include/lwip/apps/multi-threads/sockets_mt.h b/components/lwip/include/lwip/apps/multi-threads/sockets_mt.h index 02a41121..d6c8390a 100644 --- a/components/lwip/include/lwip/apps/multi-threads/sockets_mt.h +++ b/components/lwip/include/lwip/apps/multi-threads/sockets_mt.h @@ -36,23 +36,23 @@ int lwip_trace_tcp(int s, int cmd, void *arg); #ifdef SOCKETS_MT_DBUG -#define accept(a,b,c) lwip_accept_mt(a,b,c); os_printf("%s %d\n", __FUNCTION__, __LINE__); -#define bind(a,b,c) lwip_bind_mt(a,b,c); os_printf("%s %d\n", __FUNCTION__, __LINE__); -#define shutdown(a,b) lwip_shutdown_mt(a,b); os_printf("%s %d\n", __FUNCTION__, __LINE__); -#define closesocket(s) lwip_close_mt(s); os_printf("%s %d\n", __FUNCTION__, __LINE__); -#define connect(a,b,c) lwip_connect_mt(a,b,c); os_printf("%s %d\n", __FUNCTION__, __LINE__); -#define getsockname(a,b,c) lwip_getsockname_mt(a,b,c); os_printf("%s %d\n", __FUNCTION__, __LINE__); -#define getpeername(a,b,c) lwip_getpeername_mt(a,b,c); os_printf("%s %d\n", __FUNCTION__, __LINE__); -#define setsockopt(a,b,c,d,e) lwip_setsockopt_mt(a,b,c,d,e); os_printf("%s %d\n", __FUNCTION__, __LINE__); -#define getsockopt(a,b,c,d,e) lwip_getsockopt_mt(a,b,c,d,e); os_printf("%s %d\n", __FUNCTION__, __LINE__); -#define listen(a,b) lwip_listen_mt(a,b); os_printf("%s %d\n", __FUNCTION__, __LINE__); -#define recv(a,b,c,d) lwip_recv_mt(a,b,c,d); os_printf("%s %d\n", __FUNCTION__, __LINE__); -#define recvfrom(a,b,c,d,e,f) lwip_recvfrom_mt(a,b,c,d,e,f); os_printf("%s %d\n", __FUNCTION__, __LINE__); -#define send(a,b,c,d) lwip_send_mt(a,b,c,d); os_printf("%s %d\n", __FUNCTION__, __LINE__); -#define sendto(a,b,c,d,e,f) lwip_sendto_mt(a,b,c,d,e,f); os_printf("%s %d\n", __FUNCTION__, __LINE__); -#define socket(a,b,c) lwip_socket_mt(a,b,c); os_printf("%s %d\n", __FUNCTION__, __LINE__); +#define accept(a,b,c) lwip_accept_mt(a,b,c); printf("%s %d\n", __FUNCTION__, __LINE__); +#define bind(a,b,c) lwip_bind_mt(a,b,c); printf("%s %d\n", __FUNCTION__, __LINE__); +#define shutdown(a,b) lwip_shutdown_mt(a,b); printf("%s %d\n", __FUNCTION__, __LINE__); +#define closesocket(s) lwip_close_mt(s); printf("%s %d\n", __FUNCTION__, __LINE__); +#define connect(a,b,c) lwip_connect_mt(a,b,c); printf("%s %d\n", __FUNCTION__, __LINE__); +#define getsockname(a,b,c) lwip_getsockname_mt(a,b,c); printf("%s %d\n", __FUNCTION__, __LINE__); +#define getpeername(a,b,c) lwip_getpeername_mt(a,b,c); printf("%s %d\n", __FUNCTION__, __LINE__); +#define setsockopt(a,b,c,d,e) lwip_setsockopt_mt(a,b,c,d,e); printf("%s %d\n", __FUNCTION__, __LINE__); +#define getsockopt(a,b,c,d,e) lwip_getsockopt_mt(a,b,c,d,e); printf("%s %d\n", __FUNCTION__, __LINE__); +#define listen(a,b) lwip_listen_mt(a,b); printf("%s %d\n", __FUNCTION__, __LINE__); +#define recv(a,b,c,d) lwip_recv_mt(a,b,c,d); printf("%s %d\n", __FUNCTION__, __LINE__); +#define recvfrom(a,b,c,d,e,f) lwip_recvfrom_mt(a,b,c,d,e,f); printf("%s %d\n", __FUNCTION__, __LINE__); +#define send(a,b,c,d) lwip_send_mt(a,b,c,d); printf("%s %d\n", __FUNCTION__, __LINE__); +#define sendto(a,b,c,d,e,f) lwip_sendto_mt(a,b,c,d,e,f); printf("%s %d\n", __FUNCTION__, __LINE__); +#define socket(a,b,c) lwip_socket_mt(a,b,c); printf("%s %d\n", __FUNCTION__, __LINE__); #define select(a,b,c,d,e) lwip_select_mt(a,b,c,d,e) -#define ioctlsocket(a,b,c) lwip_ioctl_mt(a,b,c) ; os_printf("%s %d\n", __FUNCTION__, __LINE__); +#define ioctlsocket(a,b,c) lwip_ioctl_mt(a,b,c) ; printf("%s %d\n", __FUNCTION__, __LINE__); #if LWIP_POSIX_SOCKETS_IO_NAMES #define read(a,b,c) lwip_read_mt(a,b,c) diff --git a/components/lwip/port/esp8266/include/arch/cc.h b/components/lwip/port/esp8266/include/arch/cc.h index a54d6fd9..fc12ca0a 100644 --- a/components/lwip/port/esp8266/include/arch/cc.h +++ b/components/lwip/port/esp8266/include/arch/cc.h @@ -64,16 +64,9 @@ typedef int sys_prot_t; #include -#ifndef os_printf -#define os_printf(fmt, ...) do { \ - static const char flash_str[] ICACHE_RODATA_ATTR STORE_ATTR = fmt; \ - printf(flash_str, ##__VA_ARGS__); \ - } while(0) -#endif - #ifdef LWIP_DEBUG -#define LWIP_PLATFORM_DIAG(x) do {os_printf x;} while(0) -#define LWIP_PLATFORM_ASSERT(x) do {os_printf(x); sys_arch_assert(__FILE__, __LINE__);} while(0) +#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) #else #define LWIP_PLATFORM_DIAG(x) #define LWIP_PLATFORM_ASSERT(x) diff --git a/components/ssl/axtls/include/ssl/ssl_os_port.h b/components/ssl/axtls/include/ssl/ssl_os_port.h index a636c0ae..5af79a8d 100644 --- a/components/ssl/axtls/include/ssl/ssl_os_port.h +++ b/components/ssl/axtls/include/ssl/ssl_os_port.h @@ -44,7 +44,7 @@ extern "C" { #include "esp_common.h" #if 0 -#define ssl_printf(fmt, args...) os_printf(fmt,## args) +#define ssl_printf(fmt, args...) printf(fmt,## args) #else #define ssl_printf(fmt, args...) #endif diff --git a/components/ssl/mbedtls/port/openssl/include/platform/ssl_port.h b/components/ssl/mbedtls/port/openssl/include/platform/ssl_port.h index 4403c420..77ac7478 100644 --- a/components/ssl/mbedtls/port/openssl/include/platform/ssl_port.h +++ b/components/ssl/mbedtls/port/openssl/include/platform/ssl_port.h @@ -63,14 +63,7 @@ extern void vPortFree(void *pv); #define ssl_speed_up_enter() system_update_cpu_freq(SYS_CPU_160MHZ) #define ssl_speed_up_exit() system_update_cpu_freq(SYS_CPU_80MHZ) -#ifndef os_printf -#define os_printf(fmt, ...) do { \ - static const char flash_str[] ICACHE_RODATA_ATTR STORE_ATTR = fmt; \ - printf(flash_str, ##__VA_ARGS__); \ - } while(0) -#endif - -#define SSL_DEBUG_LOG os_printf +#define SSL_DEBUG_LOG printf #define LOCAL_ATRR ICACHE_RODATA_ATTR STORE_ATTR diff --git a/examples/storage/spiffs_test/main/testrunner.h b/examples/storage/spiffs_test/main/testrunner.h index 25819ea2..ed965687 100644 --- a/examples/storage/spiffs_test/main/testrunner.h +++ b/examples/storage/spiffs_test/main/testrunner.h @@ -122,7 +122,7 @@ typedef struct test_res_s { goto __fail_assert; \ } -#define DBGT(...) os_printf(__VA_ARGS__) +#define DBGT(...) printf(__VA_ARGS__) #define str(s) #s