Getting Started

Container-only development. No host Rust toolchain needed.

Prerequisites

  • Podman (or Docker)
  • VS Code with Dev Containers extension
  • USB access: User in dialout group

Setup (Linux)

# Install Podman
sudo apt install podman podman-docker

# USB access
sudo usermod -aG dialout $USER
# Log out and back in

Development Workflow

  1. Open project in VS Code
  2. Click "Reopen in Container" when prompted
  3. Wait ~2-3 min (first time pulls ~4GB image)
  4. Use integrated terminal for all commands

Option 2: Manual Podman

cd /home/ad/dev/lynx-v4

podman run -it --rm \
  --device=/dev/ttyACM0 --device=/dev/ttyACM1 \
  --device=/dev/ttyACM2 --device=/dev/ttyACM3 \
  --group-add=keep-groups \
  --userns=keep-id \
  -v $(pwd):/workspace:Z \
  -w /workspace \
  docker.io/espressif/idf-rust:esp32s3_latest

Verify Setup

Inside container:

cargo --version                    # Toolchain available
echo $LIBCLANG_PATH                # ESP environment configured
cargo check -p tower --release     # Build works

Flash Firmware

See the Flashing Guide for flash commands.

./f tower 2              # Flash tower to port 2
./f cat-l fk tk bn 3     # Flash left cat to port 3

Troubleshooting

Permission denied /dev/ttyACM*

sudo usermod -aG dialout $USER
# Log out and back in
groups | grep dialout    # Verify membership

Container can't see USB devices

Ensure devices are passed to container:

ls /dev/ttyACM*          # Check devices exist on host
# Add --device=/dev/ttyACMX for each device

LIBCLANG_PATH empty

Container should have this pre-configured. If empty, you're not in the container.

What's in the Container

  • Rust toolchain with Xtensa target (ESP32-S3)
  • espflash, espmonitor, ESP tools
  • Pre-configured LIBCLANG_PATH
  • rust-analyzer for xtensa-esp32s3-none-elf

External Resources