Hello,
I program on MKV56F1M0 and I want to debug a program whose role is to call a second program stored at another address of the chip.
I have two distinct projects but the second one is only to increment a variable at an address shared with the main program.
So I have :
SOFT_1 --> call --> SOFT2
SOFT_2 --> var increment --> SOFT_1
The problem is that when my SOFT_1 calls SOFT_2, my program returns a HardFault with an INVSTATE.
When I use the debugger in step by step with "Instruction Stepping Mode", my program enters well at the good address and increments my variable but on the other hand, if I let the program enter WITHOUT the step by step, then HardFault.
INVSTATE Indicates that the processor has tried to execute an instruction with an invalid Execution Program Status Register value. Ok... but what do I have to do to make sure this is not the case?
I don't know much about ARM so how can I debug this problem? Thank !