LoginSignup
3
3

More than 3 years have passed since last update.

QMK Firmwareビルド環境構築

Last updated at Posted at 2020-06-22

この記事は自作キーボード Helixを組み立ててみたの補足用に書いた記事です。

環境

  • MacOS Catalina 10.15.5

TLDR

QMKのビルド環境を整えるのに必要だったコマンドは以下です。

# xcrunインストール
xcode-select --install

# QMKビルドツールのインストール
git clone --recrusive https://github.com/qmk/qmk_firmware.git
cd qmk_firmware/
util/qmk_install.sh


led_testをビルドするまでに出たエラーと対処

qmk_firmwareをcloneしてled_testをmakeしてみます。

git clone https://github.com/qmk/qmk_firmware.git
cd qmk_firmware/
make helix:led_test

makeしようとすると次のエラーがでました。

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

xcrunをインストールするために次のコマンドを実行して、再度makeします。

xcode-select --install

今度は次のエラーが出ました。LUFAのmakefileがないそうです。

tmk_core/protocol/lufa.mk:14: lib/lufa/LUFA/makefile: No such file or directory
/bin/sh: avr-gcc: command not found
make[1]: *** No rule to make target `lib/lufa/LUFA/makefile'. Stop.
make: *** [helix:led_test] Error 1

調べてみると【DZ60】ファームウェアをmakeできない にLUFAは別途Cloneしないといけないとありました。

cd qmk_firmware/lib
git/ clone https://github.com/qmk/lufa.git
cd ../

libf配下に移動してlufaをcloneして、またqmk_firmware配下に移動して再度makesします。

mba:qmk_firmware msrx9$ make helix:led_test
QMK Firmware 0.9.19
WARNING:
Can not run bin/qmk! This tool will be required when the develop branch is merged on 2020 Aug 29.

Please run util/qmk_install.sh to install all the dependencies QMK requires.

WARNING: Some git submodules are out of date or modified.
Please consider running make git-submodule.

Making helix/rev2 with keymap led_test

/bin/sh: avr-gcc: command not found
sh: avr-gcc: command not found
sh: avr-gcc: command not found
make[1]: *** [.build/obj_helix_rev2_led_test/compiler.txt] Error 127
make: *** [helix:led_test] Error 1
Make finished with errors

次はavr-gccがないと怒られました。よく読むと Please run util/qmk_install.sh to install all the dependencies QMK requires. とありますね。QMK用のビルドツールをインストールしましょう。

util/qmk_install.sh

再度makeします。
無事makeが完了して、FWが生成されました。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3