fix(system_console): fixed unity output not working with usb jtag serial

This commit is contained in:
Marius Vikhammer
2024-03-25 12:22:51 +08:00
parent 42fc463c81
commit 9e62e32a5b
2 changed files with 8 additions and 1 deletions

View File

@@ -126,5 +126,12 @@ void bootloader_console_init(void)
void bootloader_console_init(void)
{
esp_rom_output_switch_buffer(ESP_ROM_USB_SERIAL_DEVICE_NUM);
/* Switch console channel to avoid output on UART and allow */
esp_rom_output_set_as_console(ESP_ROM_USB_SERIAL_DEVICE_NUM);
/* ROM printf by default also prints to USB-Serial-JTAG on channel 2
need to disable to not print twice */
esp_rom_install_channel_putc(2, NULL);
}
#endif //CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG