pc-hosted: Make JTAG work.
This commit is contained in:
parent
8851504a41
commit
08bb4d5775
|
@ -98,7 +98,7 @@ void jtagtap_tdi_tdo_seq(uint8_t *DO, const uint8_t final_tms, const uint8_t *DI
|
|||
if(!ticks || !DI) return;
|
||||
|
||||
/* Reduce the length of DI according to the bits we're transmitting */
|
||||
DIl&=(1L<<(ticks+1))-1;
|
||||
DIl &= (1LL << (ticks + 1)) - 1;
|
||||
|
||||
s=snprintf((char *)construct,PLATFORM_MAX_MSG_SIZE,REMOTE_JTAG_TDIDO_STR,final_tms?REMOTE_TDITDO_TMS:REMOTE_TDITDO_NOTMS,ticks,DIl);
|
||||
platform_buffer_write(construct,s);
|
||||
|
@ -111,8 +111,8 @@ void jtagtap_tdi_tdo_seq(uint8_t *DO, const uint8_t final_tms, const uint8_t *DI
|
|||
}
|
||||
|
||||
if (DO) {
|
||||
for (unsigned int i = 1; i*8 <= (unsigned int)ticks; i++)
|
||||
DO[i - 1] = remotehston(2 , (char *)&construct[s - (i * 2)]);
|
||||
uint64_t DOl = remotehston(-1, (char *)&construct[1]);
|
||||
*(uint64_t *)DO = DOl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ static void _respond(char respCode, uint64_t param)
|
|||
/* Send response to far end */
|
||||
|
||||
{
|
||||
char buf[34];
|
||||
char buf[35]; /*Response, code, EOM and 2*16 hex nibbles*/
|
||||
char *p=buf;
|
||||
|
||||
gdb_if_putchar(REMOTE_RESP,0);
|
||||
|
@ -185,7 +185,7 @@ void remotePacketProcessJTAG(uint8_t i, char *packet)
|
|||
jtagtap_tdi_tdo_seq((void *)&DO, (packet[1]==REMOTE_TDITDO_TMS), (void *)&DI, ticks);
|
||||
|
||||
/* Mask extra bits on return value... */
|
||||
DO&=(1<<(ticks+1))-1;
|
||||
DO &= (1LL << (ticks + 1)) - 1;
|
||||
|
||||
_respond(REMOTE_RESP_OK, DO);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue