ergodox
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédenteProchaine révisionLes deux révisions suivantes | ||
ergodox [2019/04/10 18:59] – [Configurer le layout] simon | ergodox [2020/11/30 09:35] – simon | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
====== Ergodox ====== | ====== Ergodox ====== | ||
+ | {{tag> | ||
+ | |||
+ | ===== Introduction ===== | ||
+ | |||
+ | Ça fait longtemps que j'ai le projet de me fabriquer et d' | ||
+ | |||
+ | Après avoir rêvé de tout reprendre de A à Z, de fabriquer le boitier en fibre de carbone et redessiner la carte électronique, | ||
+ | |||
{{ : | {{ : | ||
- | (D' | + | (D' |
- | ===== Flasher | + | ===== Programmer |
- | J'ai tout d' | + | |
- | Pour mémoire: | + | ==== Installation de QMK ==== |
- | < | + | |
+ | Après avoir testé le [[https:// | ||
<code bash> | <code bash> | ||
- | simon@deb: | + | $ python3 |
</ | </ | ||
- | < | + | |
+ | J'ai copié [[https:// | ||
<code bash> | <code bash> | ||
- | Clonage dans ' | + | $ sudo vim / |
- | remote: Enumerating objects: 1, done. | + | $ sudo udevadm control |
- | remote: Counting objects: 100% (1/1), done. | + | $ sudo udevadm trigger |
- | remote: Total 17079 (delta 0), reused 0 (delta 0), pack-reused 17078 | + | |
- | Réception d' | + | |
- | Résolution des deltas: 100% (10038/ | + | |
</ | </ | ||
- | </ | + | |
+ | J'ai fait la configuration comme indiqué : | ||
<code bash> | <code bash> | ||
- | simon@deb: | + | $ qmk setup |
- | simon@deb: | + | |
</ | </ | ||
- | < | + | Il installe toutes les dépendances, |
- | <code bash> | + | |
- | simon@deb: | + | |
- | -------- begin -------- | + | ==== Créer une " |
- | avr-gcc (GCC) 5.4.0 | + | |
- | Copyright (C) 2015 Free Software Foundation, Inc. | + | |
- | This is free software; see the source for copying conditions. | + | |
- | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | + | |
- | (...) | + | J'ai créé une nouvelle keymap dans le dossier de l' |
+ | <code bash> | ||
+ | $ qmk new-keymap -kb ergodox_ez | ||
+ | Keymap Name: my-ergodox | ||
+ | Ψ my-ergodox keymap directory created in: / | ||
+ | Ψ Compile a firmware with your new keymap by typing: | ||
+ | qmk compile -kb ergodox_ez -km my-ergodox | ||
+ | </ | ||
- | Creating load file for Flash: ergodox_lufa.hex | + | On peut modifier cette keymap |
- | avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature ergodox_lufa.elf ergodox_lufa.hex | + | <code bash> |
+ | $ vim ~/ | ||
+ | </ | ||
- | Creating load file for EEPROM: ergodox_lufa.eep | + | Ensuite, on peut la compiler |
- | avr-objcopy -j .eeprom --set-section-flags=.eeprom=" | + | |
- | --change-section-lma .eeprom=0 --no-change-warnings -O ihex ergodox_lufa.elf ergodox_lufa.eep || exit 0 | + | |
- | + | ||
- | Creating Extended Listing: ergodox_lufa.lss | + | |
- | avr-objdump -h -S -z ergodox_lufa.elf > ergodox_lufa.lss | + | |
- | + | ||
- | Creating Symbol Table: ergodox_lufa.sym | + | |
- | avr-nm -n ergodox_lufa.elf > ergodox_lufa.sym | + | |
- | + | ||
- | Size after: | + | |
- | | + | |
- | 23404 | + | |
- | </ | + | |
- | </ | + | |
- | Vérification du MCU (voir [[https:// | + | |
<code bash> | <code bash> | ||
- | simon@deb: | + | $ qmk compile -kb ergodox_ez -km my-ergodox |
- | # MCU name, you MUST set this to match the board you are using | + | |
- | MCU = atmega32u4 | + | |
- | #MCU = at90usb1286 | + | |
</ | </ | ||
- | {{ :: | + | ==== Envoyer la configuration |
- | {{ :: | + | |
- | {{ :: | + | |
- | </ | + | |
- | + | ||
- | Ensuite, j'ai essayé avec le firmware [[https:// | + | |
+ | Enfin, on peut l' | ||
<code bash> | <code bash> | ||
- | simon@deb:~/git$ git clone https://github.com/qmk/ | + | $ teensy_loader_cli --mcu=atmega32u4 -v -w ~/qmk_firmware/.build/ergodox_ez_my-ergodox.hex |
+ | </code> | ||
- | simon@deb:~/git$ cd qmk_firmware/ | + | **__État des lieux le 18/10/2020 :__** Toutes les touches fonctionnes mais je n'ai pas encore modifié la keymap créée par défaut... Il faut que j' |
- | simon@deb:~/git/qmk_firmware$ ls | + | **__État des lieux le 19/10/2020 :__** J' |
- | autocomplete.sh | + | |
- | book.json | + | |
- | bootloader.mk | + | |
- | build_full_test.mk | + | |
- | build_keyboard.mk | + | |
- | build_layout.mk | + | |
- | build_test.mk | + | |
- | CODE_OF_CONDUCT.md | + | |
- | common_features.mk | + | |
- | simon@deb:~/git/qmk_firmware$ ls -al keyboards/ | + | **__État des lieux le 30/11/2020 :__** J' |
- | total 980 | + | < |
- | (...) | + | #include QMK_KEYBOARD_H |
- | drwxr-xr-x | + | #include " |
- | drwxr-xr-x | + | |
- | drwxr-xr-x | + | |
- | (...) | + | |
- | simon@deb:~/git/qmk_firmware$ ls -al keyboards/ergodox_ez/ | + | enum layers { |
- | total 84 | + | BASE, // default layer |
- | drwxr-xr-x | + | SYMB, // symbols |
- | drwxr-xr-x 243 simon simon 4096 avr 10 19:49 .. | + | MDIA, // media keys |
- | -rw-r--r-- | + | }; |
- | -rw-r--r-- | + | |
- | -rw-r--r-- | + | |
- | -rw-r--r-- | + | |
- | -rw-r--r-- | + | |
- | drwxr-xr-x | + | |
- | -rw-r--r-- | + | |
- | -rw-r--r-- | + | |
- | -rw-r--r-- | + | |
- | drwxr-xr-x | + | |
- | simon@deb: | + | enum custom_keycodes { |
- | total 96 | + | #ifdef ORYX_CONFIGURATOR |
- | (...) | + | |
- | drwxr-xr-x | + | #else |
- | drwxr-xr-x | + | |
- | drwxr-xr-x | + | #endif |
- | (...) | + | |
+ | }; | ||
- | simon@deb:~/git/qmk_firmware$ make git-submodule | + | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
+ | /* Keymap 0: Basic layer | ||
+ | * | ||
+ | * , | ||
+ | * | µ | | ||
+ | * |--------+------+------+------+------+-------------| | ||
+ | * | Tab | | ||
+ | * |--------+------+------+------+------+------| | ||
+ | * | CapsLk | | ||
+ | * |--------+------+------+------+------+------| | ||
+ | * | LShift |</Ctrl| | ||
+ | * `--------+------+------+------+------+-------------' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | */ | ||
+ | [BASE] = LAYOUT_ergodox_pretty( | ||
+ | KC_BSLS, | ||
+ | KC_TAB, | ||
+ | KC_CAPS, | ||
+ | KC_LSFT, | ||
+ | DF(SYMB), | ||
+ | | ||
+ | KC_LALT, | ||
+ | | ||
+ | ), /*note: KC_GRAVE ? */ | ||
+ | /* Keymap 1: Symbol Layer | ||
+ | * | ||
+ | * , | ||
+ | * | | ||
+ | * |---------+------+------+------+------+------+------| | ||
+ | * | | ||
+ | * |---------+------+------+------+------+------| | ||
+ | * | | ||
+ | * |---------+------+------+------+------+------| | ||
+ | * | | ||
+ | * `---------+------+------+------+------+-------------' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | */ | ||
+ | [SYMB] = LAYOUT_ergodox_pretty( | ||
+ | KC_NO, | ||
+ | KC_TRNS, KC_EXLM, KC_AT, | ||
+ | KC_TRNS, KC_HASH, KC_DLR, | ||
+ | KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_NO, | ||
+ | DF(BASE), | ||
- | simon@deb: | + | |
- | QMK Firmware 0.6.328 | + | |
- | Making ergodox_ez with keymap bepo_tm_style and target all | + | KC_SPC, KC_BSPC, KC_LGUI, |
- | avr-gcc (GCC) 5.4.0 | + | ), |
- | Copyright (C) 2015 Free Software Foundation, Inc. | + | /* Keymap 2: Media and mouse keys |
- | This is free software; see the source for copying conditions. | + | * |
- | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | + | * , |
+ | * | | | | | | | | | Mute | | | | | | | | ||
+ | * |--------+------+------+------+------+-------------| | ||
+ | * | | | Lclk | MsUp | Rclk | | | | Vol+ | | Lclk | MsUp | Rclk | | Prev | | ||
+ | * |--------+------+------+------+------+------| | ||
+ | * | | |MsLeft|MsDown|MsRght| | ||
+ | * |--------+------+------+------+------+------| | ||
+ | * | | | | | | | | | ||
+ | * `--------+------+------+------+------+-------------' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | * , | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | */ | ||
+ | [MDIA] = LAYOUT_ergodox_pretty( | ||
+ | KC_NO, | ||
+ | KC_NO, | ||
+ | KC_NO, | ||
+ | KC_NO, | ||
+ | DF(BASE), | ||
- | Size before: | + | |
- | text data | + | |
- | | + | |
+ | ), | ||
+ | }; | ||
- | Compiling: tmk_core/ | + | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
- | Linking: | + | if (record-> |
- | Creating load file for flashing: .build/ergodox_ez_bepo_tm_style.hex | + | switch (keycode) { |
- | Copying ergodox_ez_bepo_tm_style.hex to qmk_firmware folder | + | case VRSN: |
- | Checking file size of ergodox_ez_bepo_tm_style.hex | + | SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); |
- | * The firmware size is fine - 30658/ | + | |
- | </ | + | # |
+ | case RGB_SLD: | ||
+ | rgblight_mode(1); | ||
+ | | ||
+ | #endif | ||
+ | } | ||
+ | } | ||
+ | return true; | ||
+ | } | ||
- | Le firmware ( ergodox_ez_bepo_tm_style.hex ) est dans le dossier courant. On peut l' | + | // Runs just one time when the keyboard initializes. |
- | <code bash> | + | void keyboard_post_init_user(void) { |
- | simon@deb:~/git/qmk_firmware$ teensy_loader_cli --mcu=atmega32u4 -v -w ergodox_ez_bepo_tm_style.hex | + | #ifdef RGBLIGHT_COLOR_LAYER_0 |
- | Teensy Loader, Command Line, Version 2.1 | + | |
- | Read " | + | #endif |
- | Waiting for Teensy device... | + | }; |
- | (hint: press the reset button) | + | |
- | Found HalfKay Bootloader | + | |
- | Read " | + | |
- | Programming................................................................................................................................................................................................................................................ | + | |
- | Booting | + | |
- | </ | + | |
- | Maintenant qu' | + | // Runs whenever there is a layer state change. |
+ | layer_state_t layer_state_set_user(layer_state_t state) { | ||
+ | ergodox_board_led_off(); | ||
+ | ergodox_right_led_1_off(); | ||
+ | ergodox_right_led_2_off(); | ||
+ | ergodox_right_led_3_off(); | ||
- | ===== Configurer le layout ===== | + | uint8_t layer = get_highest_layer(state); |
- | On commence par faire une copie du layout bepo pour l' | + | |
- | <code bash> | + | case 0: |
- | simon@deb:~/ | + | # |
+ | | ||
+ | #endif | ||
+ | break; | ||
+ | case 1: | ||
+ | ergodox_right_led_1_on(); | ||
+ | #ifdef RGBLIGHT_COLOR_LAYER_1 | ||
+ | rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1); | ||
+ | #endif | ||
+ | break; | ||
+ | case 2: | ||
+ | ergodox_right_led_2_on(); | ||
+ | #ifdef RGBLIGHT_COLOR_LAYER_2 | ||
+ | rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2); | ||
+ | #endif | ||
+ | break; | ||
+ | case 3: | ||
+ | ergodox_right_led_3_on(); | ||
+ | #ifdef RGBLIGHT_COLOR_LAYER_3 | ||
+ | rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3); | ||
+ | #endif | ||
+ | break; | ||
+ | case 4: | ||
+ | ergodox_right_led_1_on(); | ||
+ | ergodox_right_led_2_on(); | ||
+ | #ifdef RGBLIGHT_COLOR_LAYER_4 | ||
+ | rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4); | ||
+ | #endif | ||
+ | break; | ||
+ | case 5: | ||
+ | ergodox_right_led_1_on(); | ||
+ | ergodox_right_led_3_on(); | ||
+ | #ifdef RGBLIGHT_COLOR_LAYER_5 | ||
+ | rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5); | ||
+ | #endif | ||
+ | break; | ||
+ | case 6: | ||
+ | ergodox_right_led_2_on(); | ||
+ | ergodox_right_led_3_on(); | ||
+ | #ifdef RGBLIGHT_COLOR_LAYER_6 | ||
+ | rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6); | ||
+ | #endif | ||
+ | break; | ||
+ | case 7: | ||
+ | ergodox_right_led_1_on(); | ||
+ | ergodox_right_led_2_on(); | ||
+ | ergodox_right_led_3_on(); | ||
+ | #ifdef RGBLIGHT_COLOR_LAYER_7 | ||
+ | rgblight_setrgb(RGBLIGHT_COLOR_LAYER_7); | ||
+ | #endif | ||
+ | break; | ||
+ | default: | ||
+ | break; | ||
+ | } | ||
- | simon@deb: | + | |
- | total 32 | + | }; |
- | drwxr-xr-x | + | </hidden> |
- | drwxr-xr-x 25 simon simon 4096 avr 10 20:10 .. | + | |
- | -rwxr-xr-x | + | |
- | -rwxr-xr-x | + | |
- | -rwxr-xr-x | + | |
- | -rwxr-xr-x | + | |
- | </code> | + | |
+ | ===== Sources ===== | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// |
ergodox.txt · Dernière modification : 2021/02/08 21:31 de simon