Skip to content

platform: add interactive shell to Zynq-A9 QEMU#79

Merged
zevorn merged 1 commit intomainfrom
feat/zynq-shell
Mar 18, 2026
Merged

platform: add interactive shell to Zynq-A9 QEMU#79
zevorn merged 1 commit intomainfrom
feat/zynq-shell

Conversation

@zevorn
Copy link
Copy Markdown
Owner

@zevorn zevorn commented Mar 18, 2026

Summary

Add chat-first interactive shell to the Zynq-A9 QEMU platform, bringing feature parity with ESP32 platforms.

Components

Console driver (platform/zynq-a9/drivers/console.c):

  • Cadence UART RX/TX at 0xE0000000
  • claw_console_read() with timeout and taskYIELD polling
  • claw_console_write() via UART FIFO

Shell (platform/zynq-a9/shell.c):

  • Full chat-first REPL ported from esp_shell.c
  • Insert-mode line editing (arrows, backspace, delete, home/end)
  • UTF-8 aware cursor movement (CJK fullwidth)
  • Tab completion for /commands
  • Thinking animation during AI calls
  • Direct input → AI, /command → system dispatch

Boot sequence

rt-claw: Zynq-A9 QEMU (FreeRTOS) - Real-Time Claw
[I/init] init: gateway / sched / swarm / net / tools / ai_engine / ai_skill
[init] waiting for network (10s)...

  rt-claw chat  (type /help for commands)
  Direct input sends to AI, /command for system.

<You> _

Test plan

  • make build-zynq-a9-qemu compiles (shell + console driver)
  • make run-zynq-a9-qemu shows shell prompt <You>
  • QEMU -nographic stdin → UART RX works
  • /help command lists available commands
  • AI chat via api-proxy

Implement console I/O driver for Cadence UART and port the chat-first
shell to the Zynq-A9 platform.

New files:
- drivers/console.c: claw_console_init/read/write for Cadence UART
  (UART0 at 0xE0000000, RX polling with taskYIELD)
- shell.c: full chat-first REPL ported from esp_shell.c — insert-mode
  line editing, UTF-8, tab completion, thinking animation, AI chat

Changes:
- main.c: wait 10s for DHCP, then enter zynq_shell_loop()
- syscalls.c: add sched_tool_remove_by_name stub (tool_sched.c is
  ESP-IDF only due to NVS dependency)

Verified: shell prompt appears on QEMU, /help and AI chat available.

Signed-off-by: Chao Liu <chao.liu.zevorn@gmail.com>
@zevorn zevorn merged commit 4815300 into main Mar 18, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant