Yahoo Groups archive

Lpc2000

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

Message

Re: [lpc2000] Calling IAP-routines from thumb mode

2006-01-23 by Robert Adsett

At 11:36 PM 1/22/06 -0500, Tom Walsh wrote:
>I dunno, mine works and I didn't bother with ASM:
>
>======== begin C call to ID ============
>
>#define  IAP_LOCATION            0x7ffffff1
>
>typedef void (*IAP)(unsigned int [],unsigned int[]);
>unsigned int command_iap[5], result_iap[3];
>IAP   iap_entry;
>
>
>static int iapCommand (iap_calls_t command, int parm1, int parm2, int parm3)
>{ // execute ISP similar command via IAP calls.
>    iap_entry = (IAP) IAP_LOCATION;
>    switch (command) {
>....
>....
>       case IAP_READ_PART_ID:
>          command_iap [0] = 54;
>          disableIRQ(); iap_entry(command_iap,result_iap); enableIRQ();

That only works if the compiler uses a bx to call iap_entry.  Not all do 
and there is AFAIK nothing that would require a compiler to (keep) doing so.

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,   be 
they legal, genetic, or physical.  If you don't believe me, try to chew a 
radio signal. "  -- Kelvin Throop, III
http://www.aeolusdevelopment.com/

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.