kb45p - 45% prototype board (ALPS supported)

User avatar
flabbergast

14 Apr 2016, 17:29

Thanks guys!

Firmware: Yes, it's a bit tricky to set things up correctly, especially for those of you who have an old winavr installation still sitting on your drives ;)
I'll try to create a zip file with everything included, so you can just unpack and compile.

User avatar
chuckdee

16 Apr 2016, 00:46

I just purchased the last PCB from flabbergast, but he didn't have any plates left. I've gotten a couple of quotes, and wondered if anyone was interested in getting plates. I'd need at least 3 others to make it worth it.

User avatar
hasu

20 Apr 2016, 03:01

I finally configured my keymap for this tiny and typing on it. I don't have case and plate and it is bare PCB just with rubber feet but not bad on desktop. I played with split space bar for a while, I love it and came to believe that there is nothing to lose for me and it is beneficial option for less key keyboard.

my current keymap here if someone are interested.
https://github.com/tmk/flabber_kbs/blob ... map_hasu.c

Thanks flabber!

Image
Image

ahhyes

25 Apr 2016, 00:17

edit: nevermind I the first post has the diode layout in the picture.

chuckadee - I'm interested in plates. i have some plastic ones at the moment but would like metal. Are you EU or US based?

User avatar
chuckdee

25 Apr 2016, 01:23

US Based.

User avatar
vivalarevolución
formerly prdlm2009

25 Apr 2016, 03:31

hasu wrote: I finally configured my keymap for this tiny and typing on it. I don't have case and plate and it is bare PCB just with rubber feet but not bad on desktop. I played with split space bar for a while, I love it and came to believe that there is nothing to lose for me and it is beneficial option for less key keyboard.

my current keymap here if someone are interested.
https://github.com/tmk/flabber_kbs/blob ... map_hasu.c

Thanks flabber!

Image
Image
That's an interesting look for sure, with the rubber bumps right on the PCB. Whatever works, I suppose.

Saikou0taku

26 Apr 2016, 01:07

Bought one second-hand and really digging the layout for a portable board, however I'm struggling to compile the FW and get the following:

make: *** boards/KB45P: Is a directory. Stop.


Any idea what I am doing wrong?

User avatar
chuckdee

26 Apr 2016, 01:10

flabbergast wrote: Pretty nice!

And it's true that it's not easy to even get ALPS keycaps with the right profiles, and almost impossible to get some with the right legends ;) Hopefully Alpine Winter will have been enough of a success that something similar is going to run again and we'll be able to get at least blanks for the more tricky keys.

Also: the compiling instructions are perhaps not so clear, and before the little bits get merged into TMK and Chibios, please use this for compiling:

1) getting an ARM toolchain plus development tools

ARM toolchain from here: https://launchpad.net/gcc-arm-embedded
You'll also need misc dev tools (make, grep, ...); these are either: http://www.mingw.org/wiki/msys
or: https://www.cygwin.com/

2) Getting the sources:

a) my sources for kb45p:
zip

b) tmk_core (newapi branch ATM):
zip

c) chibios (there's been some recent changes in chibios git that will make adjusting the sources inevitable; so you can use my branch which hasn't been updated to these (link below), or you can also probably use the latest stable chibios release):
zip

{These will change with time, as the code is being merged to upstream tmk and chibios, but at the moment these forks should be sychronised just right.}

Now unpack these: the directory structure you should end up with is:

Code: Select all

<empty_dir_of_your_liking>
   |-- flabber_kbs (unpacked and renamed contents of the zip from a)
   \-- tmk_core (unpacked and renamed contents of the zip from b)
         \-- tool/chibios/chibios (unpacked and renamed contents of the zip from c)
Now go to 'flabber_kbs/kb45p' and run 'make'. This should compile the firmware, and the resulting freshly built one is 'build/ch.bin'.
From earlier in the thread. You have to pay attention to the directory structure.

Saikou0taku

26 Apr 2016, 07:15

chuckdee wrote:
flabbergast wrote: Pretty nice!

And it's true that it's not easy to even get ALPS keycaps with the right profiles, and almost impossible to get some with the right legends ;) Hopefully Alpine Winter will have been enough of a success that something similar is going to run again and we'll be able to get at least blanks for the more tricky keys.

Also: the compiling instructions are perhaps not so clear, and before the little bits get merged into TMK and Chibios, please use this for compiling:

1) getting an ARM toolchain plus development tools

ARM toolchain from here: https://launchpad.net/gcc-arm-embedded
You'll also need misc dev tools (make, grep, ...); these are either: http://www.mingw.org/wiki/msys
or: https://www.cygwin.com/

2) Getting the sources:

a) my sources for kb45p:
zip

b) tmk_core (newapi branch ATM):
zip

c) chibios (there's been some recent changes in chibios git that will make adjusting the sources inevitable; so you can use my branch which hasn't been updated to these (link below), or you can also probably use the latest stable chibios release):
zip

{These will change with time, as the code is being merged to upstream tmk and chibios, but at the moment these forks should be sychronised just right.}

Now unpack these: the directory structure you should end up with is:

Code: Select all

<empty_dir_of_your_liking>
   |-- flabber_kbs (unpacked and renamed contents of the zip from a)
   \-- tmk_core (unpacked and renamed contents of the zip from b)
         \-- tool/chibios/chibios (unpacked and renamed contents of the zip from c)
Now go to 'flabber_kbs/kb45p' and run 'make'. This should compile the firmware, and the resulting freshly built one is 'build/ch.bin'.
From earlier in the thread. You have to pay attention to the directory structure.
GOT IT!!!!! thank you very much.

User avatar
flabbergast

26 Apr 2016, 08:19

Hi folks, because the above instructions point to github and the sources there get updated quite often, it may happen that the three repos are out-of-sync. So I've created just one archive with all the sources (including TMK and ChibiOS), you can download here, link below. Just unpack, 'cd kb45p' and 'make'.
https://dl.dropboxusercontent.com/u/638 ... sources.7z

You'll still need to get an ARM toolchain up and running.

User avatar
vivalarevolución
formerly prdlm2009

27 Apr 2016, 02:16

flabbergast wrote: Hi folks, because the above instructions point to github and the sources there get updated quite often, it may happen that the three repos are out-of-sync. So I've created just one archive with all the sources (including TMK and ChibiOS), you can download here, link below. Just unpack, 'cd kb45p' and 'make'.
https://dl.dropboxusercontent.com/u/638 ... sources.7z

You'll still need to get an ARM toolchain up and running.
Thank you, that is a useful simplification.

User avatar
chuckdee

03 May 2016, 04:19

Did anyone do this with Cherry switches?

User avatar
need

14 May 2016, 23:14

Mine with plywood plates:
RenderedContent-493DDD9A-0140-426D-BB2A-A4A3C696384B.JPG
RenderedContent-493DDD9A-0140-426D-BB2A-A4A3C696384B.JPG (126.61 KiB) Viewed 5223 times
RenderedContent-E5F10F9C-8A9B-4CC7-88D8-7F3255377471.JPG
RenderedContent-E5F10F9C-8A9B-4CC7-88D8-7F3255377471.JPG (107.69 KiB) Viewed 5223 times
I'm planning to play with the keymap later, but for now can I please know how to check the stock layout?

I'm having trouble in trying to find these symbols below

? " ! @ : -

also the "delete" key

Thanks

User avatar
flabbergast

14 May 2016, 23:20

You can see the default layout in the sources.

EDIT: Note that the symbols like @ is really 'shift+2'. 'minus' and 'equal' are missing from the current layout.
EDIT2: I've updated it now a bit, also the 'default-fw.bin' file (so you can flash that to get the layout that is now default). For the original one that was flashed in the shipped PCBs, you can see here.

User avatar
need

14 May 2016, 23:44

flabbergast wrote: You can see the default layout in the sources.

EDIT: Note that the symbols like @ is really 'shift+2'. 'minus' and 'equal' are missing from the current layout.
Thanks a lot, that's really helpful, I'm finding the stock layout quite intuitive.

I'm wondering how it produces @ when 'shift+2' is being put in , because I can't see it in the keymap.

Also, what do the abbreviations - TRNS and LGUI stands for ?

ahhyes

15 May 2016, 00:21

need wrote:
Also, what do the abbreviations - TRNS and LGUI stands for ?
TRNS - transparent, it means it just uses the key on the layer below.
LGUI - Windows key

User avatar
flabbergast

15 May 2016, 00:34

For @: I meant that you can't directly put that into the keymap without using macros, because a computer produces that symbol when it thinks that two keys are pressed ('shift' and '2'). No keyboard can produce just '@' as one keypress, because no computer would understand that.

So, to get '@' on (say) kb45p, you need to make the keyboard produce a 'shift' and '2'. 'Shift' has its own key, but to get '2' "keypress" you need to do 'FN0+W'. So all together it would be shift+fn0+w.

Of course you can write a macro that sends to a computer the following sequence ('shift' down, '2' down, '2' released, 'shift' released) which would then look like you're 'typing' @ { - on a US layout.}

User avatar
flabbergast

15 May 2016, 00:37

BTW, I should say - I really like what you guys made with the PCB. You're the best!

User avatar
need

15 May 2016, 02:41

flabbergast wrote: OK, so some instructions for flashing firmware on Windows.

When you enter the "bootloader" mode, a.k.a. "DFU mode", Windows should automatically install drivers (you can read about this on pages 7-8 of this pdf).
This may not exactly work for some reason (google "STM32 DFU bootloader windows driver" to see some reports).
However you should see something like "STM32 BOOTLOADER" or "STM32 device in DFU mode" in the 'device manager' under 'USB devices' or 'USB controllers'.

We'll need to replace this driver with a winusb one anyway. So, get zadig. Run it while the keyboard is plugged in *and* in DFU mode. Select the relevant "STM32 DFU" device from the drop down list (you may need to do "Options" -> "List all devices"). Select "winusb" driver in the list to the right of the green arrow. Punch "replace driver" or "install driver" button. This should install/replace the current driver for the DFU device with a winusb one - which is what's needed for dfu-util to work.

Second step: dfu-util. You can get a binary from here: dfu-util-static.exe. You can use this from the command line (get into one with <Win+R>cmd.exe<Enter>). Running 'dfu-util-static.exe -l' should list the STM32 DFU device (actually 2 of them).
I'm trying to flash the new keymap on win7, and I got winusb installed.
However for the second step, I got this error:
Untitled.jpg
Untitled.jpg (70.16 KiB) Viewed 5178 times
(dfu-til-static.exe is on my Desktop)

User avatar
chuckdee

15 May 2016, 04:23

If it's on your desktop, it's not in that directory. Your desktop directory is c:\users\<username>\desktop

User avatar
need

15 May 2016, 13:46

Thanks, the command works now.

However I didn't complete the whole process yesterday, which the keyboard still in bootloader mode. I connected it again today, it says Unknown Device, and it has no response at all when I hold the flashing button on the board in a hardware way. I tried uninstalling and disable the device, but it's the same result.

User avatar
flabbergast

15 May 2016, 17:43

To get to the bootloader, you need to hold the button when plugging in. If you could try this on another computer, that would be great (because this should work regardless of the firmware on the chip).

User avatar
need

15 May 2016, 21:30

It works on another computer both as a keyboard and on bootloader mode, but on this computer it works yesterday now it doesn't.
This particular computer seems like it doesn't respond to button holding at all.
I tried to uninstall the driver and plug it in again, but still showed as "Unknown device" with a cross next to it.

I'm trying to work on this computer, because winusb always "failed to install" on my computer that can recognize the keyboard. (Zadig)

I always seem to have so much trouble flashing things, I'm still stuck on flashing my diy soerer and Hasu ADB converter. Would you recommend having Ubuntu installed on my spare computer? (I don't do work on it, so it's pretty empty) I heard it's somehow better for programming things, and Windows seems so unstable.

User avatar
flabbergast

15 May 2016, 22:58

Definitely. If you can do things on linux, it would go much easier (basically no driver problems, easier to install development things). It may even be enough to run it in virtualbox.

User avatar
vivalarevolución
formerly prdlm2009

18 May 2016, 00:51

flabbergast wrote: Hi folks, because the above instructions point to github and the sources there get updated quite often, it may happen that the three repos are out-of-sync. So I've created just one archive with all the sources (including TMK and ChibiOS), you can download here, link below. Just unpack, 'cd kb45p' and 'make'.
https://dl.dropboxusercontent.com/u/638 ... sources.7z

You'll still need to get an ARM toolchain up and running.
I took this for a ride and can confirm that it is super easy to use rather than having to move and rename folders.

ahhyes

19 May 2016, 07:10

I just want to check before I try flashing the firmware (not sure if I can break it or not):

So the command

Code: Select all

dfu-util -a 0 -s 0x8000000 -D default-fw.bin
Gives the error:

Code: Select all

dfu-util: Invalid DFU suffix signature
Listing the devices gives:

Code: Select all

Deducing device DFU version from functional descriptor length
Found Runtime: [0a5c:217f] ver=0360, devnum=4, cfg=1, intf=3, path="1-1.4", alt=0, name="UNKNOWN", serial="78DD08B552AC"
Found DFU: [0483:df11] ver=2200, devnum=10, cfg=1, intf=0, path="2-1.2", alt=1, name="@Option Bytes  /0x1FFFF800/01*016 e", serial="FFFFFFFEFFFF"
Found DFU: [0483:df11] ver=2200, devnum=10, cfg=1, intf=0, path="2-1.2", alt=0, name="@Internal Flash  /0x08000000/032*0001Kg", serial="FFFFFFFEFFFF"
Should I be using

Code: Select all

-s FFFFFFFEFFFF or 0x08000000/032*0001Kg
?

User avatar
flabbergast

19 May 2016, 08:41

You have one more dfu-capable device attached (some bluetooth things are), so you need to select the right one (as you've figured out). I would go with specifying the VID:PID (that should be most reliable):

Code: Select all

-d 0483:df11

ahhyes

19 May 2016, 20:57

Thanks! I'll give it a go tonight.

Here's a preview of my plates:
Image

Stainless cut and laser engraved by lasergist.com. Was $50 for both plates shipped. Would've been really cheap, maybe $30 if I didn't bother with the laser engraving and I didn't chose any finishing extras.

User avatar
chuckdee

19 May 2016, 22:21

I'm using cherry, so I couldn't go with the default plates, which is why I'm having a harder time of it. Hopefully done soon.

User avatar
chuckdee

20 May 2016, 02:35

Render of my cherry top plates.

https://drive.google.com/file/d/0B2tKyf ... hHU2M/view

Flabbergast, did you have a keyboard-layout-editor layout for this board?

Post Reply

Return to “Workshop”