Update README.md

This commit is contained in:
László Monda
2016-11-20 19:28:43 +01:00
committed by GitHub
parent c1d10855cc
commit 3867063bdc

View File

@@ -8,6 +8,28 @@ The codebase of the bootloader actually resides in [targets/MK22F51212/src](targ
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
First up, let's take care of the physical connections:
* make sure to power the UHK via USB,
* connect your [SEGGER J-Link debug probe](https://www.segger.com/jlink-debug-probes.html) to USB,
* connect SEGGER J-Link to one of the SWD ports of the right half of the UHK.
Next up, it's wise to explicitly erase the MCU because an application firmware might have already been uploaded via the bootloader, in which case the bootloader may treat the already existing CRC as valid, causing it not to timeout.
* Visit the [J-Link / J-Trace Downloads](https://www.segger.com/downloads/jlink) page. In the *J-Link Software and Documentation Pack* section click on the *Click for downloads*, then download and install the package of your operating system.
* Start up JLink.exe and type the following:
```
device MK22FN512xxx12
erase
```
Lastly, Use KDS to build and upload the firmware to the MCU.
## Upload the application firmware via the bootloader
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...)