Update README.md
This commit is contained in:
31
README.md
31
README.md
@@ -4,11 +4,11 @@ This repository contains the bootloader of the [Ultimate Hacking Keyboard](https
|
|||||||
|
|
||||||
The codebase of the bootloader actually resides in [targets/MK22F51212/src](targets/MK22F51212/src).
|
The codebase of the bootloader actually resides in [targets/MK22F51212/src](targets/MK22F51212/src).
|
||||||
|
|
||||||
## Build
|
## Building the bootloader
|
||||||
|
|
||||||
Install [Kinetis Design Studio](http://www.nxp.com/products/software-and-tools/run-time-software/kinetis-software-and-tools/ides-for-kinetis-mcus/kinetis-design-studio-integrated-development-environment-ide:KDS_IDE) (KDS) and import the project by invoking File -> Import -> General -> Existing Projects into Workspace, select the ` targets/MK22F51212/kds/freedom_bootloader` directory, and click on the Finish button. At this point, you should be able to build the firmware in KDS.
|
Install [Kinetis Design Studio](http://www.nxp.com/products/software-and-tools/run-time-software/kinetis-software-and-tools/ides-for-kinetis-mcus/kinetis-design-studio-integrated-development-environment-ide:KDS_IDE) (KDS) and import the project by invoking File -> Import -> General -> Existing Projects into Workspace, select the ` targets/MK22F51212/kds/freedom_bootloader` directory, and click on the Finish button. At this point, you should be able to build the firmware in KDS.
|
||||||
|
|
||||||
## Flash the bootloader
|
## Flashing the bootloader
|
||||||
|
|
||||||
First up, let's take care of the physical connections:
|
First up, let's take care of the physical connections:
|
||||||
|
|
||||||
@@ -28,21 +28,24 @@ erase
|
|||||||
|
|
||||||
Lastly, Use KDS to build and upload the firmware to the MCU.
|
Lastly, Use KDS to build and upload the firmware to the MCU.
|
||||||
|
|
||||||
## Upload the application firmware via the bootloader
|
## Uploading the application firmware via the bootloader
|
||||||
|
|
||||||
|
After the above steps, the UHK should enumerate as the bootloader over USB.
|
||||||
|
|
||||||
|
You can use the [blhost utility](/bin/Tools/blhost) to upload the [application firmware](https://github.com/UltimateHackingKeyboard/firmware) via the bootloader. Unfortunately, the Linux version of this tool does not seem to work due to the bug.
|
||||||
|
|
||||||
|
Alternatively, you can use the Windows-only [KinetisFlashTool](/master/bin/Tools/KinetisFlashTool/win) GUI application.
|
||||||
|
|
||||||
|
## Test firmwares
|
||||||
|
|
||||||
To test the bootloader a binary properly configured has been added to the root folder of this repository. This binary is based on the UHK_Right Firmware project.
|
To test the bootloader a binary properly configured has been added to the root folder of this repository. This binary is based on the UHK_Right Firmware project.
|
||||||
To understand these modifications and apply them to the current version of the UHK Right firmware, follow the procedure in "Adapting UHK Project to KBOOT.docx" (Work in progress...)
|
To understand these modifications and apply them to the current version of the UHK Right firmware, follow the procedure in "Adapting UHK Project to KBOOT.docx" (Work in progress...)
|
||||||
|
|
||||||
The device can be controlled and erased/programmed easily using
|
|
||||||
the blhost.exe tool provided by NXP and included in this repository. A GUI with a reduced set of features has also been created for Windows (KinetisFlashTool.exe).
|
|
||||||
|
|
||||||
## Key features
|
## Key features
|
||||||
|
|
||||||
- Communication through HID with any PC without the need of an additional driver.
|
* Communication through HID with any PC without the need of an additional driver.
|
||||||
- Automatic timeout and jump to user application without any action from the user.
|
* Automatic timeout and jump to user application without any action from the user.
|
||||||
- If no valid application is present, the bootloader will keep waiting for communication through the HID USB port.
|
* If no valid application is present, the bootloader will keep waiting for communication through the HID USB port.
|
||||||
- Every command sent to the bootloader includes a validation process inside the MCU to avoid any error in the communication.
|
* Every command sent to the bootloader includes a validation process inside the MCU to avoid any error in the communication.
|
||||||
- The memory area of the bootloader is protected, so even if the update fails, user just needs to do a Power on Reset (Plug and Unplug the Keyboard) in order to launch the bootloader again.
|
* The memory area of the bootloader is protected, so even if the update fails, user just needs to do a Power on Reset (Plug and Unplug the Keyboard) in order to launch the bootloader again.
|
||||||
- Smart reset behavior: If the MCU has been reset by the user (SW reset or Reset-pin-to-GND short) a timeout will be enabled.
|
* Smart reset behavior: If the MCU has been reset by the user (SW reset or Reset-pin-to-GND short) a timeout will be enabled. If the reset is a Power on Reset (meaning that the user has just connected the keyboard to the power) it will jump to the application firmware if its present on the memory.
|
||||||
If the reset is a Power on Reset (meaning that the user has just connected the keyboard to the power) it will jump to the
|
|
||||||
application firmware if its present on the memory.
|
|
||||||
|
|||||||
Reference in New Issue
Block a user