fix(console): fixed secondary console not working on all chips without VFS

This commit is contained in:
Marius Vikhammer
2025-03-04 10:26:31 +08:00
parent 7f88aa2621
commit 12e9d6514a
30 changed files with 178 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2016-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2016-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -9,6 +9,7 @@
#include "sdkconfig.h"
#include "esp_cpu.h"
#include "esp_rom_uart.h"
#include "esp_system_console.h"
#include "esp_private/esp_clk.h"
static uint32_t s_test_start, s_test_stop;
@@ -16,11 +17,11 @@ static uint32_t s_test_start, s_test_stop;
void unity_putc(int c)
{
if (c == '\n') {
esp_rom_output_tx_one_char('\r');
esp_rom_output_tx_one_char('\n');
esp_system_console_put_char('\r');
esp_system_console_put_char('\n');
} else if (c == '\r') {
} else {
esp_rom_output_tx_one_char(c);
esp_system_console_put_char(c);
}
}