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

inline assembly usage

__asm
{ ldr pc,=addr
}

or

__asm
{ "ldr pc,=addr"
}

getting compilation error, pc replaced with r15 but not getting compiled any suggestions/references

Parents
  • >>Thats why specific in updating either directly in PC or R15

    And your experience with BX and BLX is that it doesn't change PC/R15? You could also use a function pointer to jump to arbitrary code or functions.

    The documentation I cited specifically states LDR can't use PC as a destination. The M3/M4 behave the same in this regard as do Cortex cores in TI or ST part.

Reply
  • >>Thats why specific in updating either directly in PC or R15

    And your experience with BX and BLX is that it doesn't change PC/R15? You could also use a function pointer to jump to arbitrary code or functions.

    The documentation I cited specifically states LDR can't use PC as a destination. The M3/M4 behave the same in this regard as do Cortex cores in TI or ST part.

Children