Add dabao-emu hosted-mode emulator target
Summary
Add dabao-emu xtask target with a minimal service set (ticktimer, keystore, xous-log, xous-names, usb-bao1x, bao1x-emu, bao-console, modals) and stdin-based keyboard input for console interaction.
Feature architecture
dabao and baosec are both baochip boards, but dabao is simpler (no display, PDDB, or swap). Their hosted-mode emulators share service-level code but differ in services and behavior.
To avoid duplicating cfg gates or coupling the two targets, this PR introduces a feature hierarchy using Cargo's additive feature composition:
hosted-bao common base (hosted-mode emulation)
hosted-baosec extends base: adds with-pddb, pddb service
hosted-dabao extends base: adds stdin keyboard inputSource cfg gates in shared crates (bao1x-hal, modals, bao-console, ux-api, blitstr2, keystore) now check hosted-bao for common emulation code. Board-specific behavior stays in the leaf features:
with-pddbis inhosted-baoseconly (bao-console)- stdin keyboard is gated on
hosted-dabaoonly (xous-log)
with-pddb is moved from bao-console default features to board-baosec and hosted-baosec explicitly, so targets without a PDDB service don't hang on startup.
Adding future baochip board emulators only requires a new leaf feature that includes hosted-bao.
Usage
cargo xtask dabao-emu # run the emulator
cargo xtask dabao-emu myapp # run with a custom appTest plan
-
cargo xtask dabao-emubuilds and launches without panics - All 8 services start: ticktimer, keystore, xous-log, xous-names, usb-bao1x, bao1x-emu, bao-console, modals
- Console commands work via stdin (echo, ver, trng)
-
cargo xtask baosec-emustill builds and launches (no regression) - PDDB initializes in baosec-emu
-
baosec-emukeyboard input works with X11 display
Activity
14Not sure if it all works, but cute cat works :laughing:
INFO:xous_ticktimer: **************************************************************** (services/xous-ticktimer/src/main.rs:30)
INFO:xous_ticktimer: Welcome to Xous v0.10.0-134-gdb0badfca (services/xous-ticktimer/src/main.rs:31)
INFO:xous_ticktimer: Built on Tue, 1 Jan 1980 00:00:00 +0000 (services/xous-ticktimer/src/main.rs:32)
INFO:xous_ticktimer: **************************************************************** (services/xous-ticktimer/src/main.rs:33)
INFO:xous_ticktimer: Server started with SID SID([1801677172, 1701669236, 1702047090, 1919252082]) (services/xous-ticktimer/src/main.rs:45)
WARN:usb_bao1x::main_hosted: Opcode not supported: Envelope { sender: Sender { data: 134610944 }, body: Scalar(ScalarMessage { id: 516, arg1: 0, arg2: 0, arg3: 0, arg4: 0 }) } (services/usb-bao1x/src/main_hosted.rs:154)
[console]
a
[console] a
Commands: echo, ver, trng, cute, test
cute cat
[console] cute cat
⠀⠀⠀⠀⢀⠠⠤⠀⢀⣿⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠐⠀⠐⠀⠀⢀⣾⣿⡇⠀⠀⠀⠀⠀⢀⣼⡇⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⠀⠀⠀⠀⣴⣿⣿⠇⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣇⠀⠀⢀⣾⣿⣿⣿⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⠐⠀⡀
⠀⠀⠀⠀⢰⡿⠉⠀⡜⣿⣿⣿⡿⠿⢿⣿⣿⡃⠀⠀⠂⠄⠀
⠀⠀⠒⠒⠸⣿⣄⡘⣃⣿⣿⡟⢰⠃⠀⢹⣿⡇⠀⠀⠀⠀⠀
⠀⠀⠚⠉⠀⠊⠻⣿⣿⣿⣿⣿⣮⣤⣤⣿⡟⠁⠘⠠⠁⠀⠀
⠀⠀⠀⠀⠀⠠⠀⠀⠈⠙⠛⠛⠛⠛⠛⠁⠀⠒⠤⠀⠀⠀⠀
⠨⠠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠀⠀⠀⠀⠀⠀
⠁⠃⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀Not sure if it all works, but cute cat works :laughing:
INFO:xous_ticktimer: **************************************************************** (services/xous-ticktimer/src/main.rs:30)
INFO:xous_ticktimer: Welcome to Xous v0.10.0-134-gdb0badfca (services/xous-ticktimer/src/main.rs:31)
INFO:xous_ticktimer: Built on Tue, 1 Jan 1980 00:00:00 +0000 (services/xous-ticktimer/src/main.rs:32)
INFO:xous_ticktimer: **************************************************************** (services/xous-ticktimer/src/main.rs:33)
INFO:xous_ticktimer: Server started with SID SID([1801677172, 1701669236, 1702047090, 1919252082]) (services/xous-ticktimer/src/main.rs:45)
WARN:usb_bao1x::main_hosted: Opcode not supported: Envelope { sender: Sender { data: 134610944 }, body: Scalar(ScalarMessage { id: 516, arg1: 0, arg2: 0, arg3: 0, arg4: 0 }) } (services/usb-bao1x/src/main_hosted.rs:154)
[console]
a
[console] a
Commands: echo, ver, trng, cute, test
cute cat
[console] cute cat
⠀⠀⠀⠀⢀⠠⠤⠀⢀⣿⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠐⠀⠐⠀⠀⢀⣾⣿⡇⠀⠀⠀⠀⠀⢀⣼⡇⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⠀⠀⠀⠀⣴⣿⣿⠇⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣇⠀⠀⢀⣾⣿⣿⣿⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⠐⠀⡀
⠀⠀⠀⠀⢰⡿⠉⠀⡜⣿⣿⣿⡿⠿⢿⣿⣿⡃⠀⠀⠂⠄⠀
⠀⠀⠒⠒⠸⣿⣄⡘⣃⣿⣿⡟⢰⠃⠀⢹⣿⡇⠀⠀⠀⠀⠀
⠀⠀⠚⠉⠀⠊⠻⣿⣿⣿⣿⣿⣮⣤⣤⣿⡟⠁⠘⠠⠁⠀⠀
⠀⠀⠀⠀⠀⠠⠀⠀⠈⠙⠛⠛⠛⠛⠛⠁⠀⠒⠤⠀⠀⠀⠀
⠨⠠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠀⠀⠀⠀⠀⠀
⠁⠃⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀Not sure if it all works, but cute cat works :laughing:
INFO:xous_ticktimer: **************************************************************** (services/xous-ticktimer/src/main.rs:30)
INFO:xous_ticktimer: Welcome to Xous v0.10.0-134-gdb0badfca (services/xous-ticktimer/src/main.rs:31)
INFO:xous_ticktimer: Built on Tue, 1 Jan 1980 00:00:00 +0000 (services/xous-ticktimer/src/main.rs:32)
INFO:xous_ticktimer: **************************************************************** (services/xous-ticktimer/src/main.rs:33)
INFO:xous_ticktimer: Server started with SID SID([1801677172, 1701669236, 1702047090, 1919252082]) (services/xous-ticktimer/src/main.rs:45)
WARN:usb_bao1x::main_hosted: Opcode not supported: Envelope { sender: Sender { data: 134610944 }, body: Scalar(ScalarMessage { id: 516, arg1: 0, arg2: 0, arg3: 0, arg4: 0 }) } (services/usb-bao1x/src/main_hosted.rs:154)
[console]
a
[console] a
Commands: echo, ver, trng, cute, test
cute cat
[console] cute cat
⠀⠀⠀⠀⢀⠠⠤⠀⢀⣿⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠐⠀⠐⠀⠀⢀⣾⣿⡇⠀⠀⠀⠀⠀⢀⣼⡇⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⠀⠀⠀⠀⣴⣿⣿⠇⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣇⠀⠀⢀⣾⣿⣿⣿⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⠐⠀⡀
⠀⠀⠀⠀⢰⡿⠉⠀⡜⣿⣿⣿⡿⠿⢿⣿⣿⡃⠀⠀⠂⠄⠀
⠀⠀⠒⠒⠸⣿⣄⡘⣃⣿⣿⡟⢰⠃⠀⢹⣿⡇⠀⠀⠀⠀⠀
⠀⠀⠚⠉⠀⠊⠻⣿⣿⣿⣿⣿⣮⣤⣤⣿⡟⠁⠘⠠⠁⠀⠀
⠀⠀⠀⠀⠀⠠⠀⠀⠈⠙⠛⠛⠛⠛⠛⠁⠀⠒⠤⠀⠀⠀⠀
⠨⠠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠀⠀⠀⠀⠀⠀
⠁⠃⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀Not sure if it all works, but cute cat works :laughing:
INFO:xous_ticktimer: **************************************************************** (services/xous-ticktimer/src/main.rs:30)
INFO:xous_ticktimer: Welcome to Xous v0.10.0-134-gdb0badfca (services/xous-ticktimer/src/main.rs:31)
INFO:xous_ticktimer: Built on Tue, 1 Jan 1980 00:00:00 +0000 (services/xous-ticktimer/src/main.rs:32)
INFO:xous_ticktimer: **************************************************************** (services/xous-ticktimer/src/main.rs:33)
INFO:xous_ticktimer: Server started with SID SID([1801677172, 1701669236, 1702047090, 1919252082]) (services/xous-ticktimer/src/main.rs:45)
WARN:usb_bao1x::main_hosted: Opcode not supported: Envelope { sender: Sender { data: 134610944 }, body: Scalar(ScalarMessage { id: 516, arg1: 0, arg2: 0, arg3: 0, arg4: 0 }) } (services/usb-bao1x/src/main_hosted.rs:154)
[console]
a
[console] a
Commands: echo, ver, trng, cute, test
cute cat
[console] cute cat
⠀⠀⠀⠀⢀⠠⠤⠀⢀⣿⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠐⠀⠐⠀⠀⢀⣾⣿⡇⠀⠀⠀⠀⠀⢀⣼⡇⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⠀⠀⠀⠀⣴⣿⣿⠇⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣇⠀⠀⢀⣾⣿⣿⣿⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⠐⠀⡀
⠀⠀⠀⠀⢰⡿⠉⠀⡜⣿⣿⣿⡿⠿⢿⣿⣿⡃⠀⠀⠂⠄⠀
⠀⠀⠒⠒⠸⣿⣄⡘⣃⣿⣿⡟⢰⠃⠀⢹⣿⡇⠀⠀⠀⠀⠀
⠀⠀⠚⠉⠀⠊⠻⣿⣿⣿⣿⣿⣮⣤⣤⣿⡟⠁⠘⠠⠁⠀⠀
⠀⠀⠀⠀⠀⠠⠀⠀⠈⠙⠛⠛⠛⠛⠛⠁⠀⠒⠤⠀⠀⠀⠀
⠨⠠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠀⠀⠀⠀⠀⠀
⠁⠃⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀Not sure if it all works, but cute cat works :laughing:
INFO:xous_ticktimer: **************************************************************** (services/xous-ticktimer/src/main.rs:30)
INFO:xous_ticktimer: Welcome to Xous v0.10.0-134-gdb0badfca (services/xous-ticktimer/src/main.rs:31)
INFO:xous_ticktimer: Built on Tue, 1 Jan 1980 00:00:00 +0000 (services/xous-ticktimer/src/main.rs:32)
INFO:xous_ticktimer: **************************************************************** (services/xous-ticktimer/src/main.rs:33)
INFO:xous_ticktimer: Server started with SID SID([1801677172, 1701669236, 1702047090, 1919252082]) (services/xous-ticktimer/src/main.rs:45)
WARN:usb_bao1x::main_hosted: Opcode not supported: Envelope { sender: Sender { data: 134610944 }, body: Scalar(ScalarMessage { id: 516, arg1: 0, arg2: 0, arg3: 0, arg4: 0 }) } (services/usb-bao1x/src/main_hosted.rs:154)
[console]
a
[console] a
Commands: echo, ver, trng, cute, test
cute cat
[console] cute cat
⠀⠀⠀⠀⢀⠠⠤⠀⢀⣿⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠐⠀⠐⠀⠀⢀⣾⣿⡇⠀⠀⠀⠀⠀⢀⣼⡇⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⠀⠀⠀⠀⣴⣿⣿⠇⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣇⠀⠀⢀⣾⣿⣿⣿⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⠐⠀⡀
⠀⠀⠀⠀⢰⡿⠉⠀⡜⣿⣿⣿⡿⠿⢿⣿⣿⡃⠀⠀⠂⠄⠀
⠀⠀⠒⠒⠸⣿⣄⡘⣃⣿⣿⡟⢰⠃⠀⢹⣿⡇⠀⠀⠀⠀⠀
⠀⠀⠚⠉⠀⠊⠻⣿⣿⣿⣿⣿⣮⣤⣤⣿⡟⠁⠘⠠⠁⠀⠀
⠀⠀⠀⠀⠀⠠⠀⠀⠈⠙⠛⠛⠛⠛⠛⠁⠀⠒⠤⠀⠀⠀⠀
⠨⠠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠀⠀⠀⠀⠀⠀
⠁⠃⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀Not sure if it all works, but cute cat works :laughing:
INFO:xous_ticktimer: **************************************************************** (services/xous-ticktimer/src/main.rs:30)
INFO:xous_ticktimer: Welcome to Xous v0.10.0-134-gdb0badfca (services/xous-ticktimer/src/main.rs:31)
INFO:xous_ticktimer: Built on Tue, 1 Jan 1980 00:00:00 +0000 (services/xous-ticktimer/src/main.rs:32)
INFO:xous_ticktimer: **************************************************************** (services/xous-ticktimer/src/main.rs:33)
INFO:xous_ticktimer: Server started with SID SID([1801677172, 1701669236, 1702047090, 1919252082]) (services/xous-ticktimer/src/main.rs:45)
WARN:usb_bao1x::main_hosted: Opcode not supported: Envelope { sender: Sender { data: 134610944 }, body: Scalar(ScalarMessage { id: 516, arg1: 0, arg2: 0, arg3: 0, arg4: 0 }) } (services/usb-bao1x/src/main_hosted.rs:154)
[console]
a
[console] a
Commands: echo, ver, trng, cute, test
cute cat
[console] cute cat
⠀⠀⠀⠀⢀⠠⠤⠀⢀⣿⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠐⠀⠐⠀⠀⢀⣾⣿⡇⠀⠀⠀⠀⠀⢀⣼⡇⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⠀⠀⠀⠀⣴⣿⣿⠇⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣇⠀⠀⢀⣾⣿⣿⣿⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⠐⠀⡀
⠀⠀⠀⠀⢰⡿⠉⠀⡜⣿⣿⣿⡿⠿⢿⣿⣿⡃⠀⠀⠂⠄⠀
⠀⠀⠒⠒⠸⣿⣄⡘⣃⣿⣿⡟⢰⠃⠀⢹⣿⡇⠀⠀⠀⠀⠀
⠀⠀⠚⠉⠀⠊⠻⣿⣿⣿⣿⣿⣮⣤⣤⣿⡟⠁⠘⠠⠁⠀⠀
⠀⠀⠀⠀⠀⠠⠀⠀⠈⠙⠛⠛⠛⠛⠛⠁⠀⠒⠤⠀⠀⠀⠀
⠨⠠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠀⠀⠀⠀⠀⠀
⠁⠃⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀FWIW the idea behind yove was to be able to run just enough to allow the rust tests to work. Might be worth it to do something similar?
FWIW the idea behind yove was to be able to run just enough to allow the rust tests to work. Might be worth it to do something similar?
FWIW the idea behind yove was to be able to run just enough to allow the rust tests to work. Might be worth it to do something similar?
FWIW the idea behind yove was to be able to run just enough to allow the rust tests to work. Might be worth it to do something similar?
FWIW the idea behind yove was to be able to run just enough to allow the rust tests to work. Might be worth it to do something similar?
Oh, sorry, missed that. Looks interesting, will have a look! Thanks for sharing!
FWIW the idea behind yove was to be able to run just enough to allow the rust tests to work. Might be worth it to do something similar?
Oh, sorry, missed that. Looks interesting, will have a look! Thanks for sharing!
Not sure if it all works, but
cute catworks :laughing: