Author Topic: TMK flashing issues with GH60  (Read 3704 times)

0 Members and 1 Guest are viewing this topic.

Offline only1gc

  • Thread Starter
  • Posts: 6
TMK flashing issues with GH60
« on: Thu, 06 April 2017, 07:03:01 »
edit: Vincent (the seller) tried to help me with the errors over Skype, however I still could not flash it. Must be a rare faulty microcontroller. We came to an agreement for me to get a new PCB. Thanks for the replies.


Hey guys,

I bought this GH60 Satan off aliexpress.
Quote
https://www.aliexpress.com/store/product/Customized-KC60-Full-Set-Aluminum-Case-Programmable-PCB-Steel-Plate-Switches-LED-For-60-Standard-Layout/429151_32620290856.html

I've been trying to program it with TMK by following this guide. I tried changing my Caps Lock key to the "K" key as a simple test.
Quote
https://mechboards.co.uk/how-to-build-our-gh60-kit/

I get the following error when I flash
Quote
Waiting for Bootloader...
Erasing...
Erasing flash...  Success
Checking memory from 0x0 to 0x6FFF...  Not blank at 0x1.
Reflashing HEX file...
Checking memory from 0x0 to 0x6BFF...  Not blank at 0x1.
The target memory for the program is not blank.
Use --force flag to override this error check.
Reflashing EEP file...
0%                            100%  Programming 0x400 bytes...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>]  Success
0%                            100%  Reading 0x400 bytes...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>]  Success
Validating...  Success
0x400 bytes written into 0x400 bytes memory (100.00%).
Success!

The layout seems to be the default one as Caps Lock works in the default manner... What do I do?
« Last Edit: Fri, 14 April 2017, 04:46:34 by only1gc »

Offline pixelpusher

  • * Elevated Elder
  • Posts: 4185
  • Location: Tennessee - USA
Re: TMK flashing issues with GH60
« Reply #1 on: Thu, 06 April 2017, 09:24:34 »
I built one for a friend and had a hell of time getting my firmware on it.  I finally found an option that worked, but I honestly cannot remember which route I took.  Although, I do remember that trying to load it with Atmel Flip and that screwed a lot of stuff up. Please don't try to use Flip on this board, as it will cause headaches :)

When you load firmware and it doesn't "take," it is most likely that there is an error, making it incompatible.

There is a file in the same folder as the firmware flashing .bat that will erase the chip, do that for starters.

I ended up using easyAVR (yes, but do NOT us Flip to push it ) to generate the firmware file that I dragged onto the .bat and that worked the first time.  The trouble is that you don't get quite as many options as the default firmware for LEDs.
« Last Edit: Thu, 06 April 2017, 13:32:59 by reececonrad »

Offline pixelpusher

  • * Elevated Elder
  • Posts: 4185
  • Location: Tennessee - USA
Re: TMK flashing issues with GH60
« Reply #2 on: Thu, 06 April 2017, 09:40:32 »
Also, make sure that when you paste your layout from keyboard layout editor that none of the keys are blank.  For instance, the default 60% layout has no assignment to the space key and you'll need to add it.  Also, "Enter" should be "return" and to avoid errors in the online tmk tool, you can assign "L" and "R" in front of the modifiers on the appropriate side (i.e. "LControl", "LWin", "LAlt", "Space", "RAlt", "RWin"...)

Rename "Menu" to "App" again to get rid of error on TMK tool.

I still think all of these changes didn't do it for me with the online tool and I just used easyAVR :(

Offline only1gc

  • Thread Starter
  • Posts: 6
Re: TMK flashing issues with GH60
« Reply #3 on: Fri, 07 April 2017, 00:59:30 »
Hi.

I've tried erasing the EEPROM and flashing a .hex file created with EasyAVR but NOT in FLIP as you suggested, however I still get the same error for the most part no matter what I do (the "not blank at 0x1" error in the TKG cmd window which is similar to the "blank check failure at 0x00000" error I was getting in FLIP previously)


Here's three pictures of the cmd when trying to dump the EEPROM, erase the EEPROM and trying to flash the .hex file (in that order in the photo album).
Quote
http://imgur.com/a/5u2Zg


I hope you can make sense of any of this. If not, thanks for the suggestions so far.

Offline pixelpusher

  • * Elevated Elder
  • Posts: 4185
  • Location: Tennessee - USA
Re: TMK flashing issues with GH60
« Reply #4 on: Fri, 07 April 2017, 09:59:02 »
Just checking the order in which you did things.  Did you erase, unplug and replug, and then try to flash by dragging your easyAVR hex onto the reflash.bat file?

Don't give up! I know it's a headache but there has to be a way to get it running your layout.

After I tried to flash this board with the atmel app I ended up having drivers installed that didn't need to be there.  I had to go into the device manger and remove drivers over and over to get them all off my system for this board.  Windows keeps a backup of every driver and will roll back to a previously installed version when you uninstall.  You don't want ANY drivers to be associated with this board.

I remember having the issue where the board listed a device name GH60Satan even when it was in bootloader mode (after pressing the button), which is wrong.  Make sure that it lists the chip name in the device manager when it's in programming mode.

I don't know that it's a driver issue, but that's another step in the equation.

Offline only1gc

  • Thread Starter
  • Posts: 6
Re: TMK flashing issues with GH60
« Reply #5 on: Sat, 08 April 2017, 08:26:29 »
Yep, I tried erasing the EEPROM with the util.bat file, unplugging, replugging and then dragging the .hex file onto the reflash.bat file.

The "not blank at 0x1" seems to occur no matter what I do, as shown in the imgur album in my previous comment.

When I press the button on the back of the keyboard to get it into bootloader mode, the ATmega32U4 driver seems to be installed correctly when I check in device manager. No yellow exclamation mark. I've tried uninstalling the ATmega32U4 driver and letting it reinstall automatically when I go back into bootloader mode and also trying to point it to C:\Program Files (x86)\Atmel\Flip 3.4.7\usb to update the driver as many guides say to, so I don't think the atmega driver is the source of the problem. Maybe it's something to do with the microcontroller physically?
 
When the keyboard is in normal mode, the "Devices and Printers" window displays it as GH60
Quote
http://imgur.com/a/R8gRV
« Last Edit: Sat, 08 April 2017, 08:30:33 by only1gc »

Offline pixelpusher

  • * Elevated Elder
  • Posts: 4185
  • Location: Tennessee - USA
Re: TMK flashing issues with GH60
« Reply #6 on: Sat, 08 April 2017, 08:39:07 »
If you have loaded the atmel driver on it using flip, you will want to uninstall that in hardware manager.  It needs to be the dfu version that is loaded with the bootloader instead. 

When you uninstall the driver, check the box to delete all driver files.  Do this 3 or 4 times (unplugging and replugging, to ensure all drivers are removed

Then try using only the tmk file to load the proper dfu version of the driver.  It will see the board has no driver and ask if you want to install it. 

Offline pixelpusher

  • * Elevated Elder
  • Posts: 4185
  • Location: Tennessee - USA
Re: TMK flashing issues with GH60
« Reply #7 on: Sat, 08 April 2017, 08:48:47 »
Give me a sec and I'll upload working firmware that I've flashed on two different satans.  It's a copy of the default Pok3r layout and function layer

Offline pixelpusher

  • * Elevated Elder
  • Posts: 4185
  • Location: Tennessee - USA
Re: TMK flashing issues with GH60
« Reply #8 on: Sat, 08 April 2017, 09:06:18 »
Here is a link to a working .hex file that I have put on a GH60 Satan (RevCHN)

https://www.dropbox.com/s/pxhbe9nz56lilut/pokerLED.hex

Offline only1gc

  • Thread Starter
  • Posts: 6
Re: TMK flashing issues with GH60
« Reply #9 on: Sun, 09 April 2017, 01:40:21 »
Quote
http://imgur.com/a/85Nbf

I uninstalled the driver (with the box ticked) once, replugged it and it came up under "Atmel USB device", so I uninstalled it again (with the box ticked) and then it had the yellow triangle with the exclamation mark, which I assume means all drivers have been removed (shown in the imgur album)

When I try to use setup.bat from the TKG toolkit to install the dfu driver (I hope this is what you meant by dfu version), the cmd windows crash as soon as I put the keyboard in bootloader mode (shown in the imgur album). This happens if I choose atmel_dfu or lufa_dfu as my bootloader in the cmd prompt (I'm assuming atmel is the one I'm supposed to pick since the ATmega32U4 shows up in device manager; I just tried both in case!)

As a last ditch effort, I then tried to install the drivers using "zadig" program (not to be confused with "zadic.exe" in the error shown in the imgur album, which I read in a guide before I made this thread). Driver installs fine but I get the same "not blank at 0x1" error as before when flashing your hex file or any hex file.


Thanks for the help so far!