geekhack
geekhack Community => Keyboards => Topic started by: BitLuder on Mon, 26 March 2018, 16:12:19
-
I have a KBDfans KBD66 keyboard, that I need to change the layout on (especially since I made it an ISO-board for danish layout).
I have edited keymap_default.c, and compiled everything with "make clean;make all".
Then flashed the keyboard with "sudo dfu-programmer atmega32u4 erase;sudo dfu-programmer atmega32u4 flash AMJFC660M_lufa.hex;dfu-programmer atmega32u4 start".
And even though I get no errors, and it does seem to flash the keyboard, it ends up with the same layout as it had originally.
And I really don't understand why...?!?
Can anyone help me troubleshoot this?
Here is my terminal output:
$ make all
-------- begin --------
...had to shorten because of character restrictions on posts...
Creating load file for Flash: AMJFC660M_lufa.hex
avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature AMJFC660M_lufa.elf AMJFC660M_lufa.hex
Creating load file for EEPROM: AMJFC660M_lufa.eep
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 --no-change-warnings -O ihex AMJFC660M_lufa.elf AMJFC660M_lufa.eep || exit 0
Creating Extended Listing: AMJFC660M_lufa.lss
avr-objdump -h -S -z AMJFC660M_lufa.elf > AMJFC660M_lufa.lss
Creating Symbol Table: AMJFC660M_lufa.sym
avr-nm -n AMJFC660M_lufa.elf > AMJFC660M_lufa.sym
Size after:
text data bss dec hex filename
17324 30 199 17553 4491 AMJFC660M_lufa.elf
-------- end --------
$ sudo dfu-programmer atmega32u4 erase
$ sudo dfu-programmer atmega32u4 flash AMJFC660M_lufa.hex
Validating...
17354 bytes used (60.53%)
$ sudo dfu-programmer atmega32u4 start
$
My keymap_default.c looks like this:
#include "keymap_common.h"
// Default
#ifdef KEYMAP_SECTION_ENABLE
const uint8_t keymaps[KEYMAPS_COUNT][MATRIX_ROWS][MATRIX_COLS] __attribute__ ((section (".keymap.keymaps"))) = {
#else
const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
#endif
/* Keymap 0: Default Layer
* ,----------------------------------------------------------. ,---.
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| +|Psc|Bs| |INS|
* |----------------------------------------------------------| |---|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |DEL|
* |----------------------------------------------------------| `---'
* |Caps | A| S| D| F| G| H| J| K| L| ;| '| Ent |
* |-------------------------------------------------------------.
* |Shift|Iso| Z| X| C| V| B| N| M| ,| .| /|Shift|Fn| UP|
* |-----------------------------------------------------------------.
* |Ctrl|Win |Alt | Space |Alt |Ctrl| Fn |LFT|DWN|RIG|
* `-----------------------------------------------------------------'
*/
KEYMAP(
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, PSCR, BSPC, INS,\
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, \
CAPS, A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT,\
LSFT, NUHS, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT,FN0, UP,\
LCTL,LGUI,LALT,NO, SPC, RALT,RCTL, FN0, LEFT, DOWN, RGHT),
/* Keymap 1: FN Layer
* ,----------------------------------------------------------. ,---.
* | `| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Pau| | |VoU|
* |----------------------------------------------------------| |---|
* | | |Up | | | | | | | | | | | | |VoD|
* |----------------------------------------------------------| `---'
* | |Lef|Dow|Rig| | | | | | | | | Mute |
* |-------------------------------------------------------------.
* | | | | | | | | | | | | | | |PgU|
* |-----------------------------------------------------------------.
* | | | | | | | |Hom|PgD|End|
* `-----------------------------------------------------------------'
*/
KEYMAP(
GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PAUS, TRNS, VOLU,\
TRNS,TRNS,UP, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, VOLD, \
TRNS,LEFT,DOWN,RGHT,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, MUTE, \
TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, PGUP, \
TRNS,TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,HOME,PGDN,END)
};
/*
* Fn action definition
*/
#ifdef KEYMAP_SECTION_ENABLE
const uint16_t fn_actions[FN_ACTIONS_COUNT] __attribute__ ((section (".keymap.fn_actions"))) = {
#else
const uint16_t fn_actions[] PROGMEM = {
#endif
[0] = ACTION_LAYER_MOMENTARY(1),
[1] = ACTION_BACKLIGHT_TOGGLE(),
[2] = ACTION_BACKLIGHT_STEP(),
};
#ifdef KEYMAP_IN_EEPROM_ENABLE
uint16_t keys_count(void) {
return sizeof(keymaps) / sizeof(keymaps[0]) * MATRIX_ROWS * MATRIX_COLS;
}
uint16_t fn_actions_count(void) {
return sizeof(fn_actions) / sizeof(fn_actions[0]);
}
#endif
/*
* Action macro definition
*/
enum macro_id {
KEYPAD_00 = 0,
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
switch (id) {
case KEYPAD_00:
return (record->event.pressed ?
MACRO( T(P0), T(P0), END ) :
MACRO_NONE );
}
return MACRO_NONE;
}
-
Can you post your config files? I suspect it builds ANSI as default and you need to add something for ISO.
I'm assuming your computer knows the keyboard is Danish so it's just the keys next to return and left shift that don't work?
-
Here is my config file.
And yes, mu computer knows that it is Danish. I just need the NUHS-key, and two extra keys that I split to work (the PCB supports split backspace).
/*
Copyright 2014 Kai Ryu <kai1103@gmail.com>
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/>.
*/
#ifndef CONFIG_H
#define CONFIG_H
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6076
#define DEVICE_VER 0x0001
#define MANUFACTURER Han Chen
#define PRODUCT AMJ66
#define DESCRIPTION t.m.k. keyboard firmware for AMJ66
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 16
/* keymap in eeprom */
#define FN_ACTIONS_COUNT 32
#define KEYMAPS_COUNT 8
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
/* number of backlight levels */
#ifdef BREATHING_LED_ENABLE
#ifdef FADING_LED_ENABLE
#define BACKLIGHT_LEVELS 8
#else
#define BACKLIGHT_LEVELS 6
#endif
#else
#define BACKLIGHT_LEVELS 3
#endif
#define BACKLIGHT_CUSTOM
/* number of leds */
#define LED_COUNT 2
#define EECONFIG_LEDMAP_IN_EEPROM 8
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
//#define NO_DEBUG
/* disable print */
//#define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
#endif
-
Ok, I managed to find that QMK did have support for my keyboard, and that was a lot easier to get working. :)