From 7925ba245d1aada6a8c0d75b00dc7f1d0fb42be2 Mon Sep 17 00:00:00 2001 From: Mahavir Jain Date: Mon, 18 May 2020 16:51:57 +0530 Subject: [PATCH] protocol_examples_common: keep buffering enabled on stdout - Newlib uses significantly more stack space when printing to an unbuffered stream - For examples tests, disabling buffering on stdout is not really required This issue was found during one of the OTA example test failure, root cause being stack overflow in `esp_event` task. --- examples/common_components/protocol_examples_common/stdin_out.c | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/common_components/protocol_examples_common/stdin_out.c b/examples/common_components/protocol_examples_common/stdin_out.c index 10cc2167f..8f95b8ac7 100644 --- a/examples/common_components/protocol_examples_common/stdin_out.c +++ b/examples/common_components/protocol_examples_common/stdin_out.c @@ -17,7 +17,6 @@ esp_err_t example_configure_stdin_stdout(void) { // Initialize VFS & UART so we can use std::cout/cin setvbuf(stdin, NULL, _IONBF, 0); - setvbuf(stdout, NULL, _IONBF, 0); /* Install UART driver for interrupt-driven reads and writes */ ESP_ERROR_CHECK( uart_driver_install( (uart_port_t)CONFIG_ESP_CONSOLE_UART_NUM, 256, 0, 0, NULL, 0) );