- added GiveIO support to the amt_jtagaccel driver
- explicitly disable loopback mode for FT2232 devices
- changed configuration options n[st]rst_delay to jtag_n[st]rst_delay
- shutdown network services on exit
git-svn-id: svn://svn.berlios.de/openocd/trunk@80
b42882b7-edfa-0310-969c-
e2dbd0fdcd60
case $host in
*-*-cygwin*)
case $host in
*-*-cygwin*)
is_win32=yes
AC_ARG_ENABLE(parport_giveio,
AS_HELP_STRING([--enable-parport_giveio], [Enable use of giveio for parport instead of ioperm]),
[parport_use_giveio=$enableval], [parport_use_giveio=no])
is_win32=yes
AC_ARG_ENABLE(parport_giveio,
AS_HELP_STRING([--enable-parport_giveio], [Enable use of giveio for parport instead of ioperm]),
[parport_use_giveio=$enableval], [parport_use_giveio=no])
-
- AC_DEFINE(IS_CYGWIN, 1, [1 if building for Cygwin.])
+
+ AC_COMPILE_IFELSE(AC_LANG_PROGRAM([],[return __MINGW32__;]),[is_mingw=yes],[is_mingw=no])
+ if test $is_mingw = yes; then
+ AC_DEFINE(IS_MINGW, 1, [1 if building for MinGW.])
+ parport_use_giveio=yes
+ is_cygwin=no
+ else
+ is_cygwin=yes
+ AC_DEFINE(IS_CYGWIN, 1, [1 if building for Cygwin.])
+ fi
+
AC_DEFINE(IS_WIN32, 1, [1 if building for Win32.])
;;
*-*-mingw*)
AC_DEFINE(IS_WIN32, 1, [1 if building for Win32.])
;;
*-*-mingw*)
#include "config.h"
#endif
#include "config.h"
#endif
+#include "replacements.h"
+
#include "jtag.h"
/* system includes */
#include "jtag.h"
/* system includes */
+#else
+#include "errno.h"
+#endif /* _WIN32 */
+
#include <string.h>
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#endif
#include <unistd.h>
#endif
+#if PARPORT_USE_GIVEIO == 1
+#if IS_CYGWIN == 1
+#include <windows.h>
+#include <errno.h>
+#undef ERROR
+#endif
+#endif
+
+#include "log.h"
+
/* configuration */
unsigned long amt_jtagaccel_port;
/* configuration */
unsigned long amt_jtagaccel_port;
+#if PARPORT_USE_GIVEIO == 1
+int amt_jtagaccel_get_giveio_access()
+{
+ HANDLE h;
+ OSVERSIONINFO version;
+
+ version.dwOSVersionInfoSize = sizeof version;
+ if (!GetVersionEx( &version )) {
+ errno = EINVAL;
+ return -1;
+ }
+ if (version.dwPlatformId != VER_PLATFORM_WIN32_NT)
+ return 0;
+
+ h = CreateFile( "\\\\.\\giveio", GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL );
+ if (h == INVALID_HANDLE_VALUE) {
+ errno = ENODEV;
+ return -1;
+ }
+
+ CloseHandle( h );
+
+ return 0;
+}
+#endif
+
int amt_jtagaccel_init(void)
{
#if PARPORT_USE_PPDEV == 1
int amt_jtagaccel_init(void)
{
#if PARPORT_USE_PPDEV == 1
amt_jtagaccel_port = 0x378;
WARNING("No parport port specified, using default '0x378' (LPT1)");
}
amt_jtagaccel_port = 0x378;
WARNING("No parport port specified, using default '0x378' (LPT1)");
}
+
+#if PARPORT_USE_GIVEIO == 1
+ if (amt_jtagaccel_get_giveio_access() != 0) {
+#else /* PARPORT_USE_GIVEIO */
if (ioperm(amt_jtagaccel_port, 5, 1) != 0) {
if (ioperm(amt_jtagaccel_port, 5, 1) != 0) {
+#endif /* PARPORT_USE_GIVEIO */
ERROR("missing privileges for direct i/o");
return ERROR_JTAG_INIT_FAILED;
}
ERROR("missing privileges for direct i/o");
return ERROR_JTAG_INIT_FAILED;
}
u8 latency_timer;
FT_STATUS status;
DWORD num_devices;
u8 latency_timer;
FT_STATUS status;
DWORD num_devices;
+ u8 buf[1];
+ DWORD bytes_written;
ftd2xx_layout_t *cur_layout = ftd2xx_layouts;
ftd2xx_layout_t *cur_layout = ftd2xx_layouts;
return ERROR_JTAG_INIT_FAILED;
ftd2xx_speed(jtag_speed);
return ERROR_JTAG_INIT_FAILED;
ftd2xx_speed(jtag_speed);
+
+ buf[0] = 0x85; /* Disconnect TDI/DO to TDO/DI for Loopback */
+ if (((status = FT_Write(ftdih, buf, 1, &bytes_written)) != FT_OK) || (bytes_written != 1))
+ {
+ ERROR("couldn't write to ftdi device: %i", status);
+ return ERROR_JTAG_INIT_FAILED;
+ }
if ((status = FT_Purge(ftdih, FT_PURGE_RX | FT_PURGE_TX)) != FT_OK)
{
if ((status = FT_Purge(ftdih, FT_PURGE_RX | FT_PURGE_TX)) != FT_OK)
{
COMMAND_CONFIG, NULL);
register_command(cmd_ctx, NULL, "reset_config", handle_reset_config_command,
COMMAND_CONFIG, NULL);
COMMAND_CONFIG, NULL);
register_command(cmd_ctx, NULL, "reset_config", handle_reset_config_command,
COMMAND_CONFIG, NULL);
- register_command(cmd_ctx, NULL, "nsrst_delay", handle_jtag_nsrst_delay_command,
+ register_command(cmd_ctx, NULL, "jtag_nsrst_delay", handle_jtag_nsrst_delay_command,
- register_command(cmd_ctx, NULL, "ntrst_delay", handle_jtag_ntrst_delay_command,
+ register_command(cmd_ctx, NULL, "jtag_ntrst_delay", handle_jtag_ntrst_delay_command,
COMMAND_CONFIG, NULL);
register_command(cmd_ctx, NULL, "scan_chain", handle_scan_chain_command,
COMMAND_CONFIG, NULL);
register_command(cmd_ctx, NULL, "scan_chain", handle_scan_chain_command,
- ERROR("nsrst_delay <ms> command takes one required argument");
+ ERROR("jtag_nsrst_delay <ms> command takes one required argument");
- ERROR("ntrst_delay <ms> command takes one required argument");
+ ERROR("jtag_ntrst_delay <ms> command takes one required argument");
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#define OPENOCD_VERSION "Open On-Chip Debugger (2006-07-30 13:30 CEST)"
+#define OPENOCD_VERSION "Open On-Chip Debugger (2006-08-01 12:00 CEST)"
#ifdef HAVE_CONFIG_H
#include "config.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
/* handle network connections */
server_loop(cmd_ctx);
/* handle network connections */
server_loop(cmd_ctx);
+ /* shut server down */
+ server_quit();
+
/* free commandline interface */
command_done(cmd_ctx);
/* free commandline interface */
command_done(cmd_ctx);
extern int add_service(char *name, enum connection_type type, unsigned short port, int max_connections, new_connection_handler_t new_connection_handler, input_handler_t input_handler, connection_closed_handler_t connection_closed_handler, void *priv);
extern int server_init();
extern int add_service(char *name, enum connection_type type, unsigned short port, int max_connections, new_connection_handler_t new_connection_handler, input_handler_t input_handler, connection_closed_handler_t connection_closed_handler, void *priv);
extern int server_init();
+extern int server_quit();
extern int server_loop(command_context_t *command_context);
extern int server_register_commands(command_context_t *context);
extern int server_loop(command_context_t *command_context);
extern int server_register_commands(command_context_t *context);
Linking to existing account procedure
If you already have an account and want to add another login method
you
MUST first sign in with your existing account and
then change URL to read
https://review.openocd.org/login/?link
to get to this page again but this time it'll work for linking. Thank you.
SSH host keys fingerprints
1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=.. |
|+o.. . |
|*.o . . |
|+B . . . |
|Bo. = o S |
|Oo.+ + = |
|oB=.* = . o |
| =+=.+ + E |
|. .=o . o |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)