エンジニアとしての市場価値を測りませんか?PR

企業からあなたに合ったオリジナルのスカウトを受け取って、市場価値を測りましょう

0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

自作キーボード(遊舎工房 meishi2)備忘

Posted at

自作キーボードのファームウェア書き込みではまったことメモ

遊舎工房の自作キーボードmeishi2の書き込み方法が変更になっていたので寄稿

以下のキーボードにパスワードを割り当てて、パスワード一発入力に使っていたのだけれど、USB端子がもげたので再度はんだ付けしてファームを書き込もうとしたらうまくいかなかった。

20220319_204811.JPG

原因は、QMK Firmwareのkeyboards内部の変更

ダメなパターン

[h@machine qmk_firmware]$ make meishi2:default:avrdude
QMK Firmware 0.16.5
make: *** No rule to make target 'meishi2:default:avrdedu'. Stop.
|
| QMK's make format is:
|     make keyboard_folder:keymap_folder[:target]
|
| Where \`keyboard_folder\` is the path to the keyboard relative to
| \`qmk_firmware/keyboards/\`, and \`keymap_folder\` is the name of the
| keymap folder under that board's \`keymaps/\` directory.
|
| Examples:
|     keyboards/dz60, keyboards/dz60/keymaps/default
|       -> make dz60:default
|       -> qmk compile -kb dz60 -km default
|     keyboards/planck/rev6, keyboards/planck/keymaps/default
|       -> make planck/rev6:default:flash
|       -> qmk flash -kb planck/rev6 -km default
|

OKパターン

[h@machine qmk_firmware]$ make biacco42/meishi2:default:avrdude

サブモジュール不足によるエラー

[h@machine qmk_firmware]$ make biacco42/meishi2:default:avrdude
QMK Firmware 0.16.5
WARNING: Some git submodules are out of date or modified.
 Please consider running make git-submodule.

Making biacco42/meishi2 with keymap default and target avrdude

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

サブモジュール追加

[h@machine qmk_firmware]$ make git-submodule

パスワード入力ファームウェア書き込み

[h@machine qmk_firmware]$ make biacco42/meishi2:password:avrdude

※avrdudeがないとビルドだけされてインストールされなかった。

おまけ

QMK Firmwareのパスワード入力マクロのキーマップ記載例 - メモ?

/* Copyright 2019 Biacco42
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#include QMK_KEYBOARD_H

// 1.マクロ用のキーコード名宣言
enum custom_keycodes {
  M_BIOS = SAFE_RANGE, // BIOSパスワード入力用
  M_HDD, // HDDパスワード入力用
  M_PASS, // ログオンパスワード入力用
  M_VPN, // VPNパスワード入力用
};

// 2.マクロの実装
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
  if(record->event.pressed){
    switch(keycode){
      case M_BIOS:
        SEND_STRING("BIOSPASS" SS_TAP(X_ENTER));
        return false;
      case M_HDD:
        SEND_STRING("HDDPASS" SS_TAP(X_ENTER));
        return false;
      case M_PASS:
        SEND_STRING("password1" SS_TAP(X_KP_MINUX) SS_TAP(X_ENTER));
        return false;
      case M_VPN:
        SEND_STRING("password2" SS_TAP(X_KP_ASTERISK) SS_TAP(X_KP_ASTERISK) SS_TAP(X_ENTER));
        return false;
    }
  }
  return true;
};

// 3.キーマップに宣言したキーコードを指定
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  [0] = LAYOUT( /* Base */
    M_BIOS, M_HDD, M_PASS, M_VPN
  )
};
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?