a vim plugin that displays stuff on an led matrix
1# Daedalus Firmware
2
3This directory contains the firmware for the RP2350 board.
4
5## Building
6
7### Using the Makefile (Recommended)
8
9The project includes a Makefile that simplifies the build process:
10
111. Make sure you have the Pico SDK set up (automatically handled by the Nix flake)
122. Build the firmware:
13 ```
14 make
15 ```
163. The output files will be in the `build` directory
17
18### Manual Build
19
20If you prefer to use CMake directly:
21
221. Configure the build:
23 ```
24 cmake -B build -S .
25 ```
262. Build the firmware:
27 ```
28 cmake --build build
29 ```
303. The output files will be in the `build` directory:
31 - `daedalus_firmware.uf2`: UF2 file for drag-and-drop programming
32 - `daedalus_firmware.elf`: ELF file for debugging
33 - `daedalus_firmware.hex`: HEX file for programming with external tools
34
35## Flashing
36
37### Using the Makefile (Recommended)
38
39Flash the firmware to the RP2350 board:
40
41```
42make flash
43```
44
45If the board is already running firmware and needs to be forced into programming mode:
46
47```
48make FORCE_FLASH=1 flash
49```
50
51### Manual Flashing
52
53Connect the RP2350 board in bootloader mode (hold BOOTSEL while connecting USB) and copy the UF2 file:
54
55```
56cp build/daedalus_firmware.uf2 /path/to/rp2350/
57```
58
59Or use picotool:
60
61```
62picotool load -x build/daedalus_firmware.uf2
63```
64
65## Debugging
66
67Generate disassembly for debugging:
68
69```
70make disasm
71```
72
73## Development
74
75The firmware uses both cores of the RP2040:
76- Core 0: Handles the main application logic
77- Core 1: Manages the LED matrix display
78
79The LED matrix is organized in a 4x6 grid, with rows and columns controlled by GPIO pins.