geekhack

geekhack Projects => Making Stuff Together! => Topic started by: pigsu on Sun, 22 January 2017, 16:17:02

Title: Programming AMJ40 is making me sad
Post by: pigsu on Sun, 22 January 2017, 16:17:02
Hi, I got instantly and inexplicably obsessed with mechanical keyboards somehow. One minute I was looking at obscenely expensive chef knives on Instagram and then somehow I was deep in the 40% rabbit hole.

I got a couple of AMJ40s from TaoBao and was all set (https://www.instagram.com/p/BN3HDj5BIde1CW9V158zzoGK2KBhDA1cZGcWNY0/) to start training my hands to contort. But the default programming of the boards doesn't have a FN key, or a layer change key, so there's no way to type anything other than letters.

I've been trying to program a new layout for ages now, but It's all been in vain.

The short summary is that no matter what I program, the keyboard comes back to life in exactly the same state as it was before.

I wrote up the question on Stack Overflow, but I might have more luck here.

http://stackoverflow.com/questions/41788455/dfu-programmer-claims-completion-but-no-change-on-chip (http://stackoverflow.com/questions/41788455/dfu-programmer-claims-completion-but-no-change-on-chip)

Kalp1 had the same problem here (https://geekhack.org/index.php?topic=41989.msg2127282#msg2127282) and flabbergast suggested trying boot magic but I can't seem to make that work.
Title: Re: Programming AMJ40 is making me sad
Post by: odd on Mon, 23 January 2017, 22:19:16
The keymap is in EEPROM so it persists over reboots. Look at the JD40 and JD45 threads on stuff you can try. Also the QMK firmware has a erase EEPROM hex you can use to wipe it.
Title: Re: Programming AMJ40 is making me sad
Post by: a-c on Tue, 24 January 2017, 02:07:12
Did you do a
Code: [Select]
make clean and recompile after changing the keymap?
Title: Re: Programming AMJ40 is making me sad
Post by: pigsu on Tue, 24 January 2017, 12:07:55
Odd, that worked perfectly! Thanks.

I an using dfu-programmer 0.6.1, so the command from the quantum tools (https://github.com/jackhumbert/qmk_firmware/tree/master/quantum/tools) is slightly different,
Code: [Select]
dfu-programmer atmega32u4 flash-eeprom eeprom_reset.hex rather than
Code: [Select]
dfu-programmer atmega32u4 flash --eeprom eeprom_reset.hex
EDIT: I wrote up the answer on SO (http://stackoverflow.com/questions/41788455/dfu-programmer-claims-completion-but-no-change-on-chip/41858867#41858867)
Title: Re: Programming AMJ40 is making me sad
Post by: odd on Tue, 24 January 2017, 17:00:54
Odd, that worked perfectly! Thanks.

I an using dfu-programmer 0.6.1, so the command from the quantum tools (https://github.com/jackhumbert/qmk_firmware/tree/master/quantum/tools) is slightly different,
Code: [Select]
dfu-programmer atmega32u4 flash-eeprom eeprom_reset.hex rather than
Code: [Select]
dfu-programmer atmega32u4 flash --eeprom eeprom_reset.hex

woowoo!!! Yay my first reply to someone asking for help and I managed to help someone out  :p
Title: Re: Programming AMJ40 is making me sad
Post by: OFred on Thu, 16 March 2017, 16:17:06
Hey Guy

I just bought this AMJ40 too !
pigsu I cheched what you did / wrote.
I'm on a Mac, installed everything needed (dfu-programmer included).

I can successfully do a
make dfu

Code: [Select]
dfu-programmer atmega32u4 erase --force
.....
Validating...  Success
0x4280 bytes written into 0x7000 bytes memory (59.38%).
dfu-programmer atmega32u4 reset

But now I'm wondering which file i need to modify to change the layout ? I saw some beautiful JS file, are they useful ?
Then I changed the keymap_default.c and make all / make dfu.
But nothing change. Which step did I miss?

I'm afraid that OS X configure the keyboard as a QWERTY keyboard and whatever I can change it will still be a QWERTY keyboard ?!

Thanks a lot for any feedback
Fred
Title: Re: Programming AMJ40 is making me sad
Post by: HeroXLazer on Thu, 16 March 2017, 22:42:54
I'm always sad when (trying to) programm(ing) anything...
Title: Re: Programming AMJ40 is making me sad
Post by: poang on Fri, 17 March 2017, 07:58:41
AMJ is silly B :D  u should buy CW40 from taobao  :D
Title: Re: Programming AMJ40 is making me sad
Post by: OFred on Fri, 17 March 2017, 13:07:20
Miracle I manage to program it !!!!  :eek:
The only key i did not find for now is the CMD (mac) key ....... what 's its name ?

/me close to be happy