fix order of creation of standard streams

With existing order, file descriptors assigned to stdin, stdout, stderr didn't match standard assignment.
https://github.com/espressif/esp-idf/issues/67
This commit is contained in:
Ivan Grokhotkov 2016-11-08 09:08:23 +08:00
parent 3f8d9d71e2
commit 6dd3681115

View File

@ -177,9 +177,9 @@ void start_cpu0_default(void)
esp_vfs_dev_uart_register();
esp_reent_init(_GLOBAL_REENT);
const char* default_uart_dev = "/dev/uart/0";
_GLOBAL_REENT->_stdin = fopen(default_uart_dev, "r");
_GLOBAL_REENT->_stdout = fopen(default_uart_dev, "w");
_GLOBAL_REENT->_stderr = fopen(default_uart_dev, "w");
_GLOBAL_REENT->_stdin = fopen(default_uart_dev, "r");
do_global_ctors();
#if !CONFIG_FREERTOS_UNICORE
esp_crosscore_int_init();