We tried to execute a small assembly instruction function in .asm file for M7 core controller in GHS.
But it initiated a hard fault exception with INVSTATE (Invalid state usage fault) bit is set when code started to execute the first instruction of assembly function in arm file.
When this same assembly instruction function added as part of C file by using _asm assembler, this assembly routine executed well without any issues.
Why this happen? |