[Newbie and DONE] Building an Ortholinear mechanical keyboard

Le Barde

02 Feb 2019, 13:53

Thanks for your answer, but I don't see what to do with the diodes...

User avatar
Laser
emacs -nw

02 Feb 2019, 14:15

Elegance beats everything, get an arduino micro :P

User avatar
Laser
emacs -nw

03 Feb 2019, 18:04

Another alternative (says it has 6 extra pins compared to the Pro Micro): https://candykeys.com/product/elite-c

User avatar
Muirium
µ

03 Feb 2019, 20:45

USB C, cool. They say the USB pins are broken out (copied to their own pins on the board) which is a nice touch for hooking up your own socket elsewhere.
Image
If I was wiring a new board I’d give this a try.

User avatar
Laser
emacs -nw

03 Feb 2019, 22:13

Yes Mu, how about a new build? :)

Le Barde

03 Feb 2019, 22:48

Thank you for your answers! For now, I think I will:
1. Try the hard solution (re-wire the switches), but I don't know how to proceed to do what matt3o suggested with the diodes.
2. If I don't understand / cannot do it due to pins limitations / don't manage to do it, I think I will go to Arduino Micro (clone) or a Teensy 2.0 clone I found on Aliexpress.

If somebody has any clue for bullet 1. (diodes), this is still foggy to my mind! Thanks!

User avatar
matt3o
-[°_°]-

03 Feb 2019, 23:51

Le Barde wrote:
03 Feb 2019, 22:48
If somebody has any clue for bullet 1. (diodes), this is still foggy to my mind! Thanks!
The 14th switch is not 14:1 anymore but 1:6 so it should not be connected to the 13th. It becomes an incredibly complicated matrix that you have to lay down very carefully on paper first. Honestly I don't think it's worth the hassle. You are removing 2 columns but adding a row, so to make it really effective you should remove at least one more column.

Le Barde

04 Feb 2019, 10:26

Oh thank you very much matt3o, I think I understand now.

So, I currently have 15 columns and 5 rows, i.e. 15×5 = 75 keys, and 15+5 = 20 in/outs.
I want to have up to 18 in/outs with at least 75 keys.

$ 15×3 = 45
$ 14×4 = 56
$ 13×5 = 65
$ 12×6 = 72
$ 11×7 = 77 (bingo!)
$ 10×8 = 80 (OK)
$ 9×9 = 81 (OK)

So if I want to disturb the matrix as little as possible, I need to remove 4 columns and add 2 rows. This way I can manage to put my 75 keys!

Now I will try to remap the matrix, but it should not be too complicated.

User avatar
matt3o
-[°_°]-

04 Feb 2019, 10:29

Le Barde wrote:
04 Feb 2019, 10:26
So if I want to disturb the matrix as little as possible, I need to remove 4 columns and add 2 rows. This way I can manage to put my 75 keys!
as you said. BINGO!

Le Barde

04 Feb 2019, 13:05

OK! Here is a mapping I imagined. Don't hesitate to open the picture in full format because it is a bit tiny.

A little explanation: the rows (turquoise blue) don't have to be ordered because there is no diode on them. This is why I could choose C1R7 to be at that place. If I wanted to follow the turquoise row, I would have to put C1R7 where C9R7 is put. I did that to simplify the matrix.

What do you think of it? Do you think it is feasible?

I am also thinking of another solution. As the diodes have already been placed on my keyboard, I may also reformat the R6 and R7 rows. It may be better.

Image

Le Barde

04 Feb 2019, 13:19

I realize I made a little mistake. I misplaced the diodes as they are on the rows and not on the columns (see the former photo). In that way the current matrix should be OK: I only have to cut the rows to get the last 4 switches together, cut Row 3 in two, and reformat the columns.

If I have not forgotten something that should be feasible.

Le Barde

05 Feb 2019, 21:47

OK now I have wired everything. Normally it should be OK.
Image

Image

Image

Le Barde

05 Feb 2019, 21:57

I've got quite far now. I have git-cloned qmk and created my own keyboard directory. QMK is building fine, the Pro Micro card is recognized, but I get this with Avrdude:

Code: Select all

~# make lebarde:bepo:avrdude # with user ROOT
QMK Firmware 0.6.266
Making [1mlebarde[0m with keymap [1mbepo[0m and target [1mavrdude[0m

avr-gcc (GCC) 5.4.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Size before:
   text	   data	    bss	    dec	    hex	filename
      0	  17864	      0	  17864	   45c8	.build/lebarde_bepo.hex

Compiling: tmk_core/common/command.c                                                                [32;01m[OK][0m
Linking: .build/lebarde_bepo.elf                                                                    [32;01m[OK][0m
Creating load file for flashing: .build/lebarde_bepo.hex                                            [32;01m[OK][0m
Copying lebarde_bepo.hex to qmk_firmware folder                                                     [32;01m[OK][0m
Checking file size of lebarde_bepo.hex                                                              [32;01m[OK][0m
 * The firmware size is fine - 17864/28672 (10808 bytes free)
Detecting USB port, reset your controller now......
Detected controller on USB port at /dev/ttyACM0

Connecting to programmer: .
Found programmer: Id = "
?
?ÿÿ
"; type = S
    Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.

Programmer supports the following devices:
    Device code: 0x44

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: reading input file ".build/lebarde_bepo.hex"
avrdude: input file .build/lebarde_bepo.hex auto detected as Intel Hex
avrdude: writing flash (17864 bytes):

Writing | #########avrdude: error: programmer did not respond to command: set addr
####avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: write block
 ***failed;  
 ***failed;  
[...]
***failed;  
avrdude: Error: butterfly programmer uses avr_write_page() but does not
provide a cmd() method.
 *** page 127 (addresses 0x0000 - 0x007f) failed to write

 ***failed;  
 ***failed;  
 [...]
  ***failed;  
avrdude: Error: butterfly programmer uses avr_write_page() but does not
provide a cmd() method.
 *** page 127 (addresses 0x0080 - 0x00ff) failed to write

 ***failed;  
 ***failed;  
[...]
 ***failed;  
 ***failed;  
avrdude: Error: butterfly programmer uses avr_write_page() but does not
provide a cmd() method.
 *** page 127 (addresses 0x0100 - 0x017f) failed to write

 ***failed;  
[...]
 ***failed;  
avrdude: Error: butterfly programmer uses avr_write_page() but does not
provide a cmd() method.
 *** page 127 (addresses 0x0180 - 0x01ff) failed to write

 ***failed;  
 ***failed;  
[...] 
  ***failed;  
 ***failed;  
avrdude: Error: butterfly programmer uses avr_write_page() but does not
provide a cmd() method.
 *** page 127 (addresses 0x0200 - 0x027f) failed to write

 ***failed;  
 ***failed;  
 ***failed;  
[...] 
  ***failed;  
avrdude: Error: butterfly programmer uses avr_write_page() but does not
provide a cmd() method.
 *** page 127 (addresses 0x0280 - 0x02ff) failed to write

 ***failed;  
 ***failed;  
[...]
 ***failed;  
 ***failed;  
avrdude: Error: butterfly programmer uses avr_write_page() but does not
provide a cmd() method.
 *** page 127 (addresses 0x0300 - 0x037f) failed to write

 ***failed;  
 ***failed;  
[...] 
  ***failed;  
avrdude: Error: butterfly programmer uses avr_write_page() but does not
provide a cmd() method.
 *** page 127 (addresses 0x0380 - 0x03ff) failed to write

 ***failed;  
 ***failed;  
[...]
 ***failed;  
 ***failed;  
avrdude: Error: butterfly programmer uses avr_write_page() but does not
provide a cmd() method.
 *** page 71 (addresses 0x4548 - 0x45c7) failed to write

# | 100% 1.10s

avrdude: 17864 bytes of flash written
avrdude: verifying flash memory against .build/lebarde_bepo.hex:
avrdude: load data flash data from input file .build/lebarde_bepo.hex:
avrdude: input file .build/lebarde_bepo.hex auto detected as Intel Hex
avrdude: input file .build/lebarde_bepo.hex contains 17864 bytes
avrdude: reading on-chip flash data:

Reading | avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
#avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
# | 100% 0.13s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0x0d != 0x0c
avrdude: verification error; content mismatch

avrdude: safemode: Verify error - unable to read efuse properly. Programmer may not be reliable.
avrdude: safemode: Verify error - unable to read lfuse properly. Programmer may not be reliable.
avrdude: safemode: Sorry, reading back fuses was unreliable. I have given up and exited programming mode
avrdude: error: programmer did not respond to command: leave prog mode
avrdude: error: programmer did not respond to command: exit bootloader

avrdude done.  Thank you.

make[1]: *** [tmk_core/avr.mk:228: avrdude] Error 1
[31;01mMake finished with errors
[0mmake: *** [Makefile:545: lebarde:bepo:avrdude] Error 1
What do you think of this? Thanks!
Last edited by Le Barde on 07 Feb 2019, 14:12, edited 1 time in total.

User avatar
Laser
emacs -nw

05 Feb 2019, 22:20

With Pro Micros, I usually use `dfu-programmer` instead:

https://github.com/tmk/tmk_keyboard/wik ... -and-linux

Le Barde

07 Feb 2019, 11:52

@Laser Thank you for your answer!

So, I have tested quite a good things. I even think I had started to brick my Pro Micro card. It seems it is now OK.

1. It seems dfu-programmer never finds the board. How to target it?

Code: Select all

root# dfu-programmer atmega32u4 erase
dfu-programmer: no device present.
2. The best method I've found to do something is:
- Unplug/plug again the cable, then quickly
- Short twice the GND and RST pins, then quickly
- Run "avrdude -p atmega32u4 -P /dev/ttyACM1 -c avr109 -U flash:w:lebarde_bepo.hex" as root.

It ends with:

Code: Select all

Writing | ################################################## | 100% 0.89s

avrdude: 17864 bytes of flash written
avrdude: verifying flash memory against lebarde_bepo.hex:
avrdude: load data flash data from input file lebarde_bepo.hex:
avrdude: input file lebarde_bepo.hex auto detected as Intel Hex
avrdude: input file lebarde_bepo.hex contains 17864 bytes
avrdude: reading on-chip flash data:

Reading |                                                    | 0% 0.00savrdude: error: programmer did not respond to command: set addr
Reading | #                                                  | 1% 0.00savrdude: error: programmer did not respond to command: set addr
Reading | #                                                  | 2% 0.00savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ##                                                 | 3% 0.00savrdude: error: programmer did not respond to command: set addr
Reading | ##                                                 | 4% 0.01savrdude: error: programmer did not respond to command: set addr
Reading | ###                                                | 5% 0.01savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ###                                                | 6% 0.01savrdude: error: programmer did not respond to command: set addr
Reading | ####                                               | 7% 0.01savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ####                                               | 8% 0.01savrdude: error: programmer did not respond to command: set addr
Reading | #####                                              | 9% 0.01savrdude: error: programmer did not respond to command: set addr
Reading | #####                                              | 10% 0.01savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ######                                             | 11% 0.01savrdude: error: programmer did not respond to command: set addr
Reading | ######                                             | 12% 0.01savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | #######                                            | 13% 0.02savrdude: error: programmer did not respond to command: set addr
Reading | #######                                            | 14% 0.02savrdude: error: programmer did not respond to command: set addr
Reading | ########                                           | 15% 0.02savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ########                                           | 16% 0.02savrdude: error: programmer did not respond to command: set addr
Reading | #########                                          | 17% 0.02savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | #########                                          | 18% 0.03savrdude: error: programmer did not respond to command: set addr
Reading | ##########                                         | 19% 0.03savrdude: error: programmer did not respond to command: set addr
Reading | ##########                                         | 20% 0.03savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ###########                                        | 21% 0.03savrdude: error: programmer did not respond to command: set addr
Reading | ###########                                        | 22% 0.03savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ############                                       | 23% 0.03savrdude: error: programmer did not respond to command: set addr
Reading | ############                                       | 24% 0.03savrdude: error: programmer did not respond to command: set addr
Reading | #############                                      | 25% 0.03savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | #############                                      | 26% 0.04savrdude: error: programmer did not respond to command: set addr
Reading | ##############                                     | 27% 0.04savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ##############                                     | 28% 0.04savrdude: error: programmer did not respond to command: set addr
Reading | ###############                                    | 29% 0.04savrdude: error: programmer did not respond to command: set addr
Reading | ###############                                    | 30% 0.04savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ################                                   | 31% 0.04savrdude: error: programmer did not respond to command: set addr
Reading | ################                                   | 32% 0.04savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | #################                                  | 33% 0.05savrdude: error: programmer did not respond to command: set addr
Reading | #################                                  | 34% 0.05savrdude: error: programmer did not respond to command: set addr
Reading | ##################                                 | 35% 0.05savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ##################                                 | 36% 0.05savrdude: error: programmer did not respond to command: set addr
Reading | ###################                                | 37% 0.05savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ###################                                | 38% 0.05savrdude: error: programmer did not respond to command: set addr
Reading | ####################                               | 39% 0.05savrdude: error: programmer did not respond to command: set addr
Reading | ####################                               | 40% 0.05savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | #####################                              | 41% 0.06savrdude: error: programmer did not respond to command: set addr
Reading | #####################                              | 42% 0.06savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ######################                             | 43% 0.06savrdude: error: programmer did not respond to command: set addr
Reading | ######################                             | 44% 0.06savrdude: error: programmer did not respond to command: set addr
Reading | #######################                            | 45% 0.06savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | #######################                            | 46% 0.07savrdude: error: programmer did not respond to command: set addr
Reading | ########################                           | 47% 0.07savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ########################                           | 48% 0.07savrdude: error: programmer did not respond to command: set addr
Reading | #########################                          | 49% 0.07savrdude: error: programmer did not respond to command: set addr
Reading | #########################                          | 50% 0.08savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ##########################                         | 51% 0.08savrdude: error: programmer did not respond to command: set addr
Reading | ##########################                         | 52% 0.08savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ###########################                        | 53% 0.08savrdude: error: programmer did not respond to command: set addr
Reading | ###########################                        | 54% 0.08savrdude: error: programmer did not respond to command: set addr
Reading | ############################                       | 55% 0.08savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ############################                       | 56% 0.08savrdude: error: programmer did not respond to command: set addr
Reading | #############################                      | 57% 0.08savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | #############################                      | 58% 0.09savrdude: error: programmer did not respond to command: set addr
Reading | ##############################                     | 59% 0.09savrdude: error: programmer did not respond to command: set addr
Reading | ##############################                     | 60% 0.09savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ###############################                    | 61% 0.09savrdude: error: programmer did not respond to command: set addr
Reading | ###############################                    | 62% 0.09savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ################################                   | 63% 0.09savrdude: error: programmer did not respond to command: set addr
Reading | ################################                   | 64% 0.10savrdude: error: programmer did not respond to command: set addr
Reading | #################################                  | 65% 0.10savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | #################################                  | 66% 0.10savrdude: error: programmer did not respond to command: set addr
Reading | ##################################                 | 67% 0.10savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ##################################                 | 68% 0.11savrdude: error: programmer did not respond to command: set addr
Reading | ###################################                | 69% 0.11savrdude: error: programmer did not respond to command: set addr
Reading | ###################################                | 70% 0.11savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ####################################               | 71% 0.11savrdude: error: programmer did not respond to command: set addr
Reading | ####################################               | 72% 0.11savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | #####################################              | 73% 0.11savrdude: error: programmer did not respond to command: set addr
Reading | #####################################              | 74% 0.11savrdude: error: programmer did not respond to command: set addr
Reading | ######################################             | 75% 0.11savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ######################################             | 76% 0.12savrdude: error: programmer did not respond to command: set addr
Reading | #######################################            | 77% 0.12savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | #######################################            | 78% 0.12savrdude: error: programmer did not respond to command: set addr
Reading | ########################################           | 79% 0.12savrdude: error: programmer did not respond to command: set addr
Reading | ########################################           | 80% 0.12savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | #########################################          | 81% 0.13savrdude: error: programmer did not respond to command: set addr
Reading | #########################################          | 82% 0.13savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ##########################################         | 83% 0.13savrdude: error: programmer did not respond to command: set addr
Reading | ##########################################         | 84% 0.13savrdude: error: programmer did not respond to command: set addr
Reading | ###########################################        | 85% 0.13savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ###########################################        | 86% 0.14savrdude: error: programmer did not respond to command: set addr
Reading | ############################################       | 87% 0.14savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ############################################       | 88% 0.14savrdude: error: programmer did not respond to command: set addr
Reading | #############################################      | 89% 0.14savrdude: error: programmer did not respond to command: set addr
Reading | #############################################      | 90% 0.14savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ##############################################     | 91% 0.14savrdude: error: programmer did not respond to command: set addr
Reading | ##############################################     | 92% 0.14savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ###############################################    | 93% 0.15savrdude: error: programmer did not respond to command: set addr
Reading | ###############################################    | 94% 0.15savrdude: error: programmer did not respond to command: set addr
Reading | ################################################   | 95% 0.15savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | ################################################   | 96% 0.15savrdude: error: programmer did not respond to command: set addr
Reading | #################################################  | 97% 0.15savrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: set addr
Reading | #################################################  | 98% 0.16savrdude: error: programmer did not respond to command: set addr
Reading | ################################################## | 99% 0.16savrdude: error: programmer did not respond to command: set addr
Reading | ################################################## | 100% 0.16s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0x0d != 0x0c
avrdude: verification error; content mismatch

avrdude: safemode: hfuse changed! Was d8, and is now ff
Would you like this fuse to be changed back? [y/n] n
avrdude: safemode: efuse changed! Was fb, and is now ff
Would you like this fuse to be changed back? [y/n] n
avrdude: safemode: Fuses OK (E:FB, H:D8, L:FF)

avrdude done.  Thank you.

root@home:/mnt/red/dev/qmk_firmware#
What do you think of all this? I get stuck at this point. Thanks!

User avatar
Muirium
µ

07 Feb 2019, 12:24

Ugh. Pro Micros! Too cheap to give you a reset button!

The process is something like that. Keep trying, while waggling limbs and uttering prayers. I tried many times before it worked just once on the single Pro Micro I ever suffered!

Scottc’s Guide is the best there is:
viewtopic.php?f=7&t=8448

User avatar
Laser
emacs -nw

07 Feb 2019, 12:50

Le Barde wrote:
07 Feb 2019, 11:52
@Laser Thank you for your answer!

So, I have tested quite a good things. I even think I had started to brick my Pro Micro card. It seems it is now OK.

1. It seems dfu-programmer never finds the board. How to target it?

Code: Select all

root# dfu-programmer atmega32u4 erase
dfu-programmer: no device present.
First, use:

Code: Select all

 sudo dfu-programmer ...
... before all dfu-programmer commands (I hope you have sudo set up so it won't ask for password every time).

And second, make sure your Micro is in bootloader mode (I take you know how to reset it, since it seems to be somewhat recognized when you use other tools) - in any case, I do it like this: I have the command line prepared, and I keep a short wire between the Micro's GND and RST pins - so I keep the pins shorted. Then I remove the wire, and hit Enter on the command line. This always worked for me.

User avatar
matt3o
-[°_°]-

07 Feb 2019, 13:06

@Laser he is root. He doesn't need sudo.

@Le Barde, cut the excess wires on the controller. That is a short waiting to happen.

Also I generally use dfu-utils (not programmer), not sure it works on promicro but it never failed me otherwise.

User avatar
Laser
emacs -nw

07 Feb 2019, 13:08

Ah, I see now. I am so used of *not working as root* that I simply didn't see the hash prompt :)

Le Barde

07 Feb 2019, 13:25

Yooohooo! Got working at last.

What I did:

- I added "BOOTLOADER = caterina" in the rules.mk file.
- I ran "make lebarde:bepo:avrdude" as simple user. Had errors, then:

Code: Select all

~/dev/qmk_firmware$ avrdude -p atmega32u4 -P /dev/ttyACM1  -c avr109  -U flash:w:lebarde_bepo.hex
Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
    Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.

Programmer supports the following devices:
    Device code: 0x44

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: reading input file "lebarde_bepo.hex"
avrdude: input file lebarde_bepo.hex auto detected as Intel Hex
avrdude: writing flash (17838 bytes):

Writing | ################################################## | 100% 1.33s

avrdude: 17838 bytes of flash written
avrdude: verifying flash memory against lebarde_bepo.hex:
avrdude: load data flash data from input file lebarde_bepo.hex:
avrdude: input file lebarde_bepo.hex auto detected as Intel Hex
avrdude: input file lebarde_bepo.hex contains 17838 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.14s

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

avrdude: safemode: Fuses OK (E:FB, H:D8, L:FF)

avrdude done.  Thank you.
And now:

Code: Select all

lebarde@home:~/dev/qmk_firmware$ lsusb
[...]
Bus 001 Device 069: ID cdcd:7575  
[...]
cdcd:7575 is the right device!

So now I can type things on the keyboard (but it is ugh... messy). Woohoo!

Le Barde

07 Feb 2019, 13:33

@matt3o thanks for your answer. I will cut the wires.
@muirium @Laser thank you both for your answers!

Now I've got a question about my mapping. My mapping is quite messy (although I understand it well). But it will become a headache to transform my key mappings into the tables in the keymap.c file. Is there a way to define tables and pass them into a function that will transform them into the right tables corresponding to the actual wire mapping?

User avatar
Muirium
µ

07 Feb 2019, 13:42

Good question. I have a messy matrix in an ortholinear board I didn’t design. The best I could come up with was a spreadsheet to spare me going completely crazy!

viewtopic.php?p=422407#p422407

An intermediate function, or a script, would definitely be more elegant.

Le Barde

07 Feb 2019, 13:49

I see! the matrix stings my eyes :-)

Maybe I should ask the qmk developers themselves.

Anakey

07 Feb 2019, 13:49

I would recommend using kbfirmware.com it is built to use an old version of QMK firmware however it will still be able to generate the matrix files that you will need as you can exactly set the row/column pins of each individual switch so is useful for complex matrices including vintage boards.

I made a post a few months back detailing the steps to do on kbfirmware

viewtopic.php?p=428802#p428802

Le Barde

07 Feb 2019, 14:04

OK, issue posted on Github.

Thank you @anakey! I will look into this!

Le Barde

07 Feb 2019, 14:28

So I've produced a keymap showing translation into the actual matrix:

Image

Anakey

07 Feb 2019, 14:36

remember that the matrix will start at 0 if using the kbfirmware so your top left switch will be R0C0.

Anakey

07 Feb 2019, 14:58

Ok so now that you have made the matrix map i can see how to set the .h file that will define the matrix for your keymap.

This is the example taken from the .h file of the xd75

Code: Select all

#define KEYMAP( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E,\
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E,\
    K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E,\
    K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E \
) { \
    { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
    { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \
    { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \
    { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \
    { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E }  \
}
This is what you would need to do for your matrix

Code: Select all

#define KEYMAP( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K50, K51, K52, K53,\
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K54, K55, K56, K57,\
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K59, K58, K69, K68,\
    K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K60, K61, K62, K63,\
    K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K64, K65, K66, K67 \
) { \
    { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \
    { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A }, \
    { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A }, \
    { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A }, \
    { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A }, \
    { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, }, \
    { K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, }  \
}
The lower code how the switches are wired, the upper code is the actual physical layout of the switches which the keymap.c is based on.

Le Barde

07 Feb 2019, 15:09

Wow! As simple as a macro. @Anakey, love forever :-)
@Muirium: You've got your answer!

I think I'll have to adapt this because I forgot I have flipped the keyboard upwards, so that Row 5 is actually Row 0. So it I guess it would become:

Code: Select all

#define KEYMAP( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K50, K51, K52, K53,\
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K54, K55, K56, K57,\
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K59, K58, K69, K68,\
    K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K60, K61, K62, K63,\
    K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K64, K65, K66, K67 \
) { \
    { K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, },  \
    { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, }, \
    { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A }, \
    { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A }, \
    { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \
    { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A }, \
    { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A } \
}
I am going to test it at once!

User avatar
Muirium
µ

07 Feb 2019, 15:36

Cool! I simply bodged a solution from the tools I already knew, which was strictly Soarer’s Controller.

Seeing as I’m meant to be redoing it with Bluetooth, and I’m getting more comfortable with TMK, I ought to do it properly.

Post Reply

Return to “Keyboards”