Hello, i have found a jump function on these forums that i have implemented on a TMS320F28335 for a bootloader project and all works fine
void AsmJump (Uint32 address){
__asm(" SETC INTM\n"
" ZAPA\n"
" MOV @SP,#0\n"
" PUSH ACC\n"
" PUSH AL\n"
" MOV AL, #0x0a08\n"
" PUSH AL\n"
" MOVL XAR7, #0x330000\n" //jump to 0x330000 in flash memory
" PUSH XAR7\n"
" POP RPC\n"
" POP ST1\n"
" POP ST0\n"
" POP IER\n"
" POP DBGIER\n"
" LRETR\n");
}
however where the address is hard coded i would like to be able to call the function with an address parameter and pass this into the inline assembly and get the same results. I have found that the C variable cannot be directly referenced. How else can i do this?
Thanks
Michael