Date
1 - 3 of 3
qemu_x86 and samples/drivers/uart/echo_bot #test #uart
lyn.harris@...
Hi,
I'm trying to run the samples/drivers/uart/echo_bot sample on qemu_x86 under Ubuntu. I can run this sample on my hardware when I build for that board, so I believe I am operating it ok. But when I build and run for qemu_x86, I don't get any keystrokes echoed. I expect to see them echoed after I press return.
Build command: west build -p auto -b qemu_x86 samples/drivers/uart/echo_bot
Run command: west build -t run
When I run, I get this text displayed:
I tried setting CONFIG_UART_INTERRUPT_DRIVEN in qemu_x86_defconfig, and re-built, but I didn't see any change when I ran the app. I also tried opening /dev/ttyS0 to see if the output ended up there, but my terminal emulator says it can't open that port. I'm new to zephyr, so I'm sort of trying things blindly. Is this sample code supposed to work under qemu_x86? If so, how can I see the characters echoed?
thanks,
Lyn
I'm trying to run the samples/drivers/uart/echo_bot sample on qemu_x86 under Ubuntu. I can run this sample on my hardware when I build for that board, so I believe I am operating it ok. But when I build and run for qemu_x86, I don't get any keystrokes echoed. I expect to see them echoed after I press return.
Build command: west build -p auto -b qemu_x86 samples/drivers/uart/echo_bot
Run command: west build -t run
When I run, I get this text displayed:
-- west build: running target run
[0/1] To exit from QEMU enter: 'CTRL+a, x'[QEMU] CPU: qemu32,+nx,+pae
SeaBIOS (version zephyr-v1.0.0-0-g31d4e0e-dirty-20200714_234759-fv-az50-zephyr)
Booting from ROM..*** Booting Zephyr OS build v2.7.99-3665-gdbff5861c43f ***
Hello! I'm your echo bot.
Tell me something and press enter:
I'll type something and press <enter>, but nothing changes on the screen (no echo, no error). CTRL+a doesn't exit the app (doesn't seem to do anything). If I type Ctrl-c, I see:
I'll type something and press <enter>, but nothing changes on the screen (no echo, no error). CTRL+a doesn't exit the app (doesn't seem to do anything). If I type Ctrl-c, I see:
qemu-system-i386: terminating on signal 2
ninja: build stopped: interrupted by user.
I tried setting CONFIG_UART_INTERRUPT_DRIVEN in qemu_x86_defconfig, and re-built, but I didn't see any change when I ran the app. I also tried opening /dev/ttyS0 to see if the output ended up there, but my terminal emulator says it can't open that port. I'm new to zephyr, so I'm sort of trying things blindly. Is this sample code supposed to work under qemu_x86? If so, how can I see the characters echoed?
thanks,
Lyn
lyn.harris@...
Hi,
I've tried the 3 samples under samples/subsys/console (echo, getchar, getline) and they all have a very similar problem: no echo of my input and no error displayed when I run after building for qemu_x86 (per the directions on the Zephyr web page e.g., https://docs.zephyrproject.org/2.6.0/samples/subsys/console/getchar/README.html). But, for these 3 samples, CTRL-a, x stops the app, so something there is processing input.
Here's the output I see from samples/subsys/console/echo:
I've tried the 3 samples under samples/subsys/console (echo, getchar, getline) and they all have a very similar problem: no echo of my input and no error displayed when I run after building for qemu_x86 (per the directions on the Zephyr web page e.g., https://docs.zephyrproject.org/2.6.0/samples/subsys/console/getchar/README.html). But, for these 3 samples, CTRL-a, x stops the app, so something there is processing input.
Here's the output I see from samples/subsys/console/echo:
-- west build: running target run
[0/1] To exit from QEMU enter: 'CTRL+a, x'[QEMU] CPU: qemu32,+nx,+pae
SeaBIOS (version zephyr-v1.0.0-0-g31d4e0e-dirty-20200714_234759-fv-az50-zephyr)
Booting from ROM..*** Booting Zephyr OS build v2.7.99-3665-gdbff5861c43f ***
You should see another line with instructions below. If not,
the (interrupt-driven) console device doesn't work as expected:
Start typing characters to see them echoed back
QEMU: Terminated
I typed a bunch of lines before I pressed that CTRL-a, x, but nothing showed up.
I'm running Ubuntu 20.04 LTS under VirtualBox, in case that matters.
lyn.harris@...
My co-worker figured out the solution. The directions should read:
Build command: west build -p auto -b qemu_x86_64 samples/drivers/uart/echo_bot
Run command: west build -t run
That is, instead of "-b qemu_x86" use "-b qemu_x86_64". Apparently, the existing documentation works fine with some older zephyr, but at some point the documentation became outdated and stopped working. Zephyr v3.0.0-rc3 needs these updated directions.
-Lyn
Build command: west build -p auto -b qemu_x86_64 samples/drivers/uart/echo_bot
Run command: west build -t run
That is, instead of "-b qemu_x86" use "-b qemu_x86_64". Apparently, the existing documentation works fine with some older zephyr, but at some point the documentation became outdated and stopped working. Zephyr v3.0.0-rc3 needs these updated directions.
-Lyn