Re: Fwd: Re: [patch] Add support for ARMv7M devices.

Jonathan Larmour
2012-04-16T14:28:05Z

On 16/04/12 08:55, Terry Guo wrote:
>
> Can somebody please tell me how the "guess" mechanism works? How can the
> buf_len in function process_g_packet become correct with "guess"?

Have a look at remote_read_description(), which is called early on when
connecting to the target. Once the target description (tdesc) is set from
there, subsequent calls to process_g_packet() will have an appropriate
value for sizeof_g_packet.

> Can we just make the arm-with-m.xml always include unnamed FPA registers? So
> that it can cope with the case with or without FPA registers.

I think that it might have been possible to arrange this if the FPA
registers happened to be sent at the very end of the "normal" register set
(courtesy of some handling in process_g_packet() of smaller 'g' packets).
But i don't think that's possible here given the FPA regs come after the
PC but before the XPSR at the end; at least not without adding much more
machinery somewhere, including extending the target description syntax. I
might be wrong though, as I don't know the ins-and-outs of this code as
well as others here.

Jifl
--
eCosCentric Limited http://www.eCosCentric.com/ The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
** Visit us at NEW:UK - the UK Embedded & Electronics Exhibition **
** ARM Partner Pavilion/Stand #114. 18-19 April. Birmingham NEC **
------["Si fractum non sit, noli id reficere"]------ Opinions==mine