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?
Bad scatter file/memory ranges? Physically not functioning RAM? Bad address/data line? External memory not configured before scatter loading starts? Bad external memory configuration?
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
Found it!!! I havent selected - use microLIB in the project options.
That is why I prefer working with 8-bit mcus. Those newer chips are so much more difficult to comprehend and to program.