OK, I have tested this patch with my other SWD patches, it works well.
But another code should be fixed too.
I want to query for how to fix it.
on "reset init" command, init_reset procedure in startup.tcl will be called:
proc init_reset { mode } {
jtag arp_init-reset
}
and then jim_jtag_arp_init_reset will be called to process "jtag
arp_init-reset".
But jim_jtag_arp_init_reset will call jtag_init_reset, which is not valid under
SWD mode.
I want to know how to fix it.
startup.tcl should detect current transport and call "jtag arp_init-reset" in
JTAG mode?
Or add a check in jim_jtag_arp_init_reset like below:
if (transport_is_jtag())
{
int e = jtag_init_reset(context);
if (e != ERROR_OK) {
Jim_Obj *eObj = Jim_NewIntObj(goi.interp, e);
Jim_SetResultFormatted(goi.interp, "error: %#s", eObj);
Jim_FreeNewObj(goi.interp, eObj);
return JIM_ERR;
}
}
simonqian.openocd
From: simonqian.openocd
Date: 2012-03-15 02:34
To: Tomek CEDRO
CC: openocd-devel; Peter Stuge
Subject: Re: Re: [OpenOCD-devel] make arm_adi_v5.c transport independent
First patch to review: no call jtag_add_reset regardless of the transport
selected.
simonqian.openocd
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel