Posted: 09 Oct 2015, 14:32
Now I feel stupid - why didn't I think of that myself.
Thank you
Thank you
mechanical keyboard authority
https://ns1.deskthority.net/
Please update with pics!RtG wrote:Sorry no pics at the moment, all parts are scattered all over the place.
But I am building on a PC-MOD. Its a PC but it looks like a Laptop.
The last two pieces are about to get in place. Display and Keyboard.
nexaddo@gmail.com wrote: Hey guys,
I'm trying to make a small keyboard but I'm stuck at making the firmware. For some reason I get this error when I run make -f makefile
I've duble-triple checked all the code in the H60 folder but I don't seem to see any problem with it (considering that I mostly copy/paste-ed everyting....the tutorial was almost exactly with what I had in mind 15 columns and 5
I've attached the files if someone is nice enough to look at them and/or just compile them. Also I have Windows 10 installed so I'm not sure if that's the problem considering that make.exe had it's last update some 5 years ago.
Code: Select all
keymap_common.h:44:68: error: parameter name missing
Code: Select all
keymap_common.h:45:75: error: macro parameters must be comma-separated
Code: Select all
keymap_poker.c:25:1: error: expected '}' before 'RNS'
Code: Select all
Microsoft Windows [Version 10.0.10240]
(c) 2015 Microsoft Corporation. All rights reserved.
C:\Users\kagan>cd C:\Users\kagan\Desktop\tmk_keyboard-master\keyboard\gh60
C:\Users\kagan\Desktop\tmk_keyboard-master\keyboard\gh60>make -f Makefile.pjrc
0 [main] sh 1604 sync_with_child: child 7596(0x170) died before initialization with status code 0xC0000142
618 [main] sh 1604 sync_with_child: *** child state waiting for longjmp
/usr/bin/sh: fork: Resource temporarily unavailable
0 [main] sh 2904 sync_with_child: child 5440(0x1B0) died before initialization with status code 0xC0000142
347 [main] sh 2904 sync_with_child: *** child state waiting for longjmp
/usr/bin/sh: fork: Resource temporarily unavailable
0 [main] sh 7480 sync_with_child: child 5996(0x1C) died before initialization with status code 0xC0000142
238 [main] sh 7480 sync_with_child: *** child state waiting for longjmp
/usr/bin/sh: fork: Resource temporarily unavailable
0 [main] sh 1816 sync_with_child: child 5876(0x1B8) died before initialization with status code 0xC0000142
234 [main] sh 1816 sync_with_child: *** child state waiting for longjmp
/usr/bin/sh: fork: Resource temporarily unavailable
-------- begin --------
avr-gcc (WinAVR 20100110) 4.3.3
Copyright (C) 2008 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.
0 [main] sh 5400 sync_with_child: child 2940(0x104) died before initialization with status code 0xC0000142
222 [main] sh 5400 sync_with_child: *** child state waiting for longjmp
/usr/bin/sh: fork: Resource temporarily unavailable
mkdir -p obj_gh60_pjrc
Compiling C: keymap_poker.c
avr-gcc -c -mmcu=atmega32u4 -gdwarf-2 -DF_CPU=16000000UL -DBOOTLOADER_SIZE=4096 -DPROTOCOL_PJRC -DBOOTMAGIC_ENABLE -DMOUSEKEY_ENABLE -DMOUSE_ENABLE -DEXTRAKEY_ENABLE -DCONSOLE_ENABLE -DCOMMAND_ENABLE -DNKRO_ENABLE -DSLEEP_LED_ENABLE -DNO_SUSPEND_POWER_DOWN -DVERSION= -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_pjrc/keymap_poker.lst -I. -I../../tmk_core -I../../tmk_core/protocol/pjrc -I../../tmk_core/common -std=gnu99 -include config.h -MMD -MP -MF .dep/obj_gh60_pjrc_keymap_poker.o.d keymap_poker.c -o obj_gh60_pjrc/keymap_poker.o
keymap_poker.c:13: fatal error: opening dependency file .dep/obj_gh60_pjrc_keymap_poker.o.d: No such file or directory
compilation terminated.
make: *** [obj_gh60_pjrc/keymap_poker.o] Error 1
C:\Users\kagan\Desktop\tmk_keyboard-master\keyboard\gh60>
Hi Halvar, thank you for your welcome!Halvar wrote: Hi Tomer, welcome to DT!
Yes, that's a known problem. Solution is here:
http://www.avrfreaks.net/forum/windows- ... tion-error
Code: Select all
Microsoft Windows [Version 10.0.10240]
(c) 2015 Microsoft Corporation. All rights reserved.
C:\Users\kagan>cd C:\Users\kagan\Documents\Keyboard Software\tmk_keyboard-master\keyboard\gh60
C:\Users\kagan\Documents\Keyboard Software\tmk_keyboard-master\keyboard\gh60>make -f Makefile.pjrc
/usr/bin/sh: dfu-programmer: command not found
/usr/bin/sh: dfu-programmer: command not found
-------- begin --------
avr-gcc (WinAVR 20100110) 4.3.3
Copyright (C) 2008 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_pjrc
Compiling C: keymap_poker.c
avr-gcc -c -mmcu=atmega32u4 -gdwarf-2 -DF_CPU=16000000UL -DBOOTLOADER_SIZE=4096 -DPROTOCOL_PJRC -DBOOTMAGIC_ENABLE -DMOUSEKEY_ENABLE -DMOUSE_ENABLE -DEXTRAKEY_ENABLE -DCONSOLE_ENABLE -DCOMMAND_ENABLE -DNKRO_ENABLE -DSLEEP_LED_ENABLE -DNO_SUSPEND_POWER_DOWN -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_pjrc/keymap_poker.lst -I. -I../../tmk_core -I../../tmk_core/protocol/pjrc -I../../tmk_core/common -std=gnu99 -include config.h -MMD -MP -MF .dep/obj_gh60_pjrc_keymap_poker.o.d keymap_poker.c -o obj_gh60_pjrc/keymap_poker.o
keymap_poker.c:8: error: 'KC_F0' undeclared here (not in a function)
make: *** [obj_gh60_pjrc/keymap_poker.o] Error 1
C:\Users\kagan\Documents\Keyboard Software\tmk_keyboard-master\keyboard\gh60>
Hey Halvar, thanks for your quick response. I tried that with my own source. Here is my poker.c file:
Code: Select all
#include "keymap_common.h"
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* 0: qwerty */
KEYMAP(ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC, \
TAB, A, S, D, F, G, H, J, K, L, ENT, \
LSFT, Z, X, C, V, B, N, M, COMM,DOT, RSFT, \
LCTL, LALT,F0, F1, SPC, F2, WHOM,RCTL,SLSH),
/* 1: FN 1 */
KEYMAP(INS, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, DELETE, \
TRNS,TRNS,TRNS,TRNS,GRV, MINS, EQL, LBRC, RBRC, BSLS, TRNS, \
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, SCOLON, QUOT,TRNS,UP,TRNS, \
TRNS, TRNS,TRNS, TRNS, TRNS, TRNS, LEFT,DOWN,RIGHT),
/* 2: FN 2 */
KEYMAP(PSCR, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, DELETE, \
CAPS,TRNS,TRNS,TRNS,GRV, MINS, EQL, LBRC, RBRC, BSLS, TRNS, \
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, SCOLON, QUOT,TRNS,PGUP,TRNS, \
TRNS, TRNS,TRNS, TRNS, TRNS, TRNS, CALC,PGDOWN,TRNS),
};
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_LAYER_MOMENTARY(3),
[1] = ACTION_LAYER_TOGGLE(1),
[2] = ACTION_LAYER_TOGGLE(2),
};
After a few days of programming and re-soldering what apparently was a non-functioning diode, the keyboard works perfectly!
Code: Select all
obj_gh60_lufa/common/keyboard.o: In function `keyboard_set_leds':
C:\Users\Administrator\Downloads\tmk_keyboard-master\tmk_keyboard-master\keyboard\gh60/../../tmk_core/common/keyboard.c:176: undefined reference to `led_set'
obj_gh60_lufa/common/keymap.o: In function `action_for_key':
C:\Users\Administrator\Downloads\tmk_keyboard-master\tmk_keyboard-master\keyboard\gh60/../../tmk_core/common/keymap.c:36: undefined reference to `keymap_fn_to_action'
make: *** [gh60_lufa.elf] Error 1
Code: Select all
void led_set(uint8_t usb_led)
{
}
Code: Select all
/* translates Fn keycode to action */
action_t keymap_fn_to_action(uint8_t keycode)
{
return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) };
}
Halvar wrote: Hi, welcome to DT!
Did you delete or edit the file led.c? Or the file keymap_common.c? Because these are the files where the function belong that cannot be found.
If you don`t want to use LEDs, you can empty the function led_set(), but you should not delete it.
Code: Select all
void led_set(uint8_t usb_led) { }
I would leave keymap_fn_to_action() untouched.
Code: Select all
/* translates Fn keycode to action */ action_t keymap_fn_to_action(uint8_t keycode) { return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) }; }
Code: Select all
keymap_common.c: In function 'keymap_fn_to_action':
keymap_common.c:29: error: 'fn_actions' undeclared (first use in this function)
keymap_common.c:29: error: (Each undeclared identifier is reported only once
keymap_common.c:29: error: for each function it appears in.)
make: *** [obj_gh60_lufa/keymap_common.o] Error 1