Choosing a development board for the Nitrokey Pro

The Programming the Nitrokey page mentions that you need a “development board equipped with a STM32F103TB and 128KB flash” and recommends the Olimex STM32-H103. I already have a development board with an ST-Link debugger, so I’d like to use that over DFU or JTAG. It seems complicated to get SWD working with the Olimex board, so I looked for alternatives. I found:

  • HY-TinySTM103T: seems to be similar to the Olimex board, but directly exposes the SWD interface
  • NUCLEO-F103RB: has an integrated ST-Link v2 debugger, but has an STM32F103RB.
  • some more expensive boards

The NUCLEO board does not have the same MCU, but as far as I can see, it just has more I/O pins than the TB version. So I should be able to run the Pro firmware on it, right? Do you have any other recommendations?

Hi,

when did you buy the Nitrokey Pro? Newer variants (about the time we began to advertise the Nitrokey as Nitrokey Pro 2) do not have the DFU interface anymore, so you need to use the other approach.

It is not in itself more complicated, but accessing the pin would need soldering or some good hands, as the USB port can not be used anymore. I suggest using a st-link v2. You can check which Pro you have by looking at the pad. If you have theses shown below, then you have the newer hardware version.

The PINs are as follows:

  5v  o
IO  o   o D- (USB, not needed for your purpose)
Clk o   o D+ (USB, not needed for your purpose)
 GND  o

Kind regards
Alex

Please note that the DFU approach is explained on Github in more detail. I’ll try to merge both instructions.

Hi Alex, thanks for the reply! I don’t want to modify my own Pro, I want to test the firmware on a development board.

Ah, I see. Okay, I’m out.

@szszszsz ?

Kind regards
Alex

1 Like

Hi @ireas !

According to this STM table, as long as prefix is STM32F103, and the available flash memory is 128K, it should work (e.g. everything up and right from STM32F103TB). Other models have higher memory capacity, or PIN pin count.

You may have the better outcome though with working on the Nitrokey Pro directly though, for a complete experience. Please keep in mind, that to mimic production setup you would have to connect to own hardware a SIM jacket, and an OpenPGP smart card. Additionally, current firmware is designed (intentionally) to not initialize, if it will not establish a working communication channel with the smart card, so will not work on a ‘bare’ development board, unless it would be modified of course. For the latter, AES-related and smart card-based authorization features will have to be simulated, which should be feasible.

Regarding your SWD-related issues, do you mean execution debugging? In case you mean only flashing, perhaps I could help.

Thanks for the reply, @szszszsz! I’d rather not use a Pro directly as I’m not very good at soldering. I’d rather destroy a card socket worth 1 EUR (or maybe use a card socket on a breakout board) than a Nitrokey worth 50 EUR. Also, with a development board, I could test simpler examples.

1 Like

I just ordered a XNUCLEO-F103RB. Let’s see how that works out.