The long journey of the WhiteFox

User avatar
matt3o
-[°_°]-

17 Dec 2015, 17:09

the whitefox comes with a bootloader and with a standard layout pre-flashed.

I have some vanilla prototype PCBs though that are still without bootloader. I will bootload them eventually, but if anyone is interested I can give them away as is.

User avatar
f1xedgear

17 Dec 2015, 17:14

Halvar wrote: You can't flash the bootloader over USB, because the bootloader is the basic software that enables you to flash your actual firmware over USB. Teensies come with a preconfigured bootloader, but if you start with a raw micro controller, you have to flash the bootloader over the chip's ISP interface first.

You normally do that with a little hardware called ISP programmer. If you don't have one and only need it temporarily, there are Arduino sketches that turn an arduino into an ISP programmer.
So I incorrectly assumed the WhiteFox uses an ATMega 32u4, when it actually has a Kinetis K20x which lacks the DFU capabilities of the 32u4.

It looks like the ISP headers are easily accessed if you have a JTAG tool.

Matt_

17 Dec 2015, 20:18

matt3o wrote: the whitefox comes with a bootloader and with a standard layout pre-flashed.

I have some vanilla prototype PCBs though that are still without bootloader. I will bootload them eventually, but if anyone is interested I can give them away as is.
I have a few 65% cases in the works and a couple of Teensies on hand, so provided I can use them to bootload the controller I would love to get one if you want to part away with them!
Last edited by Matt_ on 19 Dec 2015, 15:52, edited 1 time in total.

User avatar
flabbergast

17 Dec 2015, 21:26

Matt_ wrote: I have a few 65% cases in the works and a couple of Teensies on hand, so provided I can use them to bootload the controller I would love to get one if you want to part away with them!
Teensies won't work for bootloading the WhiteFox (the atmel ones definitely not; the 3.* series might, but I haven't seen a firmware that could do that yet). You'll need a SWD debugger, e.g. ST-Link V2 ($5 from China over ebay) or j-link; or, for more hard-core people, Bus Pirate or mchck.

Matt_

17 Dec 2015, 21:36

Thanks for the advice! So this would do the trick? http://www.ebay.fr/itm/ST-Link-V2-debug ... SwPhdU7KGL

(or the same from adafruit)

User avatar
flabbergast

17 Dec 2015, 22:27

Yes, those would work. (Although the description says it's only for STM chips, they work on Freescale chips as well; I've just tried.)

However, now that I've tried again, I would recommend this one on ebay.fr, if you don't mind buying from Hong Kong. I have this one as well, and it emulates J-Link instead of ST Link. The difference is that ST Link is a "high-level adapter" (hla_swd protocol in openocd), whereas J-Link is actual swd protocol. You get better access to the debug functionality with swd. (For instance, it's possible to brick Freescale chips by writing a certain byte to a certain flash location (some security setting). It's not possible to do anything about this with hla_swd protocol, but it is sometimes possible to "unlock" with swd.)

This reminds me - when you'll be writing firmware to WhiteFox directly through a debugger, make damn sure you're writing correct firmware (the main thing is the FSEC byte, address 0x40c), because writing a wrong value there *can* brick the chip. This byte is normally within the bootloader portion, so there's no such problem when flashing the production boards via the bootloader.

Matt_

18 Dec 2015, 00:50

Thanks for the additional info flabbergast. I may need a bit more help when I decide to play with bare chips, but then I'll ask for it on a specific thread.

User avatar
matt3o
-[°_°]-

18 Dec 2015, 08:48

whitefox has this little guy for debugging

Image

Matt_

18 Dec 2015, 12:03

What kind of connector do you need to securely contact these pads? (I erroneously figured that flashing would be done through the row of pads on the right)

User avatar
flabbergast

18 Dec 2015, 13:51

These are tag-connect cables (info from haata). But I think the SWD connections are also brought out into the row of pads on the right (VSS (=GND), VDD (=3.3V) or 5V, DIO, CLK), visible on the pic on the massdrop page.

The tag-connect cables are expensive for me to get, I just intend to solder wires either to the tag-connect pads, or to the pads on the right. But they're perfect for solder-less production flashing.

User avatar
matt3o
-[°_°]-

18 Dec 2015, 13:59

flabbergast wrote: These are tag-connect cables (info from haata). But I think the SWD connections are also brought out into the row of pads on the right (VSS (=GND), VDD (=3.3V) or 5V, DIO, CLK), visible on the pic on the massdrop page.
they are indeed

User avatar
matt3o
-[°_°]-

18 Dec 2015, 17:57

I made a quick video on how to correctly mount costar stabilizers

Matt_

18 Dec 2015, 19:01

flabbergast wrote: These are tag-connect cables (info from haata). But I think the SWD connections are also brought out into the row of pads on the right (VSS (=GND), VDD (=3.3V) or 5V, DIO, CLK), visible on the pic on the massdrop page.

The tag-connect cables are expensive for me to get, I just intend to solder wires either to the tag-connect pads, or to the pads on the right. But they're perfect for solder-less production flashing.
I see. Nice to see the thought that went into the design.

User avatar
Lunatique

19 Dec 2015, 22:02

I'm very tempted by the White Fox, but in order to justify it when I already have the Leopold FC660 (which I love), I'll need to make sure the programmable aspect is indeed able to do what I need.

I posted this question at the input.club forum, but it's very slow there, so I'll ask here too:

I use TouchCursor for programming navigation onto the home row so when I’m writing, I can quickly navigate without leaving the home row. I’m contemplating whether to get the White Fox, and I think it’s only worth it if I can program it to do the same with the configurator firmware. So I’d like to know how I would go about doing these macros with the online configurator (I looked at it and read the forum threads, but still cant’ figure it out).

The simple stuff is easy, such as programming I, K, J, L to become the arrow keys when an activation key is held down. But there doesn’t seem to be a way do combo keys macro, such as programming the M key to perform CTRL+LeftArrow, and the , key to perform CTRL+RightArrow. Basically any macro combos with two or more keys doesn’t seem possible, or it isn’t clear how to do it with the online configurator.

Also, if I want to designate a key to be the fn key, what am I supposed to do? And once I make it the fn key, does that mean its original function is now lost? So let's say I make the right-control key the fn key, does it then become just the fn key and can no longer perform the control function?

What if I want to use a key as the fn/activation key only when I hold it down (such as how it works in TouchCursor, where I can hold down the spacebar and it becomes the activation/fn key only when held down, but if I simply tap it, it behaves like a normal spacebar)?

User avatar
matt3o
-[°_°]-

20 Dec 2015, 00:38

the firmware is pretty sophisticated, you can do most the things you are suggesting, the online configurator though still doesn't support all the features. That means that you have to edit the functionalities by hand in the text editor. Anyway I'll try to add better macro support in the coming weeks.

madmod

21 Dec 2015, 20:23

I would like to customize the TMK firmware to add some "Dual Role" modifier keys with different actions on tap vs hold as seen here.
https://github.com/tmk/tmk_keyboard/blo ... ydual-role

It looks like the WhiteFox TMK firmware project uses dfu-util to flash the firmware over USB. Can I modify the project with a custom keymap and flash it to the board with this alone, or do I need something like the Bus Pirate? Also if I do compile this will I need to remap anything for my True Fox layout or is the included keymap correct?

User avatar
matt3o
-[°_°]-

21 Dec 2015, 20:26

madmod wrote: It looks like the WhiteFox TMK firmware project uses dfu-util to flash the firmware over USB. Can I modify the project with a custom keymap and flash it to the board with this alone, or do I need something like the Bus Pirate? Also if I do compile this will I need to remap anything for my True Fox layout or is the included keymap correct?
you don't need the bus pirate, you just put the keyboard in debug mode and use dfu-util to flash the firmware (I would be surprised otherwise). You need to create the correct key mapping though, the one I see online is very barebone. I'll try to push all layouts when I get a minute.

madmod

21 Dec 2015, 20:35

Excellent thank you! I have been holding out for something like the WhiteFox with TMK firmware ever since getting into the custom keyboard scene a year ago. It will be amazing to replace my current Karibiner scripts with hardware that I can move around. :D

@lunatique Although my mappings will be fairly custom I will link to my fork once I've implemented my keymap to give you an example of how you can have a dual role fn key. Also TMK firmware supports full macros and even custom user functions giving you full control over the behavior of any key. The TMK keymap documentation is linked in my previous post.

User avatar
matt3o
-[°_°]-

21 Dec 2015, 20:41

Side note: I took the time to make the Official WhiteFox FAQ http://matt3o.com/whitefox-faq

I'll later work on proper website with tutorials and all.

User avatar
scottc

21 Dec 2015, 20:45

Some of the text of the FAQ is making me a bit worried... If I've bought the barebones kit, will I need to solder surface-mount components?

Matt_

21 Dec 2015, 21:08

Nice FAQ. Two remarks though:
Generally speaking you don’t need an expensive soldering kit. I started with a $8, 15 watt soldering iron and I was perfectly fine with it. If you plan on making more custom keyboards in the future you may want to invest in a soldering station, especially if you need to desolder.
I will not argue against your own experience, but wouldn't a 30-60W temperature-controlled iron be a safer choice? You can get one for about 20€ and it would probably prevent newbies from overheating components.
Take any solder in the 0.8mm (0.031″) thickness range, better if lead free.
Again, I will not argue against the fact that lead-free solder is better from an environmental point of view, but from a hobbyist's perspective leaded solder is quite easier to work with (flows better & melts at a lower temperature).

Matt_

21 Dec 2015, 21:10

scottc wrote: Some of the text of the FAQ is making me a bit worried... If I've bought the barebones kit, will I need to solder surface-mount components?
No, only switches and LEDs.

User avatar
flabbergast

21 Dec 2015, 21:45

Matt_ wrote:
Take any solder in the 0.8mm (0.031″) thickness range, better if lead free.
Again, I will not argue against the fact that lead-free solder is better from an environmental point of view, but from a hobbyist's perspective leaded solder is quite easier to work with (flows better & melts at a lower temperature).
I second this. The standard 40-60 leaded solder is much much easier to start with, especially with inexpensive, not-temperature-controlled, soldering irons.

User avatar
matt3o
-[°_°]-

22 Dec 2015, 00:05

scottc wrote: Some of the text of the FAQ is making me a bit worried... If I've bought the barebones kit, will I need to solder surface-mount components?
it was a gargantuan FAQ, maybe I wrote something wrong, but where do you read that you need to solder surface components? I thought it was clear that only switches need to be soldered.
Matt_ wrote: I will not argue against your own experience, but wouldn't a 30-60W temperature-controlled iron be a safer choice? You can get one for about 20€ and it would probably prevent newbies from overheating components.
With absolutely no soldering experience I started with a 15W iron and I was fine with that. That was to say that you don't need 200 euros soldering stations. I'm not suggesting that, I'm saying that it works. Later I suggest to take a $30-40 iron (they are usually 40-60Watt).
Again, I will not argue against the fact that lead-free solder is better from an environmental point of view, but from a hobbyist's perspective leaded solder is quite easier to work with (flows better & melts at a lower temperature).
I believe that if you get used to the unleaded since the beginning it is far better, but anyway let's leave that out.

User avatar
scottc

22 Dec 2015, 00:15

Sorry, I wrote that from my phone so was a bit brief and vague! This part:
What is the difference between barebone, kit and assembled options?

The barebone is for hardcore enthusiasts; it includes the case, the plate, the PCB and the stabilizers only. You have to add your switches and your keycaps.

The kit includes all the keyboard components: case, plate, PCB, stabilizers, switches, LEDs and USB cable. All surface mounted components (the ones that are really hard to solder at home) come already soldered, you need to solder the switches yourself and –if you want– the LEDs.

The assembled option brings a functional, fully assembled, FCC compliant keyboard to your door step. Plug the cable and start typing.
(emphasis from the original post, not mine)

I read this as three options, where:
- The barebones option has just the basics
- The kit option has the barebones plus switches and keycaps etc, and all surface-mount stuff pre-soldered (implying that the barebones doesn't have this)
- The fully assembled one has everything from #2 except assembled

Oh, one other nitpick! There's a misspelling - s/zaelio/zealio/g :P

User avatar
matt3o
-[°_°]-

22 Dec 2015, 00:20

scottc wrote:
I read this as three options, where:
- The barebones option has just the basics
- The kit option has the barebones plus switches and keycaps etc, and all surface-mount stuff pre-soldered (implying that the barebones doesn't have this)
- The fully assembled one has everything from #2 except assembled
mh okay. wow, you guys are touchy :)

later in the same FAQ
What components do I need to solder?

Only the switches and the LEDs (if you want to). All the tiny surface mounted components come already assembled.
anyway thanks for pointing that out, I'll fix that

User avatar
scottc

22 Dec 2015, 00:25

Sorry, I know I'm picky. :D I'm a programmer, meaning that I write a lot of technical documentation about the stuff that I create and I'm particularly picky about this sort of stuff. It reminds me of that joke about the programmer who's sent to the shop:

Image

User avatar
Muirium
µ

22 Dec 2015, 01:31

Guess I'm the shopper who's sent to the program… So much code throws me right off. I'm so used to reading and thinking in English that the vital inconsistencies in code get smoothed out by my comprehension filter, honed by a lifetime's work with humans!

User avatar
Hypersphere

22 Dec 2015, 01:50

Reminds me of the classic story of the programmer stuck in the shower because of the instructions on the shampoo bottle:

1. Lather
2. Rinse
3. Repeat

I suppose the programmer would have numbered the steps 10, 20, 30, but the result would be the same.

User avatar
kristofv
8088

22 Dec 2015, 14:04

nice FAQ, cleared some things up for me actually!

Post Reply

Return to “Workshop”