How to build your very own keyboard firmware

Antaliess

08 Sep 2018, 04:28

I do not use Atmel's MCU to design my keyboard,I use the STC15W4K32S MCU.So,can I use the QMK firmware?How should I alter it?My programme's ability is very very bad.Who can help me?The STC15W4K32S is 89C51 series's MCU.

User avatar
Quartz64

11 Sep 2018, 16:17

Antaliess wrote: So, can I use the QMK firmware? How should I alter it?My programme's ability is very very bad. Who can help me? The STC15W4K32S is 89C51 series's MCU.
TMK and QMK support AVR MCUs and some ARM MCUs via ChibiOS.
I can't find any specs of STC15W4K32S, but you say that it is compatible with Atmel 89C51. It's a different architecture (Intel 8051) and it has only 4KB of internal flash which makes it impossible to port QMK on it even if you have the required exprerience.

User avatar
scottc

11 Sep 2018, 23:44

Location: China
Main keyboard: xd75,amj60,cospad,xd96,staryu

Are you from kprepublic? :lol:

DettolGlen20

23 Sep 2018, 09:12

Hi, can some help with the layering. The file compiles if I don't put anything in the PROGMEM fn_actions function. But if I try to add some layer action. I get the same 4 errors on each line

warning: (near initialization for 'fn_action[0]')
error: field name not in record or union initializer
error:(near initialization for 'fn_action[0]')
warning: braces around scalar initializer

I don't know if anything is wrong with the code inside the function, because I pretty much just copy pasted it.
{
[0] = ACTION_LAYER_TOGGLE(0),
[1] = ACTION_LAYER_TOGGLE(1),
[2] = ACTION_LAYER_TOGGLE(2)
};

scorpion

29 Nov 2018, 04:48

hi, I need help to solve this error
Attachments
Captura de pantalla (15).png
Captura de pantalla (15).png (257.36 KiB) Viewed 625 times

Slom

29 Nov 2018, 06:44

scorpion wrote: hi, I need help to solve this error
maybe this has some information: https://github.com/tmk/tmk_keyboard/issues/378

fuuifu

03 Dec 2018, 11:51

Okay, so I've been working on the code for a numpad project I've been doing for a while now and I finished. I've compiled everything and ran the firmware properly. My only issue that it seems like my code is either totally incorrect or I did my wiring improperly. Only the key I assigned as PAUS works and it writes the whole row that is above it. I'm a total newbie and this is the first time I do anything related to coding so expect a lot of dumb mistakes. UPDATE So I've fixed an issue that I had in the matrix coding and now I'm sure it's all correct. My issue is, the same key I mentioned earlier functions and nothing else does. I think my issue is wiring, does anyone else think the same?
Spoiler:

Code: Select all

/*
Copyright 2012 Jun Wako <wakojun@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      0x6060
#define DEVICE_VER      0x0001
#define MANUFACTURER    geekhack
#define PRODUCT         GH60
#define DESCRIPTION     t.m.k. keyboard firmware for GH60

/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 4

/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST

/* Set 0 if debouncing isn't needed */
#define DEBOUNCE    5

/* 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
Spoiler:

Code: Select all

/*
Copyright 2012 Jun Wako <wakojun@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/>.
*/

/*
 * scan matrix
 */
#include <stdint.h>
#include <stdbool.h>
#include <avr/io.h>
#include <util/delay.h>
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"


#ifndef DEBOUNCE
#   define DEBOUNCE	5
#endif
static uint8_t debouncing = DEBOUNCE;

/* matrix state(1:on, 0:off) */
static matrix_row_t matrix[MATRIX_ROWS];
static matrix_row_t matrix_debouncing[MATRIX_ROWS];

static matrix_row_t read_cols(void);
static void init_cols(void);
static void unselect_rows(void);
static void select_row(uint8_t row);


void matrix_init(void)
{
    // initialize row and col
    unselect_rows();
    init_cols();

    // initialize matrix state: all keys off
    for (uint8_t i=0; i < MATRIX_ROWS; i++) {
        matrix[i] = 0;
        matrix_debouncing[i] = 0;
    }
}

uint8_t matrix_scan(void)
{
    for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
        select_row(i);
        _delay_us(30);  // without this wait read unstable value.
        matrix_row_t cols = read_cols();
        if (matrix_debouncing[i] != cols) {
            matrix_debouncing[i] = cols;
            if (debouncing) {
                debug("bounce!: "); debug_hex(debouncing); debug("\n");
            }
            debouncing = DEBOUNCE;
        }
        unselect_rows();
    }

    if (debouncing) {
        if (--debouncing) {
            _delay_ms(1);
        } else {
            for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
                matrix[i] = matrix_debouncing[i];
            }
        }
    }

    return 1;
}

inline
matrix_row_t matrix_get_row(uint8_t row)
{
    return matrix[row];
}

/* Column pin configuration
 * col: 0   1   2   3   4   5   6   7   8   9   10  11  12  13
 * pin: F0  F1  E6  C7  C6  B6  D4  B1  B0  B5  B4  D7  D6  B3  (Rev.A)
 * pin:                                 B7                      (Rev.B)
 */
static void  init_cols(void)
{
    // Input with pull-up(DDR:0, PORT:1)
    DDRF  &= ~(1<<0 | 1<<4 | 1<<5 | 1<<6);
    PORTF |=  (1<<0 | 1<<4 | 1<<5 | 1<<6);

}

static matrix_row_t read_cols(void)
{
    return (PINF&(1<<0) ? 0 : (1<<0)) |
           (PINF&(1<<4) ? 0 : (1<<1)) |
           (PINF&(1<<5) ? 0 : (1<<2)) |
           (PINF&(1<<6) ? 0 : (1<<3));
}

/* Row pin configuration
 * row: 0   1   2   3   4
 * pin: D0  D1  D2  D3  D5
 */
static void unselect_rows(void)
{
    // Hi-Z(DDR:0, PORT:0) to unselect
    DDRB  &= ~0b01001111;
    PORTB &= ~0b01001111;
}

static void select_row(uint8_t row)
{
    // Output low(DDR:1, PORT:0) to select
    switch (row) {
        case 0:
            DDRB  |= (1<<7);
            PORTB &= ~(1<<7);
            break;
        case 1:
            DDRB  |= (1<<3);
            PORTB &= ~(1<<3);
            break;
        case 2:
            DDRB  |= (1<<2);
            PORTB &= ~(1<<2);
            break;
        case 3:
            DDRB  |= (1<<1);
            PORTB &= ~(1<<1);
            break;
        case 4:
            DDRB  |= (1<<0);
            PORTB &= ~(1<<0);
            break;
    }
}
Spoiler:

Code: Select all

#include "keymap_common.h"

const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
	KEYMAP(ESC, SLSH, BSPC, MINS, \
		   7, 8, 9, PAUS, \
		   4, 5, 6, \
		   1, 2, 3, ENTER, \
		   0, DOT),
};
const action_t PROGMEM fn_actions[] = {
           };
Spoiler:

Code: Select all

/*
Copyright 2012,2013 Jun Wako <wakojun@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 KEYMAP_COMMON_H
#define KEYMAP_COMMON_H

#include <stdint.h>
#include <stdbool.h>
#include "keycode.h"
#include "action.h"
#include "action_macro.h"
#include "report.h"
#include "host.h"
#include "print.h"
#include "debug.h"
#include "keymap.h"


/* GH60 keymap definition macro
 * K2C, K31 and  K3C are extra keys for ISO
 */
#define KEYMAP( \
    K00, K01, K02, K03, \
    K10, K11, K12, K13, \
    K20, K21, K22, \
    K30, K31, K32, K33, \
    K41, K42 \
) { \
    { KC_##K00, KC_##K01, KC_##K02, KC_##K03 }, \
    { KC_##K10, KC_##K11, KC_##K12, KC_##K13 }, \
    { KC_##K20, KC_##K21, KC_##K22, KC_NO }, \
    { KC_##K30, KC_##K31, KC_##K32, KC_##K33 }, \
    { KC_NO, KC_##K41, KC_##K42, KC_NO }  \
}

/* ANSI variant. No extra keys for ISO */
#define KEYMAP_ANSI( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B,      K2D, \
    K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B,           K3D, \
    K40, K41, K42,           K45,                     K4A, K4B, K4C, K4D  \
) KEYMAP( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO,  K2D, \
    K30, NO,  K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, NO,  K3D, \
    K40, K41, K42,           K45,                NO,  K4A, K4B, K4C, K4D  \
)


#define KEYMAP_HHKB( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49,\
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B,      K2D, \
    K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B,      K3D, K3C, \
    K40, K41, K42,           K45,                     K4A, K4B, K4C, K4D  \
) KEYMAP( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO,  K2D, \
    K30, NO,  K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
    K40, K41, K42,           K45,                K49, K4A, K4B, K4C, K4D  \
)

#endif

fuuifu

03 Dec 2018, 16:57

Took me a while to figure out, BUT I DID IT! I noticed I had my diodes flipped, so I flipped them back. My code was totally fine haha.

trey1901

12 Jan 2019, 03:03

Was wondering if i could get some help trying to compile getting this error message
Spoiler:

Code: Select all

mkdir -p obj_gh60_lufa
Compiling C: keymap_poker.c
avr-gcc -c -mmcu=at90usb1287 -gdwarf-2 -DF_CPU=16000000UL -DINTERRUPT_CONTROL_ENDPOINT -DBOOTLOADER_SIZE=4096 -DF_USB=16000000UL -DARCH=ARCH_AVR8 -DUSB_DEVICE_ONLY -DUSE_FLASH_DESCRIPTORS -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -DFIXED_CONTROL_ENDPOINT_SIZE=8  -DFIXED_NUM_CONFIGURATIONS=1 -DPROTOCOL_LUFA -DBOOTMAGIC_ENABLE -DMOUSEKEY_ENABLE -DMOUSE_ENABLE -DEXTRAKEY_ENABLE -DCONSOLE_ENABLE -DCOMMAND_ENABLE -DVERSION=preonic-1.0-7068-g9c2d77612-dirty -Os -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections -fno-inline-small-functions -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=obj_gh60_lufa/keymap_poker.lst -I. -I../../tmk_core -I../../tmk_core/protocol/lufa -I../../tmk_core/protocol/lufa/LUFA-git -I../../tmk_core/common -std=gnu99 -include config.h -MMD -MP -MF .dep/obj_gh60_lufa_keymap_poker.o.d  keymap_poker.c -o obj_gh60_lufa/keymap_poker.o
In file included from keymap_poker.c:1:0:
keymap_common.h:41:1: error: parameter name missing
 ) { \
 ^
keymap_poker.c:5:5: warning: implicit declaration of function 'KEYMAP' [-Wimplicit-function-declaration]
     KEYMAP(ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,  \
     ^
keymap_poker.c:5:12: error: 'ESC' undeclared here (not in a function)
     KEYMAP(ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,  \
            ^
keymap_poker.c:5:67: error: 'MINS' undeclared here (not in a function)
     KEYMAP(ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,  \
                                                                   ^
keymap_poker.c:5:72: error: 'EQL' undeclared here (not in a function)
     KEYMAP(ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,  \
                                                                        ^
keymap_poker.c:5:77: error: 'BSPC' undeclared here (not in a function)
     KEYMAP(ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,  \
                                                                             ^
keymap_poker.c:5:84: warning: backslash and newline separated by space
     KEYMAP(ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,  \
                                                                                    ^
keymap_poker.c:6:9: error: 'TAB' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
         ^
keymap_poker.c:6:14: error: 'Q' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
              ^
keymap_poker.c:6:19: error: 'W' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
                   ^
keymap_poker.c:6:24: error: 'E' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
                        ^
keymap_poker.c:6:29: error: 'R' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
                             ^
keymap_poker.c:6:34: error: 'T' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
                                  ^
keymap_poker.c:6:39: error: 'Y' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
                                       ^
keymap_poker.c:6:44: error: 'U' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
                                            ^
keymap_poker.c:6:49: error: 'I' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
                                                 ^
keymap_poker.c:6:54: error: 'O' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
                                                      ^
keymap_poker.c:6:59: error: 'P' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
                                                           ^
keymap_poker.c:6:64: error: 'LBRC' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
                                                                ^
keymap_poker.c:6:69: error: 'RBRC' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
                                                                     ^
keymap_poker.c:6:74: error: 'BSLS' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
                                                                          ^
keymap_poker.c:7:9: error: 'CAPS' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
         ^
keymap_poker.c:7:14: error: 'A' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
              ^
keymap_poker.c:7:19: error: 'S' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
                   ^
keymap_poker.c:7:24: error: 'D' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
                        ^
keymap_poker.c:7:29: error: 'F' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
                             ^
keymap_poker.c:7:34: error: 'G' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
                                  ^
keymap_poker.c:7:39: error: 'H' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
                                       ^
keymap_poker.c:7:44: error: 'J' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
                                            ^
keymap_poker.c:7:49: error: 'K' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
                                                 ^
keymap_poker.c:7:54: error: 'L' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
                                                      ^
keymap_poker.c:7:59: error: 'SCLN' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
                                                           ^
keymap_poker.c:7:64: error: 'QUOT' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
                                                                ^
keymap_poker.c:7:74: error: 'ENT' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
                                                                          ^
keymap_poker.c:8:9: error: 'LSFT' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
         ^
keymap_poker.c:8:14: error: 'Z' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
              ^
keymap_poker.c:8:19: error: 'X' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
                   ^
keymap_poker.c:8:24: error: 'C' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
                        ^
keymap_poker.c:8:29: error: 'V' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
                             ^
keymap_poker.c:8:34: error: 'B' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
                                  ^
keymap_poker.c:8:39: error: 'N' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
                                       ^
keymap_poker.c:8:44: error: 'M' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
                                            ^
keymap_poker.c:8:49: error: 'COMM' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
                                                 ^
keymap_poker.c:8:54: error: 'DOT' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
                                                      ^
keymap_poker.c:8:59: error: 'SLSH' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
                                                           ^
keymap_poker.c:8:74: error: 'RSFT' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
                                                                          ^
keymap_poker.c:8:79: error: 'UP' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
                                                                               ^
keymap_poker.c:9:9: error: 'LCTL' undeclared here (not in a function)
         LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT\
         ^
keymap_poker.c:9:14: error: 'LGUI' undeclared here (not in a function)
         LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT\
              ^
keymap_poker.c:9:19: error: 'LALT' undeclared here (not in a function)
         LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT\
                   ^
keymap_poker.c:9:34: error: 'SPC' undeclared here (not in a function)
         LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT\
                                  ^
keymap_poker.c:9:59: error: 'RALT' undeclared here (not in a function)
         LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT\
                                                           ^
keymap_poker.c:9:64: error: 'RCTL' undeclared here (not in a function)
         LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT\
                                                                ^
keymap_poker.c:9:69: error: 'GRV' undeclared here (not in a function)
         LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT\
                                                                     ^
keymap_poker.c:9:74: error: 'LEFT' undeclared here (not in a function)
         LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT\
                                                                          ^
keymap_poker.c:9:79: error: 'DOWN' undeclared here (not in a function)
         LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT\
                                                                               ^
keymap_poker.c:9:84: error: 'RGHT' undeclared here (not in a function)
         LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT\
                                                                                    ^
keymap_poker.c:10:1: error: expected ')' before '}' token
 };
 ^
make: *** [../../tmk_core/rules.mk:557: obj_gh60_lufa/keymap_poker.o] Error 1

};
Keymap_poker.c
Spoiler:

Code: Select all

#include "keymap_common.h"

const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    /* 0: qwerty */
    KEYMAP(ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,  \   
        TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
        CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
        LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
        LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT\
};

const uint16_t PROGMEM fn_actions[] = {
Keymap_common file
Spoiler:

Code: Select all

#ifndef KEYMAP_COMMON_H
#define KEYMAP_COMMON_H

#include <stdint.h>
#include <stdbool.h>
#include "keycode.h"
#include "action.h"
#include "action_macro.h"
#include "report.h"
#include "host.h"
#include "print.h"
#include "debug.h"
#include "keymap.h"


/* GH60 keymap definition macro
 * K2C, K31 and  K3C are extra keys for ISO
 */
#define KEYMAP( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
    K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D,\
    K40, K41, K42,      K44,                     K49, K4A, K4B, K4C, K4D, K4E,  \
) { \
    { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D }, \
    { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D }, \
    { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C }, \
    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D }, \
    { KC_##K40, KC_##K41, KC_##K42, KC_NO,    KC_##K44,    KC_NO, KC_NO,    KC_NO,    KC_NO,    KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E }  \
}

/* ANSI variant. No extra keys for ISO */
#define KEYMAP_ANSI( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B,      K2D, \
    K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B,           K3D, \
    K40, K41, K42,           K45,                     K4A, K4B, K4C, K4D  \
) KEYMAP( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO,  K2D, \
    K30, NO,  K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, NO,  K3D, \
    K40, K41, K42,           K45,                NO,  K4A, K4B, K4C, K4D  \
)


#define KEYMAP_HHKB( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49,\
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B,      K2D, \
    K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B,      K3D, K3C, \
    K40, K41, K42,           K45,                     K4A, K4B, K4C, K4D  \
) KEYMAP( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO,  K2D, \
    K30, NO,  K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
    K40, K41, K42,           K45,                K49, K4A, K4B, K4C, K4D  \
)

#endif
and the matrix file
Spoiler:

Code: Select all

]#include <stdint.h>
#include <stdbool.h>
#include <avr/io.h>
#include <util/delay.h>
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"


#ifndef DEBOUNCE
#   define DEBOUNCE	5
#endif
static uint8_t debouncing = DEBOUNCE;

/* matrix state(1:on, 0:off) */
static matrix_row_t matrix[MATRIX_ROWS];
static matrix_row_t matrix_debouncing[MATRIX_ROWS];

static matrix_row_t read_cols(void);
static void init_cols(void);
static void unselect_rows(void);
static void select_row(uint8_t row);


void matrix_init(void)
{
    // initialize row and col
    unselect_rows();
    init_cols();

    // initialize matrix state: all keys off
    for (uint8_t i=0; i < MATRIX_ROWS; i++) {
        matrix[i] = 0;
        matrix_debouncing[i] = 0;
    }
}

uint8_t matrix_scan(void)
{
    for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
        select_row(i);
        _delay_us(30);  // without this wait read unstable value.
        matrix_row_t cols = read_cols();
        if (matrix_debouncing[i] != cols) {
            matrix_debouncing[i] = cols;
            if (debouncing) {
                debug("bounce!: "); debug_hex(debouncing); debug("\n");
            }
            debouncing = DEBOUNCE;
        }
        unselect_rows();
    }

    if (debouncing) {
        if (--debouncing) {
            _delay_ms(1);
        } else {
            for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
                matrix[i] = matrix_debouncing[i];
            }
        }
    }

    return 1;
}

inline
matrix_row_t matrix_get_row(uint8_t row)
{
    return matrix[row];
}

/* Column pin configuration
 * col: 0   1   2   3   4   5   6   7   8   9   10 11 12 13 14
 * pin: B6  B5  B4  B3  B2  B1  B0  E7  E6  F0  F1 F2 F3 F4 F7  (Rev.A)
 * pin:                                 B7                      (Rev.B)
 */
static void  init_cols(void)
{
    // Input with pull-up(DDR:0, PORT:1)
    DDRF  &= ~(1<<6 | 1<<5 | 1<<4 | 1<<3 | 1<<1 | 1<<0);
    PORTF |=  (1<<6 | 1<<5 | 1<<4 | 1<<3 | 1<<1 | 1<<0);
    DDRE  &= ~(1<<7 | 1<<6);
    PORTE |=  (1<<7 | 1<<6);
    DDRC  &= ~(1<<7 | 1<<6 | 1<<5 | 1<<4 | 1<<3);
    PORTC |=  (1<<7 | 1<<6 | 1<<5 | 1<<4 | 1<<3);
    DDRB  &= ~(1<<6 | 1<<5 | 1<<4 | 1<<3 | 1<<1 | 1<<0);
    PORTB |=  (1<<6 | 1<<5 | 1<<4 | 1<<3 | 1<<1 | 1<<0);
}

static matrix_row_t read_cols(void)
{
    return (PINB&(1<<6) ? 0 : (1<<0)) |
           (PINB&(1<<5) ? 0 : (1<<1)) |
           (PINB&(1<<4) ? 0 : (1<<2)) |
           (PINB&(1<<3) ? 0 : (1<<3)) |
           (PINB&(1<<2) ? 0 : (1<<4)) |
           (PINB&(1<<1) ? 0 : (1<<5)) |
           (PINB&(1<<0) ? 0 : (1<<6)) |
           (PINE&(1<<7) ? 0 : (1<<7)) |
           (PINE&(1<<6) ? 0 : (1<<8)) |     
           (PINF&(1<<0) ? 0 : (1<<9)) |
           (PINF&(1<<1) ? 0 : (1<<10)) |
           (PINF&(1<<2) ? 0 : (1<<11)) |
           (PINF&(1<<3) ? 0 : (1<<12)) |
           (PINF&(1<<4) ? 0 : (1<<13)) |
           (PINF&(1<<7) ? 0 : (1<<14)) |);
}

/* Row pin configuration
 * row: 0   1   2   3   4
 * pin: C3  C4  C5  C6  C7
 */
static void unselect_rows(void)
{
    // Hi-Z(DDR:0, PORT:0) to unselect
    DDRC  &= ~0b11111000;
    PORTC &= ~0b11111000;
}

static void select_row(uint8_t row)
{
    // Output low(DDR:1, PORT:0) to select
    switch (row) {
        case 0:
            DDRC  |= (1<<3);
            PORTC &= ~(1<<3);
            break;
        case 1:
            DDRC  |= (1<<4);
            PORTC &= ~(1<<4);
            break;
        case 2:
            DDRC  |= (1<<5);
            PORTC &= ~(1<<5);
            break;
        case 3:
            DDRC  |= (1<<6);
            PORTC &= ~(1<<6);
            break;
        case 4:
            DDRC  |= (1<<7);
            PORTC &= ~(1<<7);
            break;
    }
}
First time trying this out could really use some hints or help! thanks in advance!

trey1901

12 Jan 2019, 05:06

trey1901 wrote:
12 Jan 2019, 03:03
Was wondering if i could get some help trying to compile getting this error message
Spoiler:

Code: Select all

mkdir -p obj_gh60_lufa
Compiling C: keymap_poker.c
avr-gcc -c -mmcu=at90usb1287 -gdwarf-2 -DF_CPU=16000000UL -DINTERRUPT_CONTROL_ENDPOINT -DBOOTLOADER_SIZE=4096 -DF_USB=16000000UL -DARCH=ARCH_AVR8 -DUSB_DEVICE_ONLY -DUSE_FLASH_DESCRIPTORS -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -DFIXED_CONTROL_ENDPOINT_SIZE=8  -DFIXED_NUM_CONFIGURATIONS=1 -DPROTOCOL_LUFA -DBOOTMAGIC_ENABLE -DMOUSEKEY_ENABLE -DMOUSE_ENABLE -DEXTRAKEY_ENABLE -DCONSOLE_ENABLE -DCOMMAND_ENABLE -DVERSION=preonic-1.0-7068-g9c2d77612-dirty -Os -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections -fno-inline-small-functions -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=obj_gh60_lufa/keymap_poker.lst -I. -I../../tmk_core -I../../tmk_core/protocol/lufa -I../../tmk_core/protocol/lufa/LUFA-git -I../../tmk_core/common -std=gnu99 -include config.h -MMD -MP -MF .dep/obj_gh60_lufa_keymap_poker.o.d  keymap_poker.c -o obj_gh60_lufa/keymap_poker.o
In file included from keymap_poker.c:1:0:
keymap_common.h:41:1: error: parameter name missing
 ) { \
 ^
keymap_poker.c:5:5: warning: implicit declaration of function 'KEYMAP' [-Wimplicit-function-declaration]
     KEYMAP(ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,  \
     ^
keymap_poker.c:5:12: error: 'ESC' undeclared here (not in a function)
     KEYMAP(ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,  \
            ^
keymap_poker.c:5:67: error: 'MINS' undeclared here (not in a function)
     KEYMAP(ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,  \
                                                                   ^
keymap_poker.c:5:72: error: 'EQL' undeclared here (not in a function)
     KEYMAP(ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,  \
                                                                        ^
keymap_poker.c:5:77: error: 'BSPC' undeclared here (not in a function)
     KEYMAP(ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,  \
                                                                             ^
keymap_poker.c:5:84: warning: backslash and newline separated by space
     KEYMAP(ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,  \
                                                                                    ^
keymap_poker.c:6:9: error: 'TAB' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
         ^
keymap_poker.c:6:14: error: 'Q' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
              ^
keymap_poker.c:6:19: error: 'W' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
                   ^
keymap_poker.c:6:24: error: 'E' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
                        ^
keymap_poker.c:6:29: error: 'R' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
                             ^
keymap_poker.c:6:34: error: 'T' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
                                  ^
keymap_poker.c:6:39: error: 'Y' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
                                       ^
keymap_poker.c:6:44: error: 'U' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
                                            ^
keymap_poker.c:6:49: error: 'I' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
                                                 ^
keymap_poker.c:6:54: error: 'O' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
                                                      ^
keymap_poker.c:6:59: error: 'P' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
                                                           ^
keymap_poker.c:6:64: error: 'LBRC' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
                                                                ^
keymap_poker.c:6:69: error: 'RBRC' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
                                                                     ^
keymap_poker.c:6:74: error: 'BSLS' undeclared here (not in a function)
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
                                                                          ^
keymap_poker.c:7:9: error: 'CAPS' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
         ^
keymap_poker.c:7:14: error: 'A' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
              ^
keymap_poker.c:7:19: error: 'S' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
                   ^
keymap_poker.c:7:24: error: 'D' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
                        ^
keymap_poker.c:7:29: error: 'F' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
                             ^
keymap_poker.c:7:34: error: 'G' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
                                  ^
keymap_poker.c:7:39: error: 'H' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
                                       ^
keymap_poker.c:7:44: error: 'J' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
                                            ^
keymap_poker.c:7:49: error: 'K' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
                                                 ^
keymap_poker.c:7:54: error: 'L' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
                                                      ^
keymap_poker.c:7:59: error: 'SCLN' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
                                                           ^
keymap_poker.c:7:64: error: 'QUOT' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
                                                                ^
keymap_poker.c:7:74: error: 'ENT' undeclared here (not in a function)
         CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
                                                                          ^
keymap_poker.c:8:9: error: 'LSFT' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
         ^
keymap_poker.c:8:14: error: 'Z' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
              ^
keymap_poker.c:8:19: error: 'X' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
                   ^
keymap_poker.c:8:24: error: 'C' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
                        ^
keymap_poker.c:8:29: error: 'V' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
                             ^
keymap_poker.c:8:34: error: 'B' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
                                  ^
keymap_poker.c:8:39: error: 'N' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
                                       ^
keymap_poker.c:8:44: error: 'M' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
                                            ^
keymap_poker.c:8:49: error: 'COMM' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
                                                 ^
keymap_poker.c:8:54: error: 'DOT' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
                                                      ^
keymap_poker.c:8:59: error: 'SLSH' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
                                                           ^
keymap_poker.c:8:74: error: 'RSFT' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
                                                                          ^
keymap_poker.c:8:79: error: 'UP' undeclared here (not in a function)
         LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
                                                                               ^
keymap_poker.c:9:9: error: 'LCTL' undeclared here (not in a function)
         LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT\
         ^
keymap_poker.c:9:14: error: 'LGUI' undeclared here (not in a function)
         LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT\
              ^
keymap_poker.c:9:19: error: 'LALT' undeclared here (not in a function)
         LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT\
                   ^
keymap_poker.c:9:34: error: 'SPC' undeclared here (not in a function)
         LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT\
                                  ^
keymap_poker.c:9:59: error: 'RALT' undeclared here (not in a function)
         LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT\
                                                           ^
keymap_poker.c:9:64: error: 'RCTL' undeclared here (not in a function)
         LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT\
                                                                ^
keymap_poker.c:9:69: error: 'GRV' undeclared here (not in a function)
         LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT\
                                                                     ^
keymap_poker.c:9:74: error: 'LEFT' undeclared here (not in a function)
         LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT\
                                                                          ^
keymap_poker.c:9:79: error: 'DOWN' undeclared here (not in a function)
         LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT\
                                                                               ^
keymap_poker.c:9:84: error: 'RGHT' undeclared here (not in a function)
         LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT\
                                                                                    ^
keymap_poker.c:10:1: error: expected ')' before '}' token
 };
 ^
make: *** [../../tmk_core/rules.mk:557: obj_gh60_lufa/keymap_poker.o] Error 1

};
Keymap_poker.c
Spoiler:

Code: Select all

#include "keymap_common.h"

const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    /* 0: qwerty */
    KEYMAP(ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,  \   
        TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     \
        CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,\
        LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP,\
        LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT\
};

const uint16_t PROGMEM fn_actions[] = {
Keymap_common file
Spoiler:

Code: Select all

#ifndef KEYMAP_COMMON_H
#define KEYMAP_COMMON_H

#include <stdint.h>
#include <stdbool.h>
#include "keycode.h"
#include "action.h"
#include "action_macro.h"
#include "report.h"
#include "host.h"
#include "print.h"
#include "debug.h"
#include "keymap.h"


/* GH60 keymap definition macro
 * K2C, K31 and  K3C are extra keys for ISO
 */
#define KEYMAP( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
    K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D,\
    K40, K41, K42,      K44,                     K49, K4A, K4B, K4C, K4D, K4E,  \
) { \
    { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D }, \
    { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D }, \
    { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C }, \
    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D }, \
    { KC_##K40, KC_##K41, KC_##K42, KC_NO,    KC_##K44,    KC_NO, KC_NO,    KC_NO,    KC_NO,    KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E }  \
}

/* ANSI variant. No extra keys for ISO */
#define KEYMAP_ANSI( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B,      K2D, \
    K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B,           K3D, \
    K40, K41, K42,           K45,                     K4A, K4B, K4C, K4D  \
) KEYMAP( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO,  K2D, \
    K30, NO,  K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, NO,  K3D, \
    K40, K41, K42,           K45,                NO,  K4A, K4B, K4C, K4D  \
)


#define KEYMAP_HHKB( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49,\
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B,      K2D, \
    K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B,      K3D, K3C, \
    K40, K41, K42,           K45,                     K4A, K4B, K4C, K4D  \
) KEYMAP( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO,  K2D, \
    K30, NO,  K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
    K40, K41, K42,           K45,                K49, K4A, K4B, K4C, K4D  \
)

#endif
and the matrix file
Spoiler:

Code: Select all

]#include <stdint.h>
#include <stdbool.h>
#include <avr/io.h>
#include <util/delay.h>
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"


#ifndef DEBOUNCE
#   define DEBOUNCE	5
#endif
static uint8_t debouncing = DEBOUNCE;

/* matrix state(1:on, 0:off) */
static matrix_row_t matrix[MATRIX_ROWS];
static matrix_row_t matrix_debouncing[MATRIX_ROWS];

static matrix_row_t read_cols(void);
static void init_cols(void);
static void unselect_rows(void);
static void select_row(uint8_t row);


void matrix_init(void)
{
    // initialize row and col
    unselect_rows();
    init_cols();

    // initialize matrix state: all keys off
    for (uint8_t i=0; i < MATRIX_ROWS; i++) {
        matrix[i] = 0;
        matrix_debouncing[i] = 0;
    }
}

uint8_t matrix_scan(void)
{
    for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
        select_row(i);
        _delay_us(30);  // without this wait read unstable value.
        matrix_row_t cols = read_cols();
        if (matrix_debouncing[i] != cols) {
            matrix_debouncing[i] = cols;
            if (debouncing) {
                debug("bounce!: "); debug_hex(debouncing); debug("\n");
            }
            debouncing = DEBOUNCE;
        }
        unselect_rows();
    }

    if (debouncing) {
        if (--debouncing) {
            _delay_ms(1);
        } else {
            for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
                matrix[i] = matrix_debouncing[i];
            }
        }
    }

    return 1;
}

inline
matrix_row_t matrix_get_row(uint8_t row)
{
    return matrix[row];
}

/* Column pin configuration
 * col: 0   1   2   3   4   5   6   7   8   9   10 11 12 13 14
 * pin: B6  B5  B4  B3  B2  B1  B0  E7  E6  F0  F1 F2 F3 F4 F7  (Rev.A)
 * pin:                                 B7                      (Rev.B)
 */
static void  init_cols(void)
{
    // Input with pull-up(DDR:0, PORT:1)
    DDRF  &= ~(1<<6 | 1<<5 | 1<<4 | 1<<3 | 1<<1 | 1<<0);
    PORTF |=  (1<<6 | 1<<5 | 1<<4 | 1<<3 | 1<<1 | 1<<0);
    DDRE  &= ~(1<<7 | 1<<6);
    PORTE |=  (1<<7 | 1<<6);
    DDRC  &= ~(1<<7 | 1<<6 | 1<<5 | 1<<4 | 1<<3);
    PORTC |=  (1<<7 | 1<<6 | 1<<5 | 1<<4 | 1<<3);
    DDRB  &= ~(1<<6 | 1<<5 | 1<<4 | 1<<3 | 1<<1 | 1<<0);
    PORTB |=  (1<<6 | 1<<5 | 1<<4 | 1<<3 | 1<<1 | 1<<0);
}

static matrix_row_t read_cols(void)
{
    return (PINB&(1<<6) ? 0 : (1<<0)) |
           (PINB&(1<<5) ? 0 : (1<<1)) |
           (PINB&(1<<4) ? 0 : (1<<2)) |
           (PINB&(1<<3) ? 0 : (1<<3)) |
           (PINB&(1<<2) ? 0 : (1<<4)) |
           (PINB&(1<<1) ? 0 : (1<<5)) |
           (PINB&(1<<0) ? 0 : (1<<6)) |
           (PINE&(1<<7) ? 0 : (1<<7)) |
           (PINE&(1<<6) ? 0 : (1<<8)) |     
           (PINF&(1<<0) ? 0 : (1<<9)) |
           (PINF&(1<<1) ? 0 : (1<<10)) |
           (PINF&(1<<2) ? 0 : (1<<11)) |
           (PINF&(1<<3) ? 0 : (1<<12)) |
           (PINF&(1<<4) ? 0 : (1<<13)) |
           (PINF&(1<<7) ? 0 : (1<<14)) |);
}

/* Row pin configuration
 * row: 0   1   2   3   4
 * pin: C3  C4  C5  C6  C7
 */
static void unselect_rows(void)
{
    // Hi-Z(DDR:0, PORT:0) to unselect
    DDRC  &= ~0b11111000;
    PORTC &= ~0b11111000;
}

static void select_row(uint8_t row)
{
    // Output low(DDR:1, PORT:0) to select
    switch (row) {
        case 0:
            DDRC  |= (1<<3);
            PORTC &= ~(1<<3);
            break;
        case 1:
            DDRC  |= (1<<4);
            PORTC &= ~(1<<4);
            break;
        case 2:
            DDRC  |= (1<<5);
            PORTC &= ~(1<<5);
            break;
        case 3:
            DDRC  |= (1<<6);
            PORTC &= ~(1<<6);
            break;
        case 4:
            DDRC  |= (1<<7);
            PORTC &= ~(1<<7);
            break;
    }
}
First time trying this out could really use some hints or help! thanks in advance!
was able to fix some errors still need some help here are current error codes
Spoiler:

Code: Select all

Trey@GHOST MINGW64 ~/qmk_firmware/tmk_keyboard-master/keyboard/gh60
$ make -f Makefile

-------- begin --------
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.


mkdir -p obj_gh60_lufa
Compiling C: keymap_poker.c
avr-gcc -c -mmcu=at90usb1287 -gdwarf-2 -DF_CPU=16000000UL -DINTERRUPT_CONTROL_ENDPOINT -DBOOTLOADER_SIZE=4096 -DF_USB=16000000UL -DARCH=ARCH_AVR8 -DUSB_DEVICE_ONLY -DUSE_FLASH_DESCRIPTORS -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -DFIXED_CONTROL_ENDPOINT_SIZE=8  -DFIXED_NUM_CONFIGURATIONS=1 -DPROTOCOL_LUFA -DBOOTMAGIC_ENABLE -DMOUSEKEY_ENABLE -DMOUSE_ENABLE -DEXTRAKEY_ENABLE -DCONSOLE_ENABLE -DCOMMAND_ENABLE -DVERSION=preonic-1.0-7068-g9c2d77612-dirty -Os -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections -fno-inline-small-functions -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=obj_gh60_lufa/keymap_poker.lst -I. -I../../tmk_core -I../../tmk_core/protocol/lufa -I../../tmk_core/protocol/lufa/LUFA-git -I../../tmk_core/common -std=gnu99 -include config.h -MMD -MP -MF .dep/obj_gh60_lufa_keymap_poker.o.d  keymap_poker.c -o obj_gh60_lufa/keymap_poker.o
In file included from keymap_poker.c:1:0:
keymap_common.h:46:147: error: 'KC_' undeclared here (not in a function)
     { KC_##K40, KC_##K41, KC_##K42, KC_NO,    KC_##K44,    KC_NO, KC_NO,    KC_NO,    KC_NO,    KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E }  \
                                                                                                                                                   ^
keymap_poker.c:5:5: note: in expansion of macro 'KEYMAP'
     KEYMAP(ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,\
     ^
keymap_common.h:46:147: warning: excess elements in array initializer
     { KC_##K40, KC_##K41, KC_##K42, KC_NO,    KC_##K44,    KC_NO, KC_NO,    KC_NO,    KC_NO,    KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E }  \
                                                                                                                                                   ^
keymap_poker.c:5:5: note: in expansion of macro 'KEYMAP'
     KEYMAP(ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,\
     ^
keymap_common.h:46:147: note: (near initialization for 'keymaps[0][4]')
     { KC_##K40, KC_##K41, KC_##K42, KC_NO,    KC_##K44,    KC_NO, KC_NO,    KC_NO,    KC_NO,    KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E }  \
                                                                                                                                                   ^
keymap_poker.c:5:5: note: in expansion of macro 'KEYMAP'
     KEYMAP(ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,\
     ^
make: *** [../../tmk_core/rules.mk:557: obj_gh60_lufa/keymap_poker.o] Error 1
here is my poker.c file
Spoiler:

Code: Select all

#include "keymap_common.h"

const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    /* 0: qwerty */
    KEYMAP(ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,\
        TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS, \
        CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT, \
        LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,UP, \
        LCTL,LGUI,LALT,          SPC,                     RALT,RCTL,GRV, LEFT,DOWN,RGHT,),
};

const uint16_t PROGMEM fn_actions[] = {

};
here is the config file
Spoiler:

Code: Select all

#ifndef CONFIG_H
#define CONFIG_H


/* USB Device descriptor parameter */
#define VENDOR_ID       0xFEED
#define PRODUCT_ID      0x6060
#define DEVICE_VER      0x0001
#define MANUFACTURER    geekhack
#define PRODUCT         GH60
#define DESCRIPTION     t.m.k. keyboard firmware for GH60

/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 14

/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST

/* Set 0 if debouncing isn't needed */
#define DEBOUNCE    5

/* 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
and finally the keymap common file
Spoiler:

Code: Select all

#ifndef KEYMAP_COMMON_H
#define KEYMAP_COMMON_H

#include <stdint.h>
#include <stdbool.h>
#include "keycode.h"
#include "action.h"
#include "action_macro.h"
#include "report.h"
#include "host.h"
#include "print.h"
#include "debug.h"
#include "keymap.h"


/* GH60 keymap definition macro
 * K2C, K31 and  K3C are extra keys for ISO
 */
#define KEYMAP( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
    K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D,\
    K40, K41, K42,      K44,                     K49, K4A, K4B, K4C, K4D, K4E \
) { \
    { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D }, \
    { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D }, \
    { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C }, \
    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D }, \
    { KC_##K40, KC_##K41, KC_##K42, KC_NO,    KC_##K44,    KC_NO, KC_NO,    KC_NO,    KC_NO,    KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E }  \
}

/* ANSI variant. No extra keys for ISO */
#define KEYMAP_ANSI( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B,      K2D, \
    K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B,           K3D, \
    K40, K41, K42,           K45,                     K4A, K4B, K4C, K4D  \
) KEYMAP( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO,  K2D, \
    K30, NO,  K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, NO,  K3D, \
    K40, K41, K42,           K45,                NO,  K4A, K4B, K4C, K4D  \
)


#define KEYMAP_HHKB( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49,\
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B,      K2D, \
    K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B,      K3D, K3C, \
    K40, K41, K42,           K45,                     K4A, K4B, K4C, K4D  \
) KEYMAP( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO,  K2D, \
    K30, NO,  K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
    K40, K41, K42,           K45,                K49, K4A, K4B, K4C, K4D  \
)

#endif
will still be trying to solve it but any help would be great!

User avatar
tentator

12 Jan 2019, 23:16

I bet you are missing a , there in keymap_common.h and maybe even a closed } .. try to start over from the working example maybe and watch out not to remove the , and { () } structure..

kr, tent

trey1901

13 Jan 2019, 15:36

tentator wrote:
12 Jan 2019, 23:16
I bet you are missing a , there in keymap_common.h and maybe even a closed } .. try to start over from the working example maybe and watch out not to remove the , and { () } structure..

kr, tent
thanks i was able to get it to compile but im just getting random strings of letters from only certain keys, i may need to go back and do some wiring with solid core wire? not sure ill try that and see if i get better results thanks for the help.

Proka

03 Mar 2019, 14:44

Hello all, just stuck on this error while building fw, anyone can help or tell me what i did wrong.
Keymap : https://pastebin.com/4a5dKe48
Keymap Comm : https://pastebin.com/BrTv5U5y
Config : https://pastebin.com/k7qjEPmp
Matrix : https://pastebin.com/pH3KC2nx
Makefile : https://pastebin.com/8vcY5qs5

Error :
Spoiler:
-------- begin --------
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.


mkdir -p obj_gh60_lufa
Compiling C: keymap_poker.c
avr-gcc -c -mmcu=at90usb1287 -gdwarf-2 -DF_CPU=16000000UL -DINTERRUPT_CONTROL_ENDPOINT -DBOOTLOADER_SIZE=4096 -DF_USB=16000000UL -DARCH=ARCH_AVR8 -DUSB_DEVICE_ONLY -DUSE_FLASH_DESCRIPTORS -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -DFIXED_CONTROL_ENDPOINT_SIZE=8 -DFIXED_NUM_CONFIGURATIONS=1 -DPROTOCOL_LUFA -DBOOTMAGIC_ENABLE -DMOUSEKEY_ENABLE -DMOUSE_ENABLE -DEXTRAKEY_ENABLE -DCONSOLE_ENABLE -DCOMMAND_ENABLE -DVERSION=unknown -Os -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections -fno-inline-small-functions -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=obj_gh60_lufa/keymap_poker.lst -I. -I../../tmk_core -I../../tmk_core/protocol/lufa -I../../tmk_core/protocol/lufa/LUFA-git -I../../tmk_core/common -std=gnu99 -include config.h -MMD -MP -MF .dep/obj_gh60_lufa_keymap_poker.o.d keymap_poker.c -o obj_gh60_lufa/keymap_poker.o
keymap_poker.c:26:3: warning: braces around scalar initializer
[0] = ACTION_LAYER_MOMENTARY(1),
^
keymap_poker.c:26:3: note: (near initialization for 'fn_actions[0]')
In file included from ../../tmk_core/common/action.h:24:0,
from keymap_common.h:23,
from keymap_poker.c:1:
../../tmk_core/common/action_code.h:189:43: error: field name not in record or union initializer
#define ACTION(kind, param) { .code = ((kind)<<12 | (param)) }
^
../../tmk_core/common/action_code.h:259:53: note: in expansion of macro 'ACTION'
#define ACTION_LAYER_TAP(layer, key) ACTION(ACT_LAYER_TAP, (layer)<<8 | (key))
^
../../tmk_core/common/action_code.h:271:53: note: in expansion of macro 'ACTION_LAYER_TAP'
#define ACTION_LAYER_ON_OFF(layer) ACTION_LAYER_TAP((layer), OP_ON_OFF)
^
../../tmk_core/common/action_code.h:265:53: note: in expansion of macro 'ACTION_LAYER_ON_OFF'
#define ACTION_LAYER_MOMENTARY(layer) ACTION_LAYER_ON_OFF(layer)
^
keymap_poker.c:26:9: note: in expansion of macro 'ACTION_LAYER_MOMENTARY'
[0] = ACTION_LAYER_MOMENTARY(1),
^
../../tmk_core/common/action_code.h:189:43: note: (near initialization for 'fn_actions[0]')
#define ACTION(kind, param) { .code = ((kind)<<12 | (param)) }
^
../../tmk_core/common/action_code.h:259:53: note: in expansion of macro 'ACTION'
#define ACTION_LAYER_TAP(layer, key) ACTION(ACT_LAYER_TAP, (layer)<<8 | (key))
^
../../tmk_core/common/action_code.h:271:53: note: in expansion of macro 'ACTION_LAYER_TAP'
#define ACTION_LAYER_ON_OFF(layer) ACTION_LAYER_TAP((layer), OP_ON_OFF)
^
../../tmk_core/common/action_code.h:265:53: note: in expansion of macro 'ACTION_LAYER_ON_OFF'
#define ACTION_LAYER_MOMENTARY(layer) ACTION_LAYER_ON_OFF(layer)
^
keymap_poker.c:26:9: note: in expansion of macro 'ACTION_LAYER_MOMENTARY'
[0] = ACTION_LAYER_MOMENTARY(1),
^
keymap_poker.c:27:3: warning: braces around scalar initializer
[1] = ACTION_LAYER_TAP_KEY(1, KC_ESC),
^
keymap_poker.c:27:3: note: (near initialization for 'fn_actions[1]')
In file included from ../../tmk_core/common/action.h:24:0,
from keymap_common.h:23,
from keymap_poker.c:1:
../../tmk_core/common/action_code.h:189:43: error: field name not in record or union initializer
#define ACTION(kind, param) { .code = ((kind)<<12 | (param)) }
^
../../tmk_core/common/action_code.h:259:53: note: in expansion of macro 'ACTION'
#define ACTION_LAYER_TAP(layer, key) ACTION(ACT_LAYER_TAP, (layer)<<8 | (key))
^
../../tmk_core/common/action_code.h:276:53: note: in expansion of macro 'ACTION_LAYER_TAP'
#define ACTION_LAYER_TAP_KEY(layer, key) ACTION_LAYER_TAP((layer), (key))
^
keymap_poker.c:27:9: note: in expansion of macro 'ACTION_LAYER_TAP_KEY'
[1] = ACTION_LAYER_TAP_KEY(1, KC_ESC),
^
../../tmk_core/common/action_code.h:189:43: note: (near initialization for 'fn_actions[1]')
#define ACTION(kind, param) { .code = ((kind)<<12 | (param)) }
^
../../tmk_core/common/action_code.h:259:53: note: in expansion of macro 'ACTION'
#define ACTION_LAYER_TAP(layer, key) ACTION(ACT_LAYER_TAP, (layer)<<8 | (key))
^
../../tmk_core/common/action_code.h:276:53: note: in expansion of macro 'ACTION_LAYER_TAP'
#define ACTION_LAYER_TAP_KEY(layer, key) ACTION_LAYER_TAP((layer), (key))
^
keymap_poker.c:27:9: note: in expansion of macro 'ACTION_LAYER_TAP_KEY'
[1] = ACTION_LAYER_TAP_KEY(1, KC_ESC),
^
make: *** [../../tmk_core/rules.mk:557: obj_gh60_lufa/keymap_poker.o] Error 1

User avatar
softservejazmine

25 Mar 2019, 04:58

Hi, I'm having an issue compiling. When I try to compile it says this:

mkdir -p obj_gh60_lufa
Compiling C: keymap_poker.c
avr-gcc -c -mmcu=atmega32u4 -gdwarf-2 -DF_CPU=16000000UL -DINTERRUPT_CONTROL_ENDPOINT -DBOOTLOADER_SIZE=4096 -DF_USB=16000000UL -DARCH=ARCH_AVR8 -DUSB_DEVICE_ONLY -DUSE_FLASH_DESCRIPTORS -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -DFIXED_CONTROL_ENDPOINT_SIZE=8 -DFIXED_NUM_CONFIGURATIONS=1 -DPROTOCOL_LUFA -DBOOTMAGIC_ENABLE -DMOUSEKEY_ENABLE -DMOUSE_ENABLE -DEXTRAKEY_ENABLE -DCONSOLE_ENABLE -DCOMMAND_ENABLE -DNKRO_ENABLE -DVERSION=unknown -Os -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections -fno-inline-small-functions -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=obj_gh60_lufa/keymap_poker.lst -I. -I../../tmk_core -I../../tmk_core/protocol/lufa -I../../tmk_core/protocol/lufa/LUFA-git -I../../tmk_core/common -std=gnu99 -include config.h -MMD -MP -MF .dep/obj_gh60_lufa_keymap_poker.o.d keymap_poker.c -o obj_gh60_lufa/keymap_poker.o
In file included from keymap_common.h:20:0,
from keymap_poker.c:1:
/usr/lib/gcc/avr/5.4.0/include/stdint.h:9:26: fatal error: stdint.h: No such file or directory
compilation terminated.


Any help would be greatly appreciated!

Edit: I'm stupid. Didn't install all the libs I needed. Oof.

Post Reply

Return to “Workshop”