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 to __main

Hey guys, does someone knows why a branching to __main from the reset handler can causes the program to stop execution at a breakpoint. It branches fine to main but the __main scatter initialisation causes me trouble. Any cue?

Parents
  • It generates a usage fault : attempt to execute a coprocessor instruction NOCP bit gets up. Its bizzard because its a branch instruction and I havent modified anything in the startup file of Keil.

    LDR R0, =SystemInit BLX R0 LDR R0, =__main BX R0 --------------------------------> generates usage and hard fault ENDP

Reply
  • It generates a usage fault : attempt to execute a coprocessor instruction NOCP bit gets up. Its bizzard because its a branch instruction and I havent modified anything in the startup file of Keil.

    LDR R0, =SystemInit BLX R0 LDR R0, =__main BX R0 --------------------------------> generates usage and hard fault ENDP

Children