From 0f07eccaf2139b129b074800cbbcfadee3b45a7e Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Mon, 16 May 2022 09:53:54 -0700 Subject: Test semihosting_fileio In the original test, confirm that stdout data ends up in the OpenOCD log. In the new test, with `arm semihosting_fileio` enabled, confirm that stdout data ends up in gdb's CLI. This test requires https://github.com/riscv/riscv-openocd/pull/699. --- debug/programs/semihosting.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'debug/programs') diff --git a/debug/programs/semihosting.c b/debug/programs/semihosting.c index 2ceea8c..ea3fdde 100644 --- a/debug/programs/semihosting.c +++ b/debug/programs/semihosting.c @@ -65,9 +65,11 @@ int main() { char *filename = NULL; const char *message = "Hello, world!\n"; + const char *message2 = "Do re mi fa so la ti do!\n"; int fd; begin: fd = open(filename, O_WRONLY, 0644); write(fd, message, strlen(message)); -} \ No newline at end of file + write(1, message2, strlen(message2)); +} -- cgit v1.1