conorpp / u2f-zero

U2F USB token optimized for physical security, affordability, and style
Other
2.41k stars 202 forks source link

Is the programmer are really required? #45

Closed ad-m closed 7 years ago

ad-m commented 7 years ago

Hello,

Silicon Labs EFM8UB11F16G-C-QSOP24 datasheet mention:

All devices come pre-programmed with a USB bootloader. This bootloader resides in the code security page and last pages of code flash; it can be erased if it is not needed.

Is there a way to program a microcontroller through USB without development board or debugger mentioned in Parts List?

Greetings,

ad-m commented 7 years ago

AN945: EFM8 Factory Bootloader User Guide mention:

All devices come pre-programmed with a UART (~500 bytes), SMBus (~500 bytes), or USB HID (~1.5 kB) bootloader. This bootloader resides in the code security page. If it's too large to fit in the code security page, it will also occupy the last pages of code flash. It can be erased if it is not needed.

conorpp commented 7 years ago

Hi,

The Silabs provided bootloader seems to start in the security page (64 bytes) then jump to regular program memory. Just about all of the program memory is used by the application so there's not really room for both. Maybe with some careful tinkering, it could be possible to fit both (USB HID code reuse between bootloader and application, etc). Another option could be to use the bootloader to load the application to configure the crypto chip and then overwrite everything when the final application is loaded. In this case, you can only program the final application once without the need of extra hardware.

So yes with some more work at least something in this direction could be worked out.

conorpp commented 7 years ago

Just added support to use USB HID bootloader. Extra functionality has to be remove for it all to fit. See wiki for instructions.