Yahoo Groups archive

Lpc2000

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

Message

RE: [lpc2000] Re: ARM_UCOS port and the use of stmfd/ldmfd

2005-09-21 by David Hawkins

> I guess you could do that, but that would add extra overhead to the 
> SWI calls.
> 
> AFAIK, the problem only applies to a few encodings of ldm/stm that you 
> don't use in normal use anyway. Therefore I don't see much need to 
> jump through hoops to accomodate it.

Thats what I am trying to determine.
 
> For calling APCS compilant (ie. C generated isrs) you do not have to 
> save all registers, only r0..r3. The called function will save any 
> other registers it needs itself.

Right, but if you are running an RTOS, then the C generated ISR
code is insufficient, since a context switch may occur as a
consequence of the interrupt. So in uCOS-II you need to save
all processor context, service the interrupts, and then restore
to the highest priority task. Since you basically have to store
all registers, it would seem that the ldm/stm instructions would
be the desired ones to use.

Dave

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.