Yahoo Groups archive

Lpc2000

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

Message

is IAP possible using ARM Mode..?

2005-10-25 by dhp_ec

hello all,
This is abt Flash Programming,,is onchip flash programming BY USING 
IAP, possible in ARM mode.?
i found a flash programming example by using IAP in THUMB Mode in the 
group 
here it is ...
**********************************************************************
static void callIAP(void) __attribute((naked));
static void callIAP(void)
{
  ///// fast way to get the address of flashParams[] directly into r0
  register void *pFP asm("r0") = flashParams;

  asm volatile(" mov r1, r0\n"       // copy &flashParams[] into r1
               " bx  %[iapLocation]" // 'bx' because IAP is Thumb mode
               :
               : "r" (pFP), [iapLocation] "r" (IAP_LOCATION)
               : "r1" );
}

/*********************************************************************

But as IAP is alaways called by a word pointer in register R0 
(pointing to RAM),so is this not possble in ARM MOde Right..?
If so then,how can i make changes so that this piece of code works 
for ARM mode..?

Am I right or missing something..?Pls suggest
regards
dp

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.