I have created static library into the STM32CUBE IDE. .a and header files are taken from this and added into the test project where only timer and uart are enabled.
When library is added into the project it compiled successfully. When I used into the code that time it gave hardfault error in debug.
I have attached snapshot of error below.
Thanks in advanced...!
First you should enable Usage, Bus and Mem Fault in SHCSR to get better info. Then check the exception address and maybe the last LR to find out the last opcode.