Weavie is a tiny physical weaving pattern machine, implemented entirely in 32-bit ARM assembly. It's a silly little project, created to learn more about embedded development and assembly programming. You can draw weaving patterns by changing the threading, tieup and treadling using its own little mechanical keyboard. It runs on this STM32 board with this monochrome display. It also has its own emulator based on Rust for local development.
All dependencies are defined in shell.nix. Run:
nix-shell
Or install the depedencies listed in shell.nix using your preferred package manager.
make
- WASD to move the cursor in the selected region.
- Q to switch between the threading, tieup and treadling (see How to Read a Weaving Draft)
- WS to zoom in/out when there's no selected region.
- E to toggle the selected square.
- Connect the BOOT0 (B0) pin to the 3.3V PIN. This enables the DFU bootloader mode.
- Connect the board to the USB port.
- Flash the chip:
make flash
To run in QEMU:
make qemu
Restarting QEMU inside gdb:
monitor system_reset
Exiting QEMU:
Ctrl-A X
Debugging in gdb:
make debug
- Board: Adafruit Feather STM32F405 Express
- Display: Adafruit SHARP Memory Display 2.7"
- 3.3V to display VIN (power)
- GND to display GND (ground)
- SCK to display CLK (clock)
- MO (MOSI) to display DI (data input)
- PIN6 to display CS (chip-select)
- STM32F405 Datasheet
- STM32F405 Reference Manual
- Adafruit STM32F405 Feather Express Pinouts
- SHARP Display Datasheet
- Sharp Memory Display Wiring Guide
- Hello, world" in ARM assembly
- Bare-metal C programming on ARM
- "Bare Metal" STM32 Programming (Part 1): Hello, ARM!
- A bare metal programming guide (ARM microcontrollers)
- ARM Assembly Internals & Reverse Engineering
- Emulating an STM32F4 in QEMU to test ARM assembly
- Programming of ARM Cortex-M microcontrollers
- SPI: The serial peripheral interface