蟹好きのメモ

情報系の学生が思ったことやログなんかを書いておきます.

【DZ60】ファームウェアをmakeできない

はじめに

タイトル通り,DZ60用のファームウェアをmakeしようとしてできない.

前回作ったキーボードですが,十字キーがないです.

これが結構不便なので,自作キーボードならではのレイヤー切り替えをできるようにキー設定をしたいと考えました.

レイヤーについては以下参照.

the-tanaka.com

でも作成ができずにハマったので,共有と知見のために書いておきます.

手順

大まかには以下の手順でファームウェアを作成してキーボードへ書き込みます.

  1. Git,msysを導入する
  2. qmk_farmwareを導入する
  3. ファームウェアをmakeする
  4. キーボードに書き込む

今回問題が発生したのは3の手順でした.

状況

QMKの環境を公式サイトの指示通り(上記の手順と同様)に設定し,make dz60:defaultを打ち込んだ際に以下の出力でうまく実行されず.

QMK Firmware 0.7.42
WARNING:
 Some git sub-modules are out of date or modified, please consider running:
 make git-submodule
 You can ignore this warning if you are not compiling any ChibiOS keyboards,
 or if you have modified the ChibiOS libraries yourself.

Making dz60 with keymap default

tmk_core/protocol/lufa.mk:14: lib/lufa/LUFA/makefile: No such file or directory
make[1]: *** ターゲット 'lib/lufa/LUFA/makefile' を make するルールがありません.  中止.
Make finished with errors
make: *** [Makefile:574: dz60:default] エラー 1

エラー文を読むと,「lufaがなんたら」って書いてある.

なので,lufaフォルダを見に行く.

lufaは手順通りでやってればC:\msys64\qmk_firmware\lib\lufaにある. 僕はユーザー以下のDocumentsディレクトリに作ったのでそこへいく.

見に行ってみると,lufaディレクトリの中に何もない.

こんな状態. f:id:r7cancer:20191021022517p:plain

git cloneしたのに!

何もないんじゃmakeするルールも何もないよなぁ.

対策

lufaだけGitHubからZIPでダウンロードして,解凍した中身をコピペしてあげる.

f:id:r7cancer:20191018152741j:plain

これをダウンロード.

解凍したら空だったqmk_firmware\lib\lufaにコピペしてあげる.

こうなっていれば大丈夫. f:id:r7cancer:20191021022601p:plain

実行結果

上記の対策だけ行ってからもう一度make dz60:defaultを打ってみる.

QMK Firmware 0.7.42
WARNING:
 Some git sub-modules are out of date or modified, please consider running:
 make git-submodule
 You can ignore this warning if you are not compiling any ChibiOS keyboards,
 or if you have modified the ChibiOS libraries yourself.

Making dz60 with keymap default

avr-gcc.exe (AVR_8_bit_GNU_Toolchain_3.6.1_1752) 5.4.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiling: keyboards/dz60/dz60.c                                                                    [OK]
Compiling: keyboards/dz60/keymaps/default/keymap.c                                                  [OK]
Compiling: quantum/quantum.c                                                                        [OK]
.
.
.

通った.