parent
ff5dabf1ed
commit
3a4eed5870
@ -1,16 +1,21 @@ |
||||
(module 1B3W-9 (layer F.Cu) (tedit 6055BFAA) |
||||
(module 1B3W-9 (layer F.Cu) (tedit 6057B92C) |
||||
(fp_text reference REF** (at 0 0) (layer F.SilkS) |
||||
(effects (font (size 1 1) (thickness 0.15))) |
||||
) |
||||
(fp_text value 1B3W-9 (at 0 -6) (layer F.Fab) |
||||
(effects (font (size 1 1) (thickness 0.15))) |
||||
) |
||||
(fp_line (start 3 3.9) (end -3 3.9) (layer F.SilkS) (width 0.12)) |
||||
(fp_line (start -3 -3.9) (end 3 -3.9) (layer F.SilkS) (width 0.12)) |
||||
(fp_line (start 3 3.9) (end -3 3.9) (layer F.SilkS) (width 0.12)) |
||||
(pad 1 thru_hole circle (at -3.1 -2.5) (size 1.2 1.2) (drill 0.8) (layers *.Cu *.Mask)) |
||||
(pad 2 thru_hole circle (at 3.1 -2.5) (size 1.2 1.2) (drill 0.8) (layers *.Cu *.Mask)) |
||||
(pad 3 thru_hole circle (at -3.1 2.5) (size 1.2 1.2) (drill 0.8) (layers *.Cu *.Mask)) |
||||
(pad 4 thru_hole circle (at 3.1 2.5) (size 1.2 1.2) (drill 0.8) (layers *.Cu *.Mask)) |
||||
(pad 5 thru_hole circle (at 0 -3.15) (size 1.2 1.2) (drill 0.8) (layers *.Cu *.Mask)) |
||||
(pad 6 thru_hole circle (at 0 3.15) (size 1.2 1.2) (drill 0.8) (layers *.Cu *.Mask)) |
||||
(model ${KIPRJMOD}/generated/switch.step |
||||
(offset (xyz -3 0 0)) |
||||
(scale (xyz 1 1 1)) |
||||
(rotate (xyz -90 0 0)) |
||||
) |
||||
) |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,8 +0,0 @@ |
||||
[target.thumbv7m-none-eabi] |
||||
|
||||
[target.'cfg(all(target_arch = "arm", target_os = "none"))'] |
||||
runner = "arm-none-eabi-gdb -tui -q -x openocd.gdb" |
||||
rustflags = [ "-C", "link-arg=-Tlink.x" ] |
||||
|
||||
[build] |
||||
target = "thumbv7m-none-eabi" |
@ -1 +0,0 @@ |
||||
target |
@ -1,294 +0,0 @@ |
||||
# This file is automatically @generated by Cargo. |
||||
# It is not intended for manual editing. |
||||
[[package]] |
||||
name = "aligned" |
||||
version = "0.3.4" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "c19796bd8d477f1a9d4ac2465b464a8b1359474f06a96bb3cda650b4fca309bf" |
||||
dependencies = [ |
||||
"as-slice", |
||||
] |
||||
|
||||
[[package]] |
||||
name = "as-slice" |
||||
version = "0.1.5" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "45403b49e3954a4b8428a0ac21a4b7afadccf92bfd96273f1a58cd4812496ae0" |
||||
dependencies = [ |
||||
"generic-array 0.12.4", |
||||
"generic-array 0.13.3", |
||||
"generic-array 0.14.4", |
||||
"stable_deref_trait", |
||||
] |
||||
|
||||
[[package]] |
||||
name = "bare-metal" |
||||
version = "0.2.5" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "5deb64efa5bd81e31fcd1938615a6d98c82eafcbcd787162b6f63b91d6bac5b3" |
||||
dependencies = [ |
||||
"rustc_version", |
||||
] |
||||
|
||||
[[package]] |
||||
name = "bitfield" |
||||
version = "0.13.2" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "46afbd2983a5d5a7bd740ccb198caf5b82f45c40c09c0eed36052d91cb92e719" |
||||
|
||||
[[package]] |
||||
name = "cast" |
||||
version = "0.2.3" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "4b9434b9a5aa1450faa3f9cb14ea0e8c53bb5d2b3c1bfd1ab4fc03e9f33fbfb0" |
||||
dependencies = [ |
||||
"rustc_version", |
||||
] |
||||
|
||||
[[package]] |
||||
name = "cortex-m" |
||||
version = "0.6.7" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "9075300b07c6a56263b9b582c214d0ff037b00d45ec9fde1cc711490c56f1bb9" |
||||
dependencies = [ |
||||
"aligned", |
||||
"bare-metal", |
||||
"bitfield", |
||||
"cortex-m 0.7.2", |
||||
"volatile-register", |
||||
] |
||||
|
||||
[[package]] |
||||
name = "cortex-m" |
||||
version = "0.7.2" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "643a210c1bdc23d0db511e2a576082f4ff4dcae9d0c37f50b431b8f8439d6d6b" |
||||
dependencies = [ |
||||
"bare-metal", |
||||
"bitfield", |
||||
"embedded-hal", |
||||
"volatile-register", |
||||
] |
||||
|
||||
[[package]] |
||||
name = "cortex-m-rt" |
||||
version = "0.6.13" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "980c9d0233a909f355ed297ef122f257942de5e0a2cb1c39f60684b65bcb90fb" |
||||
dependencies = [ |
||||
"cortex-m-rt-macros", |
||||
"r0", |
||||
] |
||||
|
||||
[[package]] |
||||
name = "cortex-m-rt-macros" |
||||
version = "0.1.8" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "4717562afbba06e760d34451919f5c3bf3ac15c7bb897e8b04862a7428378647" |
||||
dependencies = [ |
||||
"proc-macro2", |
||||
"quote", |
||||
"syn", |
||||
] |
||||
|
||||
[[package]] |
||||
name = "embedded-hal" |
||||
version = "0.2.4" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "fa998ce59ec9765d15216393af37a58961ddcefb14c753b4816ba2191d865fcb" |
||||
dependencies = [ |
||||
"nb 0.1.3", |
||||
"void", |
||||
] |
||||
|
||||
[[package]] |
||||
name = "euro-yesman" |
||||
version = "0.1.0" |
||||
dependencies = [ |
||||
"cortex-m 0.6.7", |
||||
"cortex-m-rt", |
||||
"embedded-hal", |
||||
"panic-halt", |
||||
"stm32f1xx-hal", |
||||
] |
||||
|
||||
[[package]] |
||||
name = "generic-array" |
||||
version = "0.12.4" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" |
||||
dependencies = [ |
||||
"typenum", |
||||
] |
||||
|
||||
[[package]] |
||||
name = "generic-array" |
||||
version = "0.13.3" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "f797e67af32588215eaaab8327027ee8e71b9dd0b2b26996aedf20c030fce309" |
||||
dependencies = [ |
||||
"typenum", |
||||
] |
||||
|
||||
[[package]] |
||||
name = "generic-array" |
||||
version = "0.14.4" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" |
||||
dependencies = [ |
||||
"typenum", |
||||
"version_check", |
||||
] |
||||
|
||||
[[package]] |
||||
name = "nb" |
||||
version = "0.1.3" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "801d31da0513b6ec5214e9bf433a77966320625a37860f910be265be6e18d06f" |
||||
dependencies = [ |
||||
"nb 1.0.0", |
||||
] |
||||
|
||||
[[package]] |
||||
name = "nb" |
||||
version = "1.0.0" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "546c37ac5d9e56f55e73b677106873d9d9f5190605e41a856503623648488cae" |
||||
|
||||
[[package]] |
||||
name = "panic-halt" |
||||
version = "0.2.0" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "de96540e0ebde571dc55c73d60ef407c653844e6f9a1e2fdbd40c07b9252d812" |
||||
|
||||
[[package]] |
||||
name = "proc-macro2" |
||||
version = "1.0.24" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" |
||||
dependencies = [ |
||||
"unicode-xid", |
||||
] |
||||
|
||||
[[package]] |
||||
name = "quote" |
||||
version = "1.0.9" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" |
||||
dependencies = [ |
||||
"proc-macro2", |
||||
] |
||||
|
||||
[[package]] |
||||
name = "r0" |
||||
version = "0.2.2" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "e2a38df5b15c8d5c7e8654189744d8e396bddc18ad48041a500ce52d6948941f" |
||||
|
||||
[[package]] |
||||
name = "rustc_version" |
||||
version = "0.2.3" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" |
||||
dependencies = [ |
||||
"semver", |
||||
] |
||||
|
||||
[[package]] |
||||
name = "semver" |
||||
version = "0.9.0" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" |
||||
dependencies = [ |
||||
"semver-parser", |
||||
] |
||||
|
||||
[[package]] |
||||
name = "semver-parser" |
||||
version = "0.7.0" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" |
||||
|
||||
[[package]] |
||||
name = "stable_deref_trait" |
||||
version = "1.2.0" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" |
||||
|
||||
[[package]] |
||||
name = "stm32f1" |
||||
version = "0.11.0" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "849b1e8d9bcfd792c9d9178cf86165d299a661c26e35d9322ae9382d3f3fe460" |
||||
dependencies = [ |
||||
"bare-metal", |
||||
"cortex-m 0.6.7", |
||||
"cortex-m-rt", |
||||
"vcell", |
||||
] |
||||
|
||||
[[package]] |
||||
name = "stm32f1xx-hal" |
||||
version = "0.6.1" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "af9b9e5d7c2901ee39fc9527412327a1fe08f1d84e9d7f4b3497448e655e5098" |
||||
dependencies = [ |
||||
"as-slice", |
||||
"cast", |
||||
"cortex-m 0.6.7", |
||||
"cortex-m-rt", |
||||
"embedded-hal", |
||||
"nb 0.1.3", |
||||
"stm32f1", |
||||
"void", |
||||
] |
||||
|
||||
[[package]] |
||||
name = "syn" |
||||
version = "1.0.64" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "3fd9d1e9976102a03c542daa2eff1b43f9d72306342f3f8b3ed5fb8908195d6f" |
||||
dependencies = [ |
||||
"proc-macro2", |
||||
"quote", |
||||
"unicode-xid", |
||||
] |
||||
|
||||
[[package]] |
||||
name = "typenum" |
||||
version = "1.13.0" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" |
||||
|
||||
[[package]] |
||||
name = "unicode-xid" |
||||
version = "0.2.1" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" |
||||
|
||||
[[package]] |
||||
name = "vcell" |
||||
version = "0.1.3" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "77439c1b53d2303b20d9459b1ade71a83c716e3f9c34f3228c00e6f185d6c002" |
||||
|
||||
[[package]] |
||||
name = "version_check" |
||||
version = "0.9.3" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" |
||||
|
||||
[[package]] |
||||
name = "void" |
||||
version = "1.0.2" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" |
||||
|
||||
[[package]] |
||||
name = "volatile-register" |
||||
version = "0.2.0" |
||||
source = "registry+https://github.com/rust-lang/crates.io-index" |
||||
checksum = "0d67cb4616d99b940db1d6bd28844ff97108b498a6ca850e5b6191a532063286" |
||||
dependencies = [ |
||||
"vcell", |
||||
] |
@ -1,24 +0,0 @@ |
||||
[package] |
||||
name = "euro-yesman" |
||||
description = "STM32 firmware for the 'yesman' eurorack sequencer" |
||||
version = "0.1.0" |
||||
authors = ["Katharina Fey <kookie@spacekookie.de>"] |
||||
edition = "2018" |
||||
license = "GPL-3.0-or-later" |
||||
|
||||
## Configure cargo to produce a smol binary |
||||
[profile.release] |
||||
opt-level = 'z' |
||||
lto = true |
||||
|
||||
[dependencies] |
||||
cortex-m = "0.6" |
||||
cortex-m-rt = "0.6" |
||||
embedded-hal = "0.2" |
||||
panic-halt = "0.2" |
||||
|
||||
# Access to the stm32f103 HAL. |
||||
[dependencies.stm32f1xx-hal] |
||||
# Bluepill contains a 64kB flash variant which is called "medium density" |
||||
features = ["stm32f103", "rt", "medium"] |
||||
version = "0.6" |
@ -1,45 +0,0 @@ |
||||
![](logo.png) |
||||
|
||||
A flexible, and hackable 4-channel 1u eurorack sequencer. Libre hardware. |
||||
|
||||
**Note:** the *yesman* default panel uses the intellijel 1u size |
||||
specification. However, the PCB can also fit the *whatever* spec. |
||||
You simply need to change the CAD file model specification. |
||||
|
||||
|
||||
## The Firmware |
||||
|
||||
The *yesman* firmware is written in Rust, running on an STM32F1. The |
||||
button mappings can be modified via the configuration files. You need |
||||
to have cargo setup for cross-compilation. |
||||
|
||||
If you're using nix you can use the provided shell file to load the |
||||
required environment. |
||||
|
||||
```console |
||||
$ nix-shell |
||||
... |
||||
$ cargo build --release |
||||
``` |
||||
|
||||
|
||||
## The front panel |
||||
|
||||
As previously mentioned the front panel can be configured for two |
||||
different 1u size specifications. Use the `panel/build.sh` tool to |
||||
specify which. |
||||
|
||||
The final design files can be compiled into `.gcode` or `.obj` files. |
||||
|
||||
|
||||
## The PCB |
||||
|
||||
If you want to hack on the PCB, the design files can be found in |
||||
`board/`. You need KiCad 5 to open them. |
||||
|
||||
|
||||
## License |
||||
|
||||
The *yesman* firmware, and pcb design are licensed under the GNU |
||||
General Public License 3.0 (or later). The *yesman* front panel is |
||||
licensed under the CC-BY-SA 4.0. |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 34 KiB |
@ -1,8 +0,0 @@ |
||||
/* memory.x - Linker script for the STM32F103C8T6 */ |
||||
MEMORY |
||||
{ |
||||
/* Flash memory begins at 0x80000000 and has a size of 64kB*/ |
||||
FLASH : ORIGIN = 0x08000000, LENGTH = 64K |
||||
/* RAM begins at 0x20000000 and has a size of 20kB*/ |
||||
RAM : ORIGIN = 0x20000000, LENGTH = 20K |
||||
} |
@ -1,6 +0,0 @@ |
||||
# This is required to make it work with my fake stm32 |
||||
set CPUTAPID 0x2ba01477 |
||||
source [find interface/stlink.cfg] |
||||
|
||||
source [find target/stm32f1x.cfg] |
||||
|
@ -1,19 +0,0 @@ |
||||
target remote :3333 |
||||
|
||||
# print demangled symbols |
||||
set print asm-demangle on |
||||
|
||||
# detect unhandled exceptions, hard faults and panics |
||||
break DefaultHandler |
||||
break UserHardFault |
||||
break rust_begin_unwind |
||||
|
||||
# *try* to stop at the user entry point (it might be gone due to inlining) |
||||
break main |
||||
|
||||
monitor arm semihosting enable |
||||
|
||||
load |
||||
|
||||
# start the process but immediately halt the processor |
||||
stepi |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,9 +0,0 @@ |
||||
with (import <nixpkgs> {}); |
||||
|
||||
stdenv.mkDerivation { |
||||
name = "bad-rust-env"; |
||||
buildInputs = with pkgs; [ |
||||
rustup clangStdenv gcc-arm-embedded |
||||
cargo-flash cargo-binutils openocd |
||||
]; |
||||
} |
@ -1,45 +0,0 @@ |
||||
#![no_std] |
||||
#![no_main] |
||||
|
||||
use cortex_m_rt::entry; |
||||
use embedded_hal::digital::v2::OutputPin; |
||||
use stm32f1xx_hal::{delay::Delay, pac, prelude::*}; |
||||
|
||||
// Halt the MCU when panic
|
||||
#[allow(unused_imports)] |
||||
use panic_halt; |
||||
|
||||
mod seq; |
||||
pub use seq::{LayerSelect, SeqLayer, Sequencer}; |
||||
|
||||
#[entry] |
||||
fn main() -> ! { |
||||
// Grab handles for the underlying hardware objects
|
||||
let dp = pac::Peripherals::take().unwrap(); |
||||
let cp = cortex_m::Peripherals::take().unwrap(); |
||||
|
||||
// Initialise GPIOC via the HAL
|
||||
let mut rcc = dp.RCC.constrain(); |
||||
let mut gpioc = dp.GPIOC.split(&mut rcc.apb2); |
||||
|
||||
// Make it into an output
|
||||
let mut led = gpioc.pc13.into_push_pull_output(&mut gpioc.crh); |
||||
|
||||
// Initialize the delay object with the MCU frequency
|
||||
let mut flash = dp.FLASH.constrain(); |
||||
let clocks = rcc |
||||
.cfgr |
||||
.use_hse(8.mhz()) |
||||
.sysclk(48.mhz()) |
||||
.pclk1(24.mhz()) |
||||
.freeze(&mut flash.acr); |
||||
let mut delay = Delay::new(cp.SYST, clocks); |
||||
|
||||
// Now go blinkenlights
|
||||
loop { |
||||
led.set_high().ok(); |
||||
delay.delay_ms(1000_u16); |
||||
led.set_low().ok(); |
||||
delay.delay_ms(1000_u16); |
||||
} |
||||
} |
@ -1,66 +0,0 @@ |
||||
/// Represent a single layer on the sequencer
|
||||
pub struct SeqLayer { |
||||
/// List of steps that are either on or off
|
||||
steps: [bool; 16], |
||||
/// The length of the sequence to loop
|
||||
length: u8, |
||||
} |
||||
|
||||
impl SeqLayer { |
||||
/// Get the step by index, wrapping around if the index is beyond the length
|
||||
fn step(&self, idx: u8) -> bool { |
||||
let nidx = idx % self.length; |
||||
self.steps[nidx as usize] |
||||
} |
||||
|
||||
fn set(&mut self, idx: usize, val: bool) { |
||||
self.steps[idx] = val; |
||||
} |
||||
} |
||||
|
||||
/// Indicate which layer is selected
|
||||
pub enum LayerSelect { |
||||
A, |
||||
B, |
||||
C, |
||||
D, |
||||
} |
||||
|
||||
/// Main sequencer state structure
|
||||
pub struct Sequencer { |
||||
a: SeqLayer, |
||||
b: SeqLayer, |
||||
c: SeqLayer, |
||||
d: SeqLayer, |
||||
active_layer: LayerSelect, |
||||
active_step: u8, |
||||
} |
||||
|
||||
impl Sequencer { |
||||
/// Step to the next step, wrapping around at 16
|
||||
pub fn step(&mut self) { |
||||
self.active_step %= self.active_step; |
||||
} |
||||
|
||||
/// Get the current step for all four layers
|
||||
pub fn get(&self) -> (bool, bool, bool, bool) { |
||||
let i = self.active_step; |
||||
( |
||||
self.a.step(i), |
||||
self.b.step(i), |
||||
self.c.step(i), |
||||
self.d.step(i), |
||||
) |
||||
} |
||||
|
||||
/// Edit a step of the active layer
|
||||
pub fn edit(&mut self, idx: usize, val: bool) { |
||||
assert!(idx <= 16); |
||||
match self.active_layer { |
||||
LayerSelect::A => self.a.set(idx, val), |
||||
LayerSelect::B => self.b.set(idx, val), |
||||
LayerSelect::C => self.c.set(idx, val), |
||||
LayerSelect::D => self.d.set(idx, val), |
||||
} |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
Loading…
Reference in new issue