> > buf_get_u32:
> >                return (((uint32_t)buffer[3]) << 24) |
> >                        (((uint32_t)buffer[2]) << 16) |
> >                        (((uint32_t)buffer[1]) << 8) |
> >                        (((uint32_t)buffer[0]) << 0);
> >
>
> I do not get this function at all... What I see is that it is presumed
> that host executing this code must be in the same endianess as the
> target who filled this buffer. Otherwise bytes get flipped.

I'm jumping into this discussion with something I hope will
be useful.

The JTAG functions use a sequence of 8 bit words to
represent the data that is being clocked in-out. It could have
been a sequence of, say, 32 or 64 bit words.

Now a sequence of 8 bit words happens to be identical to
little endian representation, which is a source of much confusion, I'd say.



--
Øyvind Harboe - Can Zylin Consulting help on your project?
US toll free 1-866-980-3434 / International +47 51 87 40 27
http://www.zylin.com/
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to