diff --git a/components/esp_system/test_apps/.build-test-rules.yml b/components/esp_system/test_apps/.build-test-rules.yml index 27f3165dc1..27f8f25ab2 100644 --- a/components/esp_system/test_apps/.build-test-rules.yml +++ b/components/esp_system/test_apps/.build-test-rules.yml @@ -7,6 +7,7 @@ components/esp_system/test_apps/cache_panic: components/esp_system/test_apps/console: disable: - if: CONFIG_NAME == "serial_jtag_only" and SOC_USB_SERIAL_JTAG_SUPPORTED != 1 + - if: CONFIG_NAME == "serial_jtag_only_no_vfs" and SOC_USB_SERIAL_JTAG_SUPPORTED != 1 components/esp_system/test_apps/esp_system_unity_tests: disable: diff --git a/components/esp_system/test_apps/console/pytest_esp_system_console_tests.py b/components/esp_system/test_apps/console/pytest_esp_system_console_tests.py index 06432a8158..15d38d465e 100644 --- a/components/esp_system/test_apps/console/pytest_esp_system_console_tests.py +++ b/components/esp_system/test_apps/console/pytest_esp_system_console_tests.py @@ -38,9 +38,10 @@ def test_esp_system_console_no_output_uart(dut: Dut) -> None: @pytest.mark.usb_serial_jtag @pytest.mark.parametrize( - 'port, config', + 'port, flash_port, config', [ - pytest.param('/dev/serial_ports/ttyACM-esp32', 'serial_jtag_only', marks=JTAG_SERIAL_MARKS), + pytest.param('/dev/serial_ports/ttyACM-esp32', '/dev/serial_ports/ttyUSB-esp32', 'serial_jtag_only', marks=JTAG_SERIAL_MARKS), + pytest.param('/dev/serial_ports/ttyACM-esp32', '/dev/serial_ports/ttyUSB-esp32', 'serial_jtag_only_no_vfs', marks=JTAG_SERIAL_MARKS), ], indirect=True, ) diff --git a/components/esp_system/test_apps/console/sdkconfig.ci.console_none b/components/esp_system/test_apps/console/sdkconfig.ci.console_none index 85ac33c784..b9b45e98d5 100644 --- a/components/esp_system/test_apps/console/sdkconfig.ci.console_none +++ b/components/esp_system/test_apps/console/sdkconfig.ci.console_none @@ -1 +1,2 @@ CONFIG_ESP_CONSOLE_NONE=y +CONFIG_VFS_SUPPORT_IO=y diff --git a/components/esp_system/test_apps/console/sdkconfig.ci.console_none_no_vfs b/components/esp_system/test_apps/console/sdkconfig.ci.console_none_no_vfs new file mode 100644 index 0000000000..530f83183f --- /dev/null +++ b/components/esp_system/test_apps/console/sdkconfig.ci.console_none_no_vfs @@ -0,0 +1,2 @@ +CONFIG_ESP_CONSOLE_NONE=y +CONFIG_VFS_SUPPORT_IO=n diff --git a/components/esp_system/test_apps/console/sdkconfig.ci.serial_jtag_only b/components/esp_system/test_apps/console/sdkconfig.ci.serial_jtag_only index 0ed159f5c9..8471421aab 100644 --- a/components/esp_system/test_apps/console/sdkconfig.ci.serial_jtag_only +++ b/components/esp_system/test_apps/console/sdkconfig.ci.serial_jtag_only @@ -1,3 +1,4 @@ CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y # Disabled due to semihosting issue IDF-9574 CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=n +CONFIG_VFS_SUPPORT_IO=y diff --git a/components/esp_system/test_apps/console/sdkconfig.ci.serial_jtag_only_no_vfs b/components/esp_system/test_apps/console/sdkconfig.ci.serial_jtag_only_no_vfs new file mode 100644 index 0000000000..6e2c5be4dd --- /dev/null +++ b/components/esp_system/test_apps/console/sdkconfig.ci.serial_jtag_only_no_vfs @@ -0,0 +1,4 @@ +CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y +# Disabled due to semihosting issue IDF-9574 +CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=n +CONFIG_VFS_SUPPORT_IO=n diff --git a/components/newlib/syscalls.c b/components/newlib/syscalls.c index 3f58a446ef..20d890b287 100644 --- a/components/newlib/syscalls.c +++ b/components/newlib/syscalls.c @@ -29,6 +29,7 @@ static int syscall_not_implemented_aborts(void) ssize_t _write_r_console(struct _reent *r, int fd, const void * data, size_t size) { +#if !CONFIG_ESP_CONSOLE_NONE const char* cdata = (const char*) data; if (fd == STDOUT_FILENO || fd == STDERR_FILENO) { for (size_t i = 0; i < size; ++i) { @@ -36,12 +37,14 @@ ssize_t _write_r_console(struct _reent *r, int fd, const void * data, size_t siz } return size; } +#endif //!CONFIG_ESP_CONSOLE_NONE __errno_r(r) = EBADF; return -1; } ssize_t _read_r_console(struct _reent *r, int fd, void * data, size_t size) { +#if !CONFIG_ESP_CONSOLE_NONE char* cdata = (char*) data; if (fd == STDIN_FILENO) { size_t received; @@ -57,6 +60,7 @@ ssize_t _read_r_console(struct _reent *r, int fd, void * data, size_t size) } return received; } +#endif //!CONFIG_ESP_CONSOLE_NONE __errno_r(r) = EBADF; return -1; }