This project is a knob for controlling volume (or anything that a USB keyboard can). It uses a AS5601 sensor as an encoder. It was developed using Bluepill board.
You can download OpenSCAD designed models for 3D printing.
Dependencies:
The quickest way is to use just:
git clone https://git.sr.ht/~mronetwo/magknob
just setup_toolchain
make
bash flash.sh src/magknob.bin
The linker script is the src/memory.ld
which includes cortex-m-generic.ld
, from libopencm3.
The startup code lives in the libopencm3/lib/cm3/vector.c
. It also provides a structure that
provides the stack address and the handlers.
You can check the loaded objects in the src/mapfile
, example:
LOAD board.o
LOAD printf.o
LOAD main.o
LOAD as5601.o
LOAD profile_trace.o
LOAD ../libopencm3/lib/libopencm3_stm32f1.a
LOAD /home/mc/gits/magknob/toolchain/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libc_nano.a