Compare commits
3 Commits
8a5fe69b5c
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
34e6e50c61
|
|||
|
04949c4abd
|
|||
|
f31e20c7ce
|
34
README.md
Normal file
34
README.md
Normal file
@ -0,0 +1,34 @@
|
||||
A DIY split keyboard.
|
||||
|
||||
## Directory
|
||||
|
||||
### `/lib`
|
||||
A rust library, and the bulk of the keyboard firmware implementation.
|
||||
Written using the Embassy framework.
|
||||
|
||||
### `/left` and `/right`
|
||||
Rust binaries, one for each half of the split keyboard.
|
||||
Most of the actual logic is implemented in `/lib`.
|
||||
|
||||
### `/schematic`
|
||||
Kicad schematics of the keyboard PCBs.
|
||||
|
||||
### `/case`
|
||||
3d-printable files of the keyboard case and related plastics.
|
||||
|
||||
### `/editor`
|
||||
A graphical program for configuring the keyboard layout. Work in progress.
|
||||
|
||||
|
||||
## Developing
|
||||
|
||||
Required tools:
|
||||
- Rust, obviously.
|
||||
- `probe-rs` for flashing the firmware. Follow instructions at https://probe.rs/
|
||||
- [`flip-link`](https://github.com/knurling-rs/flip-link/)
|
||||
- A debug probe of some kind, I recommend a [Pitaya-Link](https://github.com/makerdiary/pitaya-link)
|
||||
|
||||
To flash:
|
||||
- plug in the probe,
|
||||
- `cd` into either `left` or `right`
|
||||
- `cargo run`
|
||||
@ -1,3 +0,0 @@
|
||||
# tgnt
|
||||
|
||||
Keyboard configuration library and editor.
|
||||
@ -9,7 +9,7 @@ edition = "2021"
|
||||
path = "../lib"
|
||||
package = "tangentbord1-lib"
|
||||
|
||||
[dependencies]
|
||||
[target.thumbv6m-none-eabi.dependencies]
|
||||
cortex-m-rt = "0.7"
|
||||
embassy-rp = { version = "0.1.0", features = ["time-driver", "critical-section-impl"] }
|
||||
embassy-executor = { version = "0.5.0", features = ["nightly", "executor-thread", "integrated-timers", "arch-cortex-m"] }
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
//! Firmware for Tangentbord1, left half.
|
||||
|
||||
#![no_std]
|
||||
// NOTE: the order of attributes matters here..
|
||||
#![no_main]
|
||||
#![cfg(target_os = "none")] // only try to compile this for embedded
|
||||
#![no_std]
|
||||
#![feature(type_alias_impl_trait)]
|
||||
#![cfg(target_arch = "arm")]
|
||||
|
||||
extern crate alloc;
|
||||
extern crate cortex_m_rt;
|
||||
|
||||
@ -9,7 +9,7 @@ edition = "2021"
|
||||
path = "../lib"
|
||||
package = "tangentbord1-lib"
|
||||
|
||||
[dependencies]
|
||||
[target.thumbv6m-none-eabi.dependencies]
|
||||
cortex-m-rt = "0.7"
|
||||
embassy-rp = { version = "0.1.0", features = ["time-driver", "critical-section-impl"] }
|
||||
embassy-executor = { version = "0.5.0", features = ["nightly", "executor-thread", "integrated-timers", "arch-cortex-m"] }
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
//! Firmware for Tangentbord1, right half.
|
||||
|
||||
#![no_std]
|
||||
// NOTE: the order of attributes matters here..
|
||||
#![no_main]
|
||||
#![cfg(target_os = "none")] // only try to compile this for embedded
|
||||
#![no_std]
|
||||
#![feature(type_alias_impl_trait)]
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
26
run
26
run
@ -1,26 +0,0 @@
|
||||
#!/usr/bin/env nu
|
||||
|
||||
# Build, flash, and run the firmware.
|
||||
#
|
||||
# Will also attach to serial logs
|
||||
def main [
|
||||
bin: string # Which firmware to run, 'left' or 'right'.
|
||||
--serial (-s): string # The serial device to get logs from.
|
||||
--probe (-p): bool # Flash & run using probe-run instead of elf2uf2
|
||||
] {
|
||||
if $probe == true {
|
||||
cargo build --bin $bin
|
||||
probe-run --chip RP2040 --speed 4000 ("./target/thumbv6m-none-eabi/debug/" + $bin)
|
||||
} else {
|
||||
cargo run --bin $bin
|
||||
}
|
||||
|
||||
let log_script = ($env.FILE_PWD | path join "serial-logs")
|
||||
|
||||
if $serial == null {
|
||||
nu $log_script
|
||||
} else {
|
||||
nu $log_script --serial $serial
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user