geekhack

geekhack Projects => Making Stuff Together! => Topic started by: Bandit on Tue, 24 February 2015, 21:23:34

Title: Programming Teensy Firmware
Post by: Bandit on Tue, 24 February 2015, 21:23:34
Hey Guys, Bandit again. I recently wired up my Varmilo switch tester to a teensy 2.0 in a matrix. I no have officially no idea what I'm doing. I've fount Hasu's TMK firmware pack, and followed This guide (http://deskthority.net/workshop-f7/how-to-build-your-very-own-keyboard-firmware-t7177.html#p141386) but it isn't working right. I'm sure I'm missing something or I just have much to learn. Pointers in the right direction would be greatly appreciated!
Title: Re: Programming Teensy Firmware
Post by: Moralless on Tue, 24 February 2015, 21:29:53
What part are you stuck on specifically? matt3o's guide is pretty straight forward but you just have to pay close attention to the matrix of the switch tester and which pins you soldered them on.
Title: Re: Programming Teensy Firmware
Post by: Bandit on Tue, 24 February 2015, 21:49:34
What part are you stuck on specifically? matt3o's guide is pretty straight forward but you just have to pay close attention to the matrix of the switch tester and which pins you soldered them on.

I get to the very end where I have to type "make -f Makefile" and that comes up with an error at the very end.

(http://i.imgur.com/c2K8wPO.png)
Title: Re: Programming Teensy Firmware
Post by: Melvang on Tue, 24 February 2015, 22:08:55
If you are using Windows 8 you are in a very uphill battle.  About the best solution in that case is to find an old XP box to do it, or linux of some fashion.  That was the only way I was able to compile firmware.  Even then I have no clue what I am doing.  I just know that windows 8 has issues with WinAVR.
Title: Re: Programming Teensy Firmware
Post by: Bandit on Tue, 24 February 2015, 22:44:27
I'm using Windows 7. Does that work or should I use xp?
Title: Re: Programming Teensy Firmware
Post by: Melvang on Tue, 24 February 2015, 22:45:43
I *think* 7 worked but I abandoned that rig because easily accessible USB ports were not available
Title: Re: Programming Teensy Firmware
Post by: user 18 on Tue, 24 February 2015, 22:58:31
Any chance you can pastebin the code in the files you edited? That would help determine if it's an issue in the code or with the system.
Title: Re: Programming Teensy Firmware
Post by: Bandit on Wed, 25 February 2015, 09:40:16
Any chance you can pastebin the code in the files you edited? That would help determine if it's an issue in the code or with the system.
I'll post it here when I get home.
Title: Re: Programming Teensy Firmware
Post by: metalliqaz on Wed, 25 February 2015, 10:03:31
Why are you talking about Windows versions? There is clearly an error in the code
Keymap_common.h line 44
Title: Re: Programming Teensy Firmware
Post by: user 18 on Wed, 25 February 2015, 11:03:39
Why are you talking about Windows versions? There is clearly an error in the code
Keymap_common.h line 44

That's my guess, which is why I asked for files to be posted.
Title: Re: Programming Teensy Firmware
Post by: Bandit on Wed, 25 February 2015, 13:45:46
Here's my keymap_common.h

http://pastebin.com/FqYLKu2K (http://pastebin.com/FqYLKu2K)
Title: Re: Programming Teensy Firmware
Post by: abjr on Wed, 25 February 2015, 14:14:58
Fix your KEYMAP. You have some extraneous commas and backslash.

Code: [Select]
#define KEYMAP( \
    K00, K01, K02, \
    K03, K04, K05, \
    K06, K07, K08 \
) { \
    { KC_##K00, KC_##K01, KC_##K02 }, \
    { KC_##K03, KC_##K04, KC_##K05 }, \
    { KC_##K06, KC_##K07, KC_##K08 } \
}
Title: Re: Programming Teensy Firmware
Post by: Bandit on Wed, 25 February 2015, 14:38:23
Okay I fixed all the errors in my code, and I got the hex file to compile. Great! Now the only problem is that when I have the board plugged in, it just prints 369369369369369369369369 a bunch. I believe this is a hardware problem since it happens randomly on and off.
Title: Re: Programming Teensy Firmware
Post by: suicidal_orange on Wed, 25 February 2015, 14:53:50
Okay I fixed all the errors in my code, and I got the hex file to compile. Great! Now the only problem is that when I have the board plugged in, it just prints 369369369369369369369369 a bunch. I believe this is a hardware problem since it happens randomly on and off.

Are 3 6 and 9 connected in your matrix?  Looks like a backwards diode to me :)
Title: Re: Programming Teensy Firmware
Post by: Bandit on Wed, 25 February 2015, 15:02:36
Okay I fixed all the errors in my code, and I got the hex file to compile. Great! Now the only problem is that when I have the board plugged in, it just prints 369369369369369369369369 a bunch. I believe this is a hardware problem since it happens randomly on and off.

Are 3 6 and 9 connected in your matrix?  Looks like a backwards diode to me :)

Yes, they're connected, but the diodes are all fine.
Title: Re: Programming Teensy Firmware
Post by: metalliqaz on Wed, 25 February 2015, 21:21:59
If it is happening intermittently, then it could be that the voltage levels are right on the edge.  Are you sure you configured the I/O correctly with pull-up?

Also, do any of the other keys work?