Skip to main content
ADain.2
Associate
June 25, 2021
Question

After includeing static libaray into the project hardfault is coming.

  • June 25, 2021
  • 2 replies
  • 1852 views

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.

This topic has been closed for replies.

2 replies

Nikita91
Lead II
June 25, 2021

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 ?

ADain.2
ADain.2Author
Associate
June 26, 2021

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?