Thanks guys,
I checked the BX-call several times and debugged even in the the
THUMB-part. I overlooked however the result comes in Params[1].
Small step voor de ARM, large step for me...
Conrado
--- In lpc2000@yahoogroups.com, Tom Walsh <tom@o...> wrote:
>
> Robert Adsett wrote:
>
> >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.
> >
> >
> >
> Yes, and having a JTAG unit is a good thing! :-)
>
> TomW
>
> --
> Tom Walsh - WN3L - Embedded Systems Consultant
> http://openhardware.net, http://cyberiansoftware.com
> "Windows? No thanks, I have work to do..."
> ----------------------------------------------------
>Message
Re: Calling IAP-routines from thumb mode
2006-01-23 by conrado
Attachments
- No local attachments were found for this message.