A (small) playground project where I explore embedded software development in Rust.
I'm not affiliated with these websites; I just think they offer neat stuff for a reasonable price.
rustup default nightly
rustup target add thumbv7m-none-eabi
paru -S gdb-multiarch openocd
# these are optional and only used if you
# have the signal analyzer
paru -S pulseview sigrok-firmware-fx2lafw
# Make sure you have OpenOCD running in another terminal
~/embedded-playground $ sudo openocd
# Run the project
~/embedded-playground $ cargo run
Power the breadboard by the host 5V (9) and GND (3) pins from the ST-Link. Unless explicitly stated otherwise, connect all GND and VCC pins from the modules to the GND and VCC lines of the breadboard.
Some of these are chosen arbitrarily, some are chosen because they require for example I2C pins. Since everything is Rust, feel free to move pins. The compiler will throw errors if you chose the wrong pins. Also see the pinout for a better overview of what possibilities there are.
Keep in mind I generally prefer to choose 5V lines over 3V ones.
Watch out: the pins don't align: STLv2:DGCV <-> STM32F1xx:GCDV
- DIO - ST-link SWDIO
- DCLK - ST-link SWCLK
- PB12 - Ch0 : shared with temperature probe
- PA15 - Row 0
- PB3 - Col 0
- PB4 - Col 1
- PB5 - Col 2 (TODO: this is a 3V line, change to a 5V one)
- PB7 - SDI matrix
- PB8 - CS matrix (TODO: consider using a different pin to free the PB8/PB9 I2C pair)
- PB6 - SCL matrix
- PB12 - DQ temp. probe