Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Outputing the Link Regisister

2006-04-08 by Richard Duits

In gcc you can define a variable like this:
register unsigned int return_address __asm("lr");

This also prevents gcc from using the LR register in that function.

The RealView compiler has a intrinsic function to access the return 
address (and also one for the stack pointer). I don't know the exact 
name and I don't have manual with me right now.

Regards,
Richard.




fordp2002 wrote:
> I am doing development work on a PC that does not have a working
> printer port  (that is another story). My wiggler is therfore useless
> on this PC.
>
> I am writing just using the Philips Flash wrting program.
>
> I am getting on pretty well but I hit the Undef handler from time to
> time. Which in my case flashes a LED with a noticable pattern.
>
> What would be more useful is to know what code caused it so i though
> if I put the contents of the Link Regitser out on a serial port I
> already have then that would speed things up.
>
> Does anybody know how to get the contents of the Link Register into a
> 32 bit C Varible.
>
> Maybe I need a bit of inline assembeler ;)
>
> Thanks in advance.
>
>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.