This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

BRANCHING INSTRUCTION

Dear All,

I am trying to add a boot loader for my LPC2478 based application.
I want to conditionally Branch to my main code at 0x1000 from the boot loader code.
When i tried from Startup.s as below

IMPORT __main ; LDR R0, =__main LDR R0, =0x1000 BX R0
it worked fine. Now the problem is that I cannot do the same from main().

This does not compile
int main(){

__asm{ LDR R0, =0x1000 B R0 }

}

generating following errors...

boot.c(8): error: #29: expected an expression
boot.c(8): error: #1097: Expected a [ or ]
boot.c(9): error: #114: label "R0" was referenced but not defined

PLS HELP...THANKS

0