Add support for eclipse GDB

This pull request is to fix the problem where the "C/C++ GDB Hardware Debugging" eclipse plug-in hangs when attempting to debug.  It also adds some sanity checks when flashing.