cancel
Showing results for 
Search instead for 
Did you mean: 

After includeing static libaray into the project hardfault is coming.

ADain.2
Associate II

0693W00000BbzeUQAR.pngHello community,

I have created a simple project for STM32F205VET6 in STM32CUBE ide. UART and Timer were enabled. Uart is enbled for debugging. I included static library created into the same IDE. When library is used into the project device is getting hard fault error with FORCED bit set.

I have no idea why the forced bit is getting set for. I am searching for the same on internet but no use.

I have created static library into stm32 cube IDE by following two processes mentioned below.

1- DM00629856 section 2.2.2

2-https://www.youtube.com/watch?v=ab9Tj2LbRUo

Can anyone tell me why this is happening? Why hard fault is coming when library is used into the project.

2 REPLIES 2
Nikita91
Lead II

Use the debugger to trace to the fault instruction inside the library!

Are you sure the library was generated for your MCU (thumb code, etc).

How did you debug your library before you use it in your application ?

Tried debugging but as soon as debugger starts it direct to Hard fault.

Yes! Library was generated for the same cortex of MCU(Thumb code)

I tried debugging the library with new project in stm32 cube IDE but same issue is coming. For testing only I am including libaray into the project.

Is there any specific process of debugging the library when used in the application?