NerD60 - TMK Conversion / It works !!!

User avatar
DanielT
Un petit village gaulois d'Armorique…

19 Jun 2016, 11:15

Underglow is working, check the wiki page for details, you just have to add an extra Fn.
To your keymap add:

Code: Select all

2] = ACTION_BACKLIGHT_LEVEL(BACKLIGHT_PCB)
On the Fn layer assign a FN2 and that's it :)

User avatar
Stabilized

19 Jun 2016, 11:39

axtran wrote: Did you get underglow working? Could you share your changes to make the controls for it?
DanielT wrote: Underglow is working, check the wiki page for details...

What Daniel said, it's really easy to implement and works just like the switch backlight.

MrRooks

19 Jun 2016, 22:09

I just flashed my Nerd 2.1 with this as a guideline. I instead used a teensy 2.0. I ran into the issue with slow mode that was discussed here but I found a forum that mentioned this repo: https://github.com/Coding-Badly/TinyISP

Slow mode was on by default on TinyISP but the option is located in _TinyISP_BuildOptions.h as '#define PROGRAMMER_SPI_CLOCK SLOW'

There was a lot of overlap with your wiki article as the only real differences were the flags for avrdude being slightly different, I think everything else is the same outside of teensy specific things like pins.
Last edited by MrRooks on 20 Jun 2016, 00:09, edited 1 time in total.

User avatar
DanielT
Un petit village gaulois d'Armorique…

19 Jun 2016, 22:14

Cool, if you want you can add the Teensy part to the wiki, it would be interesting.

axtran

19 Jun 2016, 23:54

Thanks guys, I didn't read that part clearly enough. Set that as well. Thank you so much for the work put into this, breathed new life into my NerD 60 PCBs, LOL

User avatar
kekstee

21 Jun 2016, 22:55

Alright, just flashed mine. (Nerd60 V2.10) TMK works, resetting into DFU mode via key combination does as well.

I used a teensy 2.0 with the TinyISP posted above. No settings or modifications needed. I wish I knew what is wrong with the standard ArduinoISP though. It's just too fast? I tried the -B 10, 50 or 100 parameter, but it did not improve the read errors.

User avatar
DanielT
Un petit village gaulois d'Armorique…

22 Jun 2016, 17:12

I'm really happy to see more and more people using this guide :) What would be interesting is to port this to QMK especialy for the fancy lights effects. If I have the time I will start working on this, but someone with more C knowledge would be much faster.

mohitgarg

22 Jun 2016, 18:02

I found QMK more straight forward to use than TMK, so you'll be fine!

User avatar
DanielT
Un petit village gaulois d'Armorique…

22 Jun 2016, 19:00

It didn't seem like that to me, but I didn't had the time to study it

User avatar
kekstee

22 Jun 2016, 19:10

Well, the only scary step is to nuke the old firmware and set the fuses. Glad you gave it a shot and figured out the quirks for all to read.

User avatar
DanielT
Un petit village gaulois d'Armorique…

23 Jun 2016, 11:49

Well, for me having TMK on such a great board was worth the effort, and I'm glad this is also useful for others. My thanks will always go to xauser, he was the first to try this and because of him the TMK code exists for NerD60 :)

ocodo

08 Jul 2016, 16:19

I just delved into this as the Mac/OSX lag relegates the GON to my storage cupboard.

Working on a Mac to do this...

Things went well up to a point, I re-flashed the Amtel dfu bootloader successfully.

Code: Select all

avrdude -p m32u4  -c usbasp -U flash:w:ATMega32U4-usbdevice_dfu-1_0_0.hex -P usb       

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: reading input file "ATMega32U4-usbdevice_dfu-1_0_0.hex"
avrdude: input file ATMega32U4-usbdevice_dfu-1_0_0.hex auto detected as Intel Hex
avrdude: writing flash (32768 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 32768 bytes of flash written
avrdude: verifying flash memory against ATMega32U4-usbdevice_dfu-1_0_0.hex:
avrdude: load data flash data from input file ATMega32U4-usbdevice_dfu-1_0_0.hex:
avrdude: input file ATMega32U4-usbdevice_dfu-1_0_0.hex auto detected as Intel Hex
avrdude: input file ATMega32U4-usbdevice_dfu-1_0_0.hex contains 32768 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 32768 bytes of flash verified

avrdude: safemode: Fuses OK (E:C3, H:D9, L:DF)

avrdude done.  Thank you.
Fuses done success

Code: Select all

avrdude -c usbasp -p m32u4 -U lfuse:w:0xdf:m -U hfuse:w:0xd9:m -U efuse:w:0xc3:m -P usb

avrdude: safemode: Fuses OK (E:C3, H:D9, L:DF)
However when I try to flash the firmware the bootloader says it's readonly.

Any ideas?

Here's the error output.

Code: Select all

dfu-programmer atmega32u4 flash nerd_lufa.hex 
Checking memory from 0x0 to 0x56FF...  Empty.
0%                            100%  Programming 0x5700 bytes...
[Device is write protected.
 X  ERROR
Memory write error, use debug for more info.

User avatar
DanielT
Un petit village gaulois d'Armorique…

08 Jul 2016, 19:36

Hmm, did you put the board in DFU mode? Because after you set the fuses it will try a start the program. Try to shorten the RST and GND pins to put it in DFU mode.

ocodo

09 Jul 2016, 03:28

Ok will do. Reporting back in a few hours.

Just to check : https://imgur.com/a/84vHB

Short these when the board is connected over USB right?

User avatar
DanielT
Un petit village gaulois d'Armorique…

09 Jul 2016, 07:41

Yep, those two while connected on USB.

ocodo

09 Jul 2016, 08:51

GND RST shorted, let's try again...

Code: Select all

dfu-programmer atmega32u4 flash nerd_lufa.hex --debug 99     
     target: atmega32u4
    chip_id: 0x2ff4
  vendor_id: 0x03eb
    command: flash
      quiet: false
      debug: 99
device_type: AVR
------ command specific below ------
   validate: true
   hex file: nerd_lufa.hex

atmel.c:1295: atmel_flash( 0x7fff5abc7180, 0x7fff5abc7048, false, false )
atmel.c:1158: atmel_flash_prep_buffer( 0x7fff5abc7048 )
atmel.c:1335: Flash available from 0x0 to 0x6FFF (64kB p. 0 to 0), 0x7000 bytes.
atmel.c:1339: Data start @ 0x0: 64kB p 0; 128B p 0x0 + 0x0 offset.
atmel.c:1343: Data end @ 0x56FF: 64kB p 0; 128B p 0xAD + 0x7F offset.
atmel.c:1348: Totals: 0x5700 bytes, 174 128B pages, 1 64kB byte pages.
atmel.c:934: atmel_blank_check( 0x7fff5abc7180, 0x00000000, 0x000056FF )
atmel.c:1041: atmel_select_memory_unit( 0x7fff5abc7180, 0 )
atmel.c:1055: Ignore Select Memory Unit for non GRP_AVR32 device.
Checking memory from 0x0 to 0x56FF...  
atmel.c:1100: atmel_select_page( 0x7fff5abc7180, 0 )
atmel.c:1114: Selecting page 0, address 0x0.
atmel.c:867: __atmel_blank_page_check( 0x7fff5abc7180, 0x00000000, 0x000056ff )
atmel.c:899: Flash region from 0x0 to 0x56FF is blank.
atmel.c:977: Flash blank from 0x0 to 0x56FF.
Empty.
atmel.c:1041: atmel_select_memory_unit( 0x7fff5abc7180, 0 )
atmel.c:1055: Ignore Select Memory Unit for non GRP_AVR32 device.
Programming 0x5700 bytes...
atmel.c:1100: atmel_select_page( 0x7fff5abc7180, 0 )
atmel.c:1114: Selecting page 0, address 0x0.
atmel.c:1431: Program data block: 0x0 to 0x3FF (p. 0), 0x400 bytes.
atmel.c:1566: __atmel_flash_block( 0x7fff5abc7180, 0x7fff5abc7048, false )
atmel.c:1528: atmel_flash_populate_header( 0x7fff5abc6ae0, 0x0, 0x3FF, false )
atmel.c:1482: atmel_flash_populate_footer( 0x7fff5abc6ae0, 0x7fff5abc6f00, 65535, 65535, 65535 )
Device is write protected.
atmel.c:1434: Error flashing the block: err -2.
ERROR
Memory write error, use debug for more info.
commands.c:360: Error writing memory data. (err -4)
Aw shucks. I assume that the dfu bootloader can be re-flashed / or some setting can be done to turn off write protection, but I'm not seeing much info here.

I'll google around and see what I can find. Any help is of course much appreciated.

ocodo

09 Jul 2016, 08:53

This is interesting - http://www.housedillon.com/?p=1489 Seems there's issues with the Mac version of dfu programmer. I'm reading all this and will think on it before I approach a --force switch.

User avatar
DanielT
Un petit village gaulois d'Armorique…

09 Jul 2016, 09:12

Stabilized had some issues on Mac and the easy way out was to install Ubuntu in a VM. I saw in the outputs that you also get some errors from avrdude complaining about usbasp driver. My guess is in Mac the support is not that good for these tools.

ocodo

09 Jul 2016, 10:13

As there's no further damage to be done since I've already scrubbed the GON firmware ;) I went ahead and did this...:

Code: Select all

dfu-programmer atmega32u4 erase --force
Erasing flash...  Success
Checking memory from 0x0 to 0x6FFF...  Empty.
So here I go and trying to reflash the .hex again...

Code: Select all

dfu-programmer atmega32u4 flash nerd_lufa.hex --debug 5      
     target: atmega32u4
    chip_id: 0x2ff4
  vendor_id: 0x03eb
    command: flash
      quiet: false
      debug: 5
device_type: AVR
------ command specific below ------
   validate: true
   hex file: nerd_lufa.hex

Checking memory from 0x0 to 0x56FF...  Empty.
0%                            100%  Programming 0x5700 bytes...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>]  Success
0%                            100%  Reading 0x7000 bytes...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>]  Success
Validating...  Success
0x5700 bytes written into 0x7000 bytes memory (77.68%).
This looks promising, so I'll disconnect/reconnect the Nerd board ... typing on it now :) success!

Well that's cool, I'll fix up the keymaps to my liking and check the board extensively when I've reassembled the case.

Many thanks for your help, there's just about enough info on the web to make this relatively painless. I think it's not such an issue on OSX as all that, Linux is slightly better for this sort of thing no doubt.

I had issues attempting to use Flip on Windows, but that was via a VirtualBox VM (Win7) that I've used to run GON's GUI and also cfg my foot pedal, successfully. I think the native windows stack would probably be more useful (speculation!) - but just mooching around in there and trying to get this driver or that DLL reminded me why I don't touch windows with a 10 foot clown pole.

User avatar
BimboBB

09 Jul 2016, 10:59

Has someone here an idea how to get work the Nerdy GUI from GON? I have a NERD60 here (1.6 PCB) and but I cant simply get the GUI work for some unknown reasons. If I start the nerdygui.exe there is a window which asks for pressing a key on the nerd board, but nothing happens when i press a key. I think I have to patch the firmware first, but also the firm_downloader doesnt do much. When I try to download the Nerd_firm.hex it fails and say "open fail: no such file or directory".

Anyone has an idea?

User avatar
DanielT
Un petit village gaulois d'Armorique…

09 Jul 2016, 12:02

@ocodo: cool, glad it works :D TMK is way better than any other firmware! Enjoy the "new" GON . On Windows you need a driver for amtmega32u4dfu that is a pain to find and sometimes doesn't even work. I hate having to deal with Windows too, this is also one of the reasons I wanted to get rid of the NerDY GUI.
Anyway I'm happy to see another NerD60 running TMK :D
@BimboBB: what you have there is really strange, I've never had those problems, I have all PCB revisions and none had that problem, maybe the board is not recognized by windows. I can't test because all my boards have now TMK :( which in my oppinion is the way to go ;) Can you try on another computer?

User avatar
BimboBB

09 Jul 2016, 12:31

Nvm, fixed it. :) Found a working Firmware updater incl. hex files (see below link, under downloads). Now also the nerdy gui works.

http://www.gonskeyboardworks.com/manual ... -pcbs.html

User avatar
DanielT
Un petit village gaulois d'Armorique…

09 Jul 2016, 13:15

Great to hear that :) If you get bored try TMK ;)

ocodo

09 Jul 2016, 16:40

Really appreciate your help and this thread. (NerdTKL btw!)

TMK is running on a few of my boards, so I figured I would be better off :)

Thanks again!

User avatar
DanielT
Un petit village gaulois d'Armorique…

09 Jul 2016, 17:14

TKL! So cool :) I'm happy I could share my adventure so others don't have to lose time with the same small problems.

User avatar
scl

09 Jul 2016, 17:58

can somebody please post his tmk iso config for the nerd60? thanks

User avatar
DanielT
Un petit village gaulois d'Armorique…

10 Jul 2016, 11:04

If I have the time I'll make a ISO config for you, it's not that complicated. I'm an ANSI user, that's why the sample I have uploaded in the wiki is also ANSI.

User avatar
scl

10 Jul 2016, 14:29

Hey DanielT,
I have a ISO 3*125,625,4*125, split right shift and a double backspace config, while the current problem is the double backspace,can you help me there?
The rest works, including compile and flash process.

keymap_common.h

Code: Select all

  #define KEYMAP_ISO125( \
          K08, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, K69 \
          K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, \
          K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64,      K65, \
          K07, K79, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K67, \
          K06, K05, K78,                K70,                K72, K73, K74, K75  \
  ) KEYMAP( \
          K08,      NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,   NO,  NO,  NO,  \
          NO,  K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61,  K69,  NO,  NO,  \
          K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63,  NO,  NO,  NO,  \
          K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, NO,  K65,                 \
          K07, K79, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K67,        NO,       \
          K06, K05, K78,                K70,                K72,  K73, K74, K75,  NO,  NO,  NO   \
  )
the config worked, but this was my try to add the 2nd backspace key (i added/replaced the K69 in row 1/row2). it didnt compile after the changes in both keymap_common.h and keymap_60_iso125.c



keymap_60_iso125.c

Code: Select all

KEYMAP_ISO125(
        ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC, 1, \
        TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,      \
        LCTL,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,       \
        LSFT,NONUS_BSLASH,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,     RSFT,FN0,       \
        LCTL,  LGUI,LALT,          SPC,                     RALT,  RGUI,APP,RCTL),
for testing purposes, i just added a one.
Last edited by scl on 10 Jul 2016, 17:26, edited 1 time in total.

User avatar
DanielT
Un petit village gaulois d'Armorique…

10 Jul 2016, 15:51

The first thing that strikes me is a missing , after K69 you should have K69 ,\ in keymap_common.h . I'm not at my computer right now can't test. But I think that is the problem.

User avatar
scl

10 Jul 2016, 16:44

FYI: that did the trick. damn it, compiles now. thanks! :D the hex works, but the split BS-key does not register ... continuing work...

edit: to be clear, only backspace works, the 1-key doesnt.
Last edited by scl on 10 Jul 2016, 19:26, edited 1 time in total.

Post Reply

Return to “Workshop”