Added K22F support.

Signed-off-by: Chris Reed <flit@me.com>
Updated Kinetis flash blobs to latest versions as used in CMSIS-DAP.

Signed-off-by: Chris Reed <flit@me.com>
Flash driver improvements.

- Moved the Kinetis security check function to a new Flash_Kinetis base
  class, from which all Kinetis flash algos now derive.
- Improved security check to disallow an FOPT byte of 0x00.
- Removed specific Kinetis L-series flash algo classes in favour of a
  new Flash_klxx class, since the flash blob is the same for all current
  L-series devices.
- Changed Flash.programPage() to pass the length of the data array
  instead of a fixed page size, to allow to programming less than a full
  page, if the device supports it.

Signed-off-by: Chris Reed <flit@me.com>
Added unlock script for Kinetis devices.

Signed-off-by: Chris Reed <creed@freescale.com>
Remove whitespace
Fix python hang (on Windows) when an error occurred during the initial device init().

* Catch the exception and close down the interface, then reraise the exception so the program will not keep trying to use the failed board.

Signed-off-by: Chris Williamson <chris.williamson@freescale.com>
Fix a different python hang (on Windows) when an error occurred during the flash.init().

* No matter what, you have to call interface.close() to insure python.exe on Windows won't hang.

Signed-off-by: Chris Williamson <chris.williamson@freescale.com>
Merge branch 'master' into dev_frdm_support

* master:
  Modified a syntax error
  Update the details about the new test gdb_server.py
  Fix the interface mismatching of gdb_server.py
  Fixed a syntax error in chooseBoard
  fix a bug in mbed.py
  Fix a syntax error of the chooseBoard parameter
  delete some unwanted comment
  change the sleep time back to the origin
  add a new test case for gdb server
  Updates to fix syntax and broken example in gdb_test.py
  Fix the JIRA issue GCC32RM-303
  Fix the issue of two duplicate print
  Provide more information in -h for the -d option
  In python2.6 the INTERFACE[usb_backend].getAllConnectedInterface will return None instead of [], so add more condition to avoid it
  Fix the bug that sometimes the usb-driver will be blocked by pyocd, and add board id information in -l option
  fix some issue in JIRA GCC32RM-298
  Modified the exception handler to avoid unwanted exception
  New option feature added.
Update all the other kinetis flash blobs

-got the klxx.py from the KL25 flash algo
Updated K22F flash blob.

Signed-off-by: Chris Reed <creed@freescale.com>
Replaced unlock_kinetis.py script with more useful flash_tool.py.

Signed-off-by: Chris Reed <creed@freescale.com>
Fix the deadlock in resume function
Fix the exception for unknown cmd
Merge pull request #32 from ECNU3D/pyocd-improvements

[gdb server] Fix the deadlock in resume function
Added target NRF51822
Merge branch 'master' into pyocd-improvements
Updated basic_test.py with NRF51822
Enhance the monitor function
Merge pull request #34 from ECNU3D/pyocd-improvements

[gdbserver] Fix the exception for unknown gdb cmd and add enhancement for monitor cmd
Add supportted Mbed platform