build: wire qmk.json build target and justfile recipes
This commit is contained in:
8
.clangd
Normal file
8
.clangd
Normal file
@@ -0,0 +1,8 @@
|
||||
CompileFlags:
|
||||
Remove:
|
||||
- -mno-thumb-interwork
|
||||
- -mthumb-interwork
|
||||
|
||||
Diagnostics:
|
||||
UnusedIncludes: None
|
||||
MissingIncludes: None
|
||||
16
justfile
16
justfile
@@ -2,6 +2,22 @@
|
||||
default:
|
||||
@just --list
|
||||
|
||||
# compile moonlander matej keymap (artifact lands in firmware/)
|
||||
moonlander:
|
||||
make -C qmk_upstream zsa/moonlander:matej QMK_USERSPACE={{justfile_directory()}}
|
||||
mkdir -p firmware
|
||||
mv -f zsa_moonlander_matej.bin firmware/
|
||||
rm -f qmk_upstream/zsa_moonlander_matej.bin
|
||||
|
||||
# compile + flash moonlander (polls until keyboard is in DFU mode; -d filter avoids the Cambridge DAC VID:PID collision)
|
||||
flash-moonlander: moonlander
|
||||
until dfu-util -a 0 -d 0483:df11 -s 0x08000000:leave -D firmware/zsa_moonlander_matej.bin >/dev/null 2>&1; do sleep 0.5; done
|
||||
@echo "flashed"
|
||||
|
||||
# generate compile_commands.json for clangd / LSP
|
||||
compdb:
|
||||
cd qmk_upstream && QMK_USERSPACE={{justfile_directory()}} qmk compile --compiledb -kb zsa/moonlander -km matej
|
||||
|
||||
# format C/H files in place
|
||||
fmt:
|
||||
git ls-files '*.c' '*.h' | xargs --no-run-if-empty clang-format -i
|
||||
|
||||
Reference in New Issue
Block a user