Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rtomaszewski/8c7abdf38d0ba2e11ce870dbbff50e44 to your computer and use it in GitHub Desktop.
Save rtomaszewski/8c7abdf38d0ba2e11ce870dbbff50e44 to your computer and use it in GitHub Desktop.
root@debian:~# cat rado.los
WARNING:
Some git sub-modules are out of date or modified, please consider runnning:
git submodule sync --recursive
git submodule update --init --recursive
You can ignore this warning if you are not compiling any ChibiOS keyboards,
or if you have modified the ChibiOS libraries yourself.
Making ergodox/ez with keymap rado
avr-gcc (GCC) 4.9.2
Copyright (C) 2014 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.
Compiling: keyboards/ergodox/ez/twimaster.c [OK]
Compiling: keyboards/ergodox/ez/matrix.c [OK]
Compiling: keyboards/ergodox/ergodox.c [OK]
Compiling: keyboards/ergodox/keymaps/rado/keymap.cIn file included from ./tmk_core/common/print.h:41:0,
from ./tmk_core/common/debug.h:22,
from ./quantum/keymap.h:32,
from ./quantum/quantum.h:26,
from keyboards/ergodox/ez/ez.h:4,
from keyboards/ergodox/ergodox.h:4,
from keyboards/ergodox/keymaps/rado/keymap.c:1:
keyboards/ergodox/keymaps/rado/keymap.c: In function ‘action_function’:
./tmk_core/common/print.h:63:45: error: expected expression before ‘...’ token
# define uprintf(fmt, ...) xprintf(fmt, ...)
^
./tmk_core/common/avr/xprintf.h:54:67: note: in definition of macro ‘xprintf’
#define xprintf(format, ...) __xprintf(PSTR(format), ##__VA_ARGS__)
^
keyboards/ergodox/keymaps/rado/keymap.c:49:3: note: in expansion of macro ‘uprintf’
uprintf("%d action\n", id);
^
./tmk_core/common/print.h:63:45: error: expected expression before ‘...’ token
# define uprintf(fmt, ...) xprintf(fmt, ...)
^
./tmk_core/common/avr/xprintf.h:54:67: note: in definition of macro ‘xprintf’
#define xprintf(format, ...) __xprintf(PSTR(format), ##__VA_ARGS__)
^
keyboards/ergodox/keymaps/rado/keymap.c:54:9: note: in expansion of macro ‘uprintf’
uprintf("%d a pressed\n", id);
^
./tmk_core/common/print.h:63:45: error: expected expression before ‘...’ token
# define uprintf(fmt, ...) xprintf(fmt, ...)
^
./tmk_core/common/avr/xprintf.h:54:67: note: in definition of macro ‘xprintf’
#define xprintf(format, ...) __xprintf(PSTR(format), ##__VA_ARGS__)
^
keyboards/ergodox/keymaps/rado/keymap.c:59:9: note: in expansion of macro ‘uprintf’
uprintf("%d a release\n", id);
^
./tmk_core/common/print.h:63:45: error: expected expression before ‘...’ token
# define uprintf(fmt, ...) xprintf(fmt, ...)
^
./tmk_core/common/avr/xprintf.h:54:67: note: in definition of macro ‘xprintf’
#define xprintf(format, ...) __xprintf(PSTR(format), ##__VA_ARGS__)
^
keyboards/ergodox/keymaps/rado/keymap.c:64:8: note: in expansion of macro ‘uprintf’
uprintf("aaa\n");
^
keyboards/ergodox/keymaps/rado/keymap.c: In function ‘process_record_user’:
./tmk_core/common/print.h:63:45: error: expected expression before ‘...’ token
# define uprintf(fmt, ...) xprintf(fmt, ...)
^
./tmk_core/common/avr/xprintf.h:54:67: note: in definition of macro ‘xprintf’
#define xprintf(format, ...) __xprintf(PSTR(format), ##__VA_ARGS__)
^
keyboards/ergodox/keymaps/rado/keymap.c:75:3: note: in expansion of macro ‘uprintf’
uprintf("record %d %d %d\n", layer_mychars, keycode, aux_keycode);
^
./tmk_core/common/print.h:63:45: error: expected expression before ‘...’ token
# define uprintf(fmt, ...) xprintf(fmt, ...)
^
./tmk_core/common/avr/xprintf.h:54:67: note: in definition of macro ‘xprintf’
#define xprintf(format, ...) __xprintf(PSTR(format), ##__VA_ARGS__)
^
keyboards/ergodox/keymaps/rado/keymap.c:90:11: note: in expansion of macro ‘uprintf’
uprintf("r pressed\n");
^
./tmk_core/common/print.h:63:45: error: expected expression before ‘...’ token
# define uprintf(fmt, ...) xprintf(fmt, ...)
^
./tmk_core/common/avr/xprintf.h:54:67: note: in definition of macro ‘xprintf’
#define xprintf(format, ...) __xprintf(PSTR(format), ##__VA_ARGS__)
^
keyboards/ergodox/keymaps/rado/keymap.c:94:11: note: in expansion of macro ‘uprintf’
uprintf("r release\n");
^
./tmk_core/common/print.h:63:45: error: expected expression before ‘...’ token
# define uprintf(fmt, ...) xprintf(fmt, ...)
^
./tmk_core/common/avr/xprintf.h:54:67: note: in definition of macro ‘xprintf’
#define xprintf(format, ...) __xprintf(PSTR(format), ##__VA_ARGS__)
^
keyboards/ergodox/keymaps/rado/keymap.c:111:5: note: in expansion of macro ‘uprintf’
uprintf("exit layer, release key catching\n");
^
./tmk_core/common/print.h:63:45: error: expected expression before ‘...’ token
# define uprintf(fmt, ...) xprintf(fmt, ...)
^
./tmk_core/common/avr/xprintf.h:54:67: note: in definition of macro ‘xprintf’
#define xprintf(format, ...) __xprintf(PSTR(format), ##__VA_ARGS__)
^
keyboards/ergodox/keymaps/rado/keymap.c:113:5: note: in expansion of macro ‘uprintf’
uprintf("rrr\n");
^
[ERRORS]
tmk_core/rules.mk:358: recipe for target '.build/obj_ergodox_ez_rado/keyboards/ergodox/keymaps/rado/keymap.o' failed
make[1]: *** [.build/obj_ergodox_ez_rado/keyboards/ergodox/keymaps/rado/keymap.o] Error 1
../../Makefile:498: recipe for target 'rado' failed
make: *** [rado] Error 1
Make finished with errors
@rtomaszewski
Copy link
Author

updated the print.h file. After modification, the relevant part

root@debian:~/qmk_firmware# cat -n ./tmk_core/common/print.h
1 /* Copyright 2012 Jun Wako [email protected] /
2 /
Very basic print functions, intended to be used with usb_debug_only.c
3 * http://www.pjrc.com/teensy/
4 * Copyright (c) 2008 PJRC.COM, LLC
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 /
24
25 #ifndef PRINT_H__
26 #define PRINT_H__ 1
27
28 #include <stdint.h>
29 #include <stdbool.h>
30 #include "util.h"
31
32 #if defined(PROTOCOL_CHIBIOS)
33 #define PSTR(x) x
34 #endif
35
36
37 #ifndef NO_PRINT
38
39 #if defined(AVR) /
AVR /
40
41 # include "avr/xprintf.h"
42
43 # ifdef USER_PRINT /
USER_PRINT /
44
45 // Remove normal print defines
46 # define print(s)
47 # define println(s)
48 # undef xprintf
49 # define xprintf(fmt, ...)
50
51 // Create user print defines
52 # define uprint(s) xputs(PSTR(s))
53 # define uprintln(s) xputs(PSTR(s "\r\n"))
54 # define uprintf(fmt, ...) __xprintf(PSTR(fmt), ##VA_ARGS)
55
56 # else /
NORMAL PRINT /
57
58 // Create user & normal print defines
59 # define print(s) xputs(PSTR(s))
60 # define println(s) xputs(PSTR(s "\r\n"))
61 # define uprint(s) print(s)
62 # define uprintln(s) println(s)
63 //# define uprintf(fmt, ...) xprintf(fmt, ...)
64 #define uprintf(fmt, ...) xprintf(##VA_ARGS)
65
66 # endif /
USER_PRINT / NORMAL PRINT */
67

The new error message im getting when trying to compile

make rado

root@debian:~# cat rado.los
WARNING:
Some git sub-modules are out of date or modified, please consider runnning:
git submodule sync --recursive
git submodule update --init --recursive

You can ignore this warning if you are not compiling any ChibiOS keyboards,
or if you have modified the ChibiOS libraries yourself.

Making ergodox/ez with keymap rado

avr-gcc (GCC) 4.9.2
Copyright (C) 2014 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.

Compiling: keyboards/ergodox/ez/twimaster.c [OK]
Compiling: keyboards/ergodox/ez/matrix.c [OK]
Compiling: keyboards/ergodox/ergodox.c [OK]
Compiling: keyboards/ergodox/keymaps/rado/keymap.cIn file included from ./tmk_core/common/debug.h:22:0,
from ./quantum/keymap.h:32,
from ./quantum/quantum.h:26,
from keyboards/ergodox/ez/ez.h:4,
from keyboards/ergodox/ergodox.h:4,
from keyboards/ergodox/keymaps/rado/keymap.c:1:
keyboards/ergodox/keymaps/rado/keymap.c: In function ‘action_function’:
./tmk_core/common/print.h:64:34: error: pasting "(" and "id" does not give a valid preprocessing token
#define uprintf(fmt, ...) xprintf(##VA_ARGS)
^
keyboards/ergodox/keymaps/rado/keymap.c:49:3: note: in expansion of macro ‘uprintf’
uprintf("%d action\n", id);
^
keyboards/ergodox/keymaps/rado/keymap.c:49:3: error: invalid initializer
In file included from ./tmk_core/common/debug.h:22:0,
from ./quantum/keymap.h:32,
from ./quantum/quantum.h:26,
from keyboards/ergodox/ez/ez.h:4,
from keyboards/ergodox/ergodox.h:4,
from keyboards/ergodox/keymaps/rado/keymap.c:1:
./tmk_core/common/print.h:64:34: error: pasting "(" and "id" does not give a valid preprocessing token
#define uprintf(fmt, ...) xprintf(##VA_ARGS)
^
keyboards/ergodox/keymaps/rado/keymap.c:54:9: note: in expansion of macro ‘uprintf’
uprintf("%d a pressed\n", id);
^
keyboards/ergodox/keymaps/rado/keymap.c:54:9: error: invalid initializer
In file included from ./tmk_core/common/debug.h:22:0,
from ./quantum/keymap.h:32,
from ./quantum/quantum.h:26,
from keyboards/ergodox/ez/ez.h:4,
from keyboards/ergodox/ergodox.h:4,
from keyboards/ergodox/keymaps/rado/keymap.c:1:
./tmk_core/common/print.h:64:34: error: pasting "(" and "id" does not give a valid preprocessing token
#define uprintf(fmt, ...) xprintf(##VA_ARGS)
^
keyboards/ergodox/keymaps/rado/keymap.c:59:9: note: in expansion of macro ‘uprintf’
uprintf("%d a release\n", id);
^
keyboards/ergodox/keymaps/rado/keymap.c:59:9: error: invalid initializer
In file included from ./quantum/quantum.h:20:0,
from keyboards/ergodox/ez/ez.h:4,
from keyboards/ergodox/ergodox.h:4,
from keyboards/ergodox/keymaps/rado/keymap.c:1:
./tmk_core/common/avr/xprintf.h:54:51: error: expected expression before ‘)’ token
#define xprintf(format, ...) __xprintf(PSTR(format), ##VA_ARGS)
^
./tmk_core/common/print.h:64:27: note: in expansion of macro ‘xprintf’
#define uprintf(fmt, ...) xprintf(##VA_ARGS)
^
keyboards/ergodox/keymaps/rado/keymap.c:64:8: note: in expansion of macro ‘uprintf’
uprintf("aaa\n");
^
./tmk_core/common/avr/xprintf.h:54:51: error: invalid initializer
#define xprintf(format, ...) __xprintf(PSTR(format), ##VA_ARGS)
^
./tmk_core/common/print.h:64:27: note: in expansion of macro ‘xprintf’
#define uprintf(fmt, ...) xprintf(##VA_ARGS)
^
keyboards/ergodox/keymaps/rado/keymap.c:64:8: note: in expansion of macro ‘uprintf’
uprintf("aaa\n");
^
In file included from ./tmk_core/common/debug.h:22:0,
from ./quantum/keymap.h:32,
from ./quantum/quantum.h:26,
from keyboards/ergodox/ez/ez.h:4,
from keyboards/ergodox/ergodox.h:4,
from keyboards/ergodox/keymaps/rado/keymap.c:1:
keyboards/ergodox/keymaps/rado/keymap.c: In function ‘process_record_user’:
./tmk_core/common/print.h:64:34: error: pasting "(" and "layer_mychars" does not give a valid preprocessing token
#define uprintf(fmt, ...) xprintf(##VA_ARGS)
^
keyboards/ergodox/keymaps/rado/keymap.c:75:3: note: in expansion of macro ‘uprintf’
uprintf("record %d %d %d\n", layer_mychars, keycode, aux_keycode);
^
keyboards/ergodox/keymaps/rado/keymap.c:75:3: error: invalid initializer
In file included from ./quantum/quantum.h:20:0,
from keyboards/ergodox/ez/ez.h:4,
from keyboards/ergodox/ergodox.h:4,
from keyboards/ergodox/keymaps/rado/keymap.c:1:
./tmk_core/common/avr/xprintf.h:54:51: error: expected expression before ‘)’ token
#define xprintf(format, ...) __xprintf(PSTR(format), ##VA_ARGS)
^
./tmk_core/common/print.h:64:27: note: in expansion of macro ‘xprintf’
#define uprintf(fmt, ...) xprintf(##VA_ARGS)
^
keyboards/ergodox/keymaps/rado/keymap.c:90:11: note: in expansion of macro ‘uprintf’
uprintf("r pressed\n");
^
./tmk_core/common/avr/xprintf.h:54:51: error: invalid initializer
#define xprintf(format, ...) __xprintf(PSTR(format), ##VA_ARGS)
^
./tmk_core/common/print.h:64:27: note: in expansion of macro ‘xprintf’
#define uprintf(fmt, ...) xprintf(##VA_ARGS)
^
keyboards/ergodox/keymaps/rado/keymap.c:90:11: note: in expansion of macro ‘uprintf’
uprintf("r pressed\n");
^
./tmk_core/common/avr/xprintf.h:54:51: error: expected expression before ‘)’ token
#define xprintf(format, ...) __xprintf(PSTR(format), ##VA_ARGS)
^
./tmk_core/common/print.h:64:27: note: in expansion of macro ‘xprintf’
#define uprintf(fmt, ...) xprintf(##VA_ARGS)
^
keyboards/ergodox/keymaps/rado/keymap.c:94:11: note: in expansion of macro ‘uprintf’
uprintf("r release\n");
^
./tmk_core/common/avr/xprintf.h:54:51: error: invalid initializer
#define xprintf(format, ...) __xprintf(PSTR(format), ##VA_ARGS)
^
./tmk_core/common/print.h:64:27: note: in expansion of macro ‘xprintf’
#define uprintf(fmt, ...) xprintf(##VA_ARGS)
^
keyboards/ergodox/keymaps/rado/keymap.c:94:11: note: in expansion of macro ‘uprintf’
uprintf("r release\n");
^
./tmk_core/common/avr/xprintf.h:54:51: error: expected expression before ‘)’ token
#define xprintf(format, ...) __xprintf(PSTR(format), ##VA_ARGS)
^
./tmk_core/common/print.h:64:27: note: in expansion of macro ‘xprintf’
#define uprintf(fmt, ...) xprintf(##VA_ARGS)
^
keyboards/ergodox/keymaps/rado/keymap.c:111:5: note: in expansion of macro ‘uprintf’
uprintf("exit layer, release key catching\n");
^
./tmk_core/common/avr/xprintf.h:54:51: error: invalid initializer
#define xprintf(format, ...) __xprintf(PSTR(format), ##VA_ARGS)
^
./tmk_core/common/print.h:64:27: note: in expansion of macro ‘xprintf’
#define uprintf(fmt, ...) xprintf(##VA_ARGS)
^
keyboards/ergodox/keymaps/rado/keymap.c:111:5: note: in expansion of macro ‘uprintf’
uprintf("exit layer, release key catching\n");
^
./tmk_core/common/avr/xprintf.h:54:51: error: expected expression before ‘)’ token
#define xprintf(format, ...) __xprintf(PSTR(format), ##VA_ARGS)
^
./tmk_core/common/print.h:64:27: note: in expansion of macro ‘xprintf’
#define uprintf(fmt, ...) xprintf(##VA_ARGS)
^
keyboards/ergodox/keymaps/rado/keymap.c:113:5: note: in expansion of macro ‘uprintf’
uprintf("rrr\n");
^
./tmk_core/common/avr/xprintf.h:54:51: error: invalid initializer
#define xprintf(format, ...) __xprintf(PSTR(format), ##VA_ARGS)
^
./tmk_core/common/print.h:64:27: note: in expansion of macro ‘xprintf’
#define uprintf(fmt, ...) xprintf(##VA_ARGS)
^
keyboards/ergodox/keymaps/rado/keymap.c:113:5: note: in expansion of macro ‘uprintf’
uprintf("rrr\n");
^
[ERRORS]

tmk_core/rules.mk:358: recipe for target '.build/obj_ergodox_ez_rado/keyboards/ergodox/keymaps/rado/keymap.o' failed
make[1]: *** [.build/obj_ergodox_ez_rado/keyboards/ergodox/keymaps/rado/keymap.o] Error 1
../../Makefile:498: recipe for target 'rado' failed
make: *** [rado] Error 1
Make finished with errors
root@debian:~#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment