diff options
author | drath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2007-07-15 11:19:33 +0000 |
---|---|---|
committer | drath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2007-07-15 11:19:33 +0000 |
commit | 1429d2c659ab9b84dee673e7697da7eab44a8f90 (patch) | |
tree | 03230f43a7404b1e22f0ffdafb69e41196808b30 /src/openocd.c | |
parent | 32c6d70f6acd41dd1af5ea73051dd6c8a46eac14 (diff) |
- added support for Asix Presto JTAG interface (thanks to Pavel Chromy and Asix for making this addition possible)
- added support for usbprog (thanks to Benedikt Sauter)
- make OpenOCD listen for WM_QUIT messages on windows (thanks to Pavel Chromy)
- register at_exit handler to do necessary unregistering (thanks to Pavel Chromy)
- added dummy ETM capture driver to allow ETM to be registered without a capture driver
git-svn-id: svn://svn.berlios.de/openocd/trunk@180 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/openocd.c')
-rw-r--r-- | src/openocd.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/openocd.c b/src/openocd.c index 035c166a..33f876b7 100644 --- a/src/openocd.c +++ b/src/openocd.c @@ -18,7 +18,7 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#define OPENOCD_VERSION "Open On-Chip Debugger (2007-06-28 12:30 CEST)" +#define OPENOCD_VERSION "Open On-Chip Debugger (2007-07-15 13:15 CEST)" #ifdef HAVE_CONFIG_H #include "config.h" @@ -57,6 +57,12 @@ int handle_version_command(struct command_context_s *cmd_ctx, char *cmd, char ** return ERROR_OK; } +void exit_handler(void) +{ + /* close JTAG interface */ + if (jtag && jtag->quit) jtag->quit(); +} + int main(int argc, char *argv[]) { /* initialize commandline interface */ @@ -99,6 +105,8 @@ int main(int argc, char *argv[]) command_set_output_handler(cmd_ctx, configuration_output_handler, NULL); + atexit(exit_handler); + if (jtag_init(cmd_ctx) != ERROR_OK) return EXIT_FAILURE; DEBUG("jtag init complete"); |