Author Topic: Need help compiling the software for my keyboard.  (Read 3353 times)

0 Members and 1 Guest are viewing this topic.

Offline Moralless

  • Thread Starter
  • Posts: 526
  • Location: Sydney, Australia
Need help compiling the software for my keyboard.
« on: Wed, 01 October 2014, 08:37:40 »
Hello so I'm currently trying to make the firmware for a custom keyboard that I'm building with this layout by using Haku's firmware code and following matt3o's guide on DT.
But when I go into Windows Powersaver and type in:
cd ~/Desktop/tmk_keyboard-master/keyboard/gh60
and then type in make -f Makefile, I get the error:
make: *** [sizebefore] Error -1073741515

I've spent a good 2 hours reading through the code and google searching what I could do/what could've caused this but to no avail. If anyone could point me to what I can do to fix this would be great.
 
Here are the pastebins of each file that I've modified:
Makefile: http://pastebin.com/T1LT0Y1Q
Matrix.c: http://pastebin.com/8kqrNBQQ
keymap_common.h: http://pastebin.com/yG2c6jV7
keymap_poker: http://pastebin.com/efQ6RRGs

Also I have winavr installed and my OS is windows 8 64 bit.
« Last Edit: Thu, 02 October 2014, 12:04:01 by moralles »

Offline Moralless

  • Thread Starter
  • Posts: 526
  • Location: Sydney, Australia
Re: Need help compiling the software for my keyboard.
« Reply #1 on: Thu, 02 October 2014, 11:03:04 »
Update, I attempted to redo the whole thing on another computer where I haven't loaded any of the required programs on it before, but now I have a different problem. When I go to Windows powershell and do the same process:
cd ~/Desktop/tmk_keyboard-master/keyboard/gh60
make -f Makefile

I get an error in my keymap_common.h where it says:
keymap_common.h:46:1: error: parameter name missing
and then a whole bunch of errors in my keymap_poker.c file where it states basically every every key except 1,2,3,4,5,6,7,8,9,0 as undeclared and not in a function
and then another error where it states:
keymap_poker.c:13: error: initializer element is not constant

keymap_common file: http://pastebin.com/yG2c6jV7
keymap_poker: http://pastebin.com/efQ6RRGs
« Last Edit: Thu, 02 October 2014, 11:22:37 by moralles »

Offline Matt3o

  • -[°_°]-
  • ** Robot Emeritus
  • Posts: 3547
  • Location: Italy
Re: Need help compiling the software for my keyboard.
« Reply #2 on: Thu, 02 October 2014, 11:20:04 »
I'll have a look at the code when I get 2 minutes, but if I were you I would quickly put an ubuntu virtual machine and try from there.

Offline tlem

  • Posts: 20
Re: Need help compiling the software for my keyboard.
« Reply #3 on: Thu, 02 October 2014, 12:16:45 »
try removing the comma at the end

keymap_common line 45
    K40, K41,      K43,      K45,      K47,      K49, K4A,  \

Offline Moralless

  • Thread Starter
  • Posts: 526
  • Location: Sydney, Australia
Re: Need help compiling the software for my keyboard.
« Reply #4 on: Thu, 02 October 2014, 13:22:47 »
Thanks for that, after doing that a few syntax errors showed up but ended up fixing but now when I compile it it shows an error where I couldn't find the file for:
../..common/debug.c:7: error: unknown fileld 'enable' specified in initializer 
../..common/debug.c:7: error: unknown fileld 'matrix' specified in initializer
../..common/debug.c:7: error: unknown fileld 'keyboard' specified in initializer
../..common/debug.c:7: error: unknown fileld 'mouse' specified in initializer
and then a few warnings about excess elements in the union initializer.     

EDIT: I found the debug.c file inside a different folder named common within tmk_keyboard-master and the code for it is here: http://pastebin.com/kyVGA4MY
« Last Edit: Thu, 02 October 2014, 13:31:05 by moralles »

Offline hasu

  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Need help compiling the software for my keyboard.
« Reply #5 on: Thu, 02 October 2014, 13:51:07 »
Not clear where your error occured, post full gcc error message.

Could you build original codes before you edited them?

Offline Moralless

  • Thread Starter
  • Posts: 526
  • Location: Sydney, Australia
Re: Need help compiling the software for my keyboard.
« Reply #6 on: Thu, 02 October 2014, 14:04:23 »
Not clear where your error occured, post full gcc error message.

Could you build original codes before you edited them?

Here is what it said after I removed the comma after being pointed out by tlem:
78676-0

To get rid of the first error just added 2 random keys even though my matrix doesn't support those 2 extra keys (probably a bad move) and then the second one I just added a TRNS.

After doing the above when I tried to compile it again this popped up:
78678-1

And now I've no idea on what happened, but suspect this has something to do with me adding those two random extra keys.

Also I have no idea what you mean by building the original code.
 

Offline hasu

  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Need help compiling the software for my keyboard.
« Reply #7 on: Thu, 02 October 2014, 14:20:13 »
hmm, second error at debug.c doesn't seem to be your error, perhaps my code includes any error.
I meant intact downloaded source codes without your edit with the word 'original code'.  You'll need to confirm 'original code' can be built without errors before edit.

Offline Moralless

  • Thread Starter
  • Posts: 526
  • Location: Sydney, Australia
Re: Need help compiling the software for my keyboard.
« Reply #8 on: Thu, 02 October 2014, 14:47:56 »
hmm, second error at debug.c doesn't seem to be your error, perhaps my code includes any error.
I meant intact downloaded source codes without your edit with the word 'original code'.  You'll need to confirm 'original code' can be built without errors before edit.

So I finally got my VM w/ ubuntu set up as matt3o suggested and with the same code posted in the OP, I was able to make a hex file but the keys aren't in the right places. However I tried making a hex file with the original code on my main OS - windows 8 64 bit and I got this error :
78686-0

Offline strict

  • TKL Zealot
  • Posts: 1921
  • Location: PA
Re: Need help compiling the software for my keyboard.
« Reply #9 on: Thu, 02 October 2014, 14:57:09 »
Are you sure PowerShell is able to compile this? I've been using Cygwin without issue.

Realforce EK45 (Silenced)  |  Realforce 87UW (45g)  |  Realforce 87UWS (Variable)
Filco MJ2 TKL (Cherry Clears)  |  Phantom 87 (78g Gateron Clears)  |  Phantom 86 (67g Zealios)


Offline Moralless

  • Thread Starter
  • Posts: 526
  • Location: Sydney, Australia
Re: Need help compiling the software for my keyboard.
« Reply #10 on: Thu, 02 October 2014, 15:00:43 »
Are you sure PowerShell is able to compile this? I've been using Cygwin without issue.

Yeah I'm starting to think it's that aswell. Haven't really researched the capabilities of powershell now that I think of it.

Offline hasu

  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Need help compiling the software for my keyboard.
« Reply #11 on: Thu, 02 October 2014, 15:02:58 »
congrat.
Very tedious to install tools on windows 8, forget it.

Oh, PowerShell? I didn't know that at all.
As strict said, you need unix like shell like Cygwin bash to build tmk.

Offline Moralless

  • Thread Starter
  • Posts: 526
  • Location: Sydney, Australia
Re: Need help compiling the software for my keyboard.
« Reply #12 on: Thu, 02 October 2014, 15:52:17 »
congrat.
Very tedious to install tools on windows 8, forget it.

Oh, PowerShell? I didn't know that at all.
As strict said, you need unix like shell like Cygwin bash to build tmk.

Thanks, just need to figure out how to fix the layout since it seems all the keys are jumbled up everywhere haha

Offline strict

  • TKL Zealot
  • Posts: 1921
  • Location: PA
Re: Need help compiling the software for my keyboard.
« Reply #13 on: Thu, 02 October 2014, 16:40:11 »
Also, I wouldn't recommend using WinAVR. Its way out of date. I've been using MHV AVR Tools with great success.

Realforce EK45 (Silenced)  |  Realforce 87UW (45g)  |  Realforce 87UWS (Variable)
Filco MJ2 TKL (Cherry Clears)  |  Phantom 87 (78g Gateron Clears)  |  Phantom 86 (67g Zealios)


Offline domoaligato

  • * Exquisite Elder
  • Posts: 1672
  • Location: USA
  • All your base are belong to us!
    • All your base are belong to us!
Re: Need help compiling the software for my keyboard.
« Reply #14 on: Fri, 03 October 2014, 00:57:21 »
you should not use powershell.
you should use a command prompt "cmd.exe" . they are very different.
also you need to patch your winavr using this download.

This is the modified msys-1.0.dll that fixes most compile issues.
http://www.madwizard.org/electronics/articles/winavrvista

extract msys-1.0.dll to C:\WinAVR-20100110\utils\bin and overwrite the existing one.

also please try to compile the gh60 firmware with
make KEYMAP=poker
sometimes that works better then make -f Makefile

one last thing. try compiling the gh60 firmware from a fresh download after all the stuff above to validate that your build environment is working before editing the layout files.