Skip to main content
Visitor II
July 17, 2025
Solved

Class B with Freetos runtime stack overflow detection fails

  • July 17, 2025
  • 3 replies
  • 370 views

Hi Team,

I am working on the Class B (V2.3.0)library for the STM32H7 series. It works fine without the notifier, but when I use the notifier, the stack section gets flushed, and the runtime stack test fails.

Please help me with this issue. Thank you in advance.

Regards,
Prakash R

    This topic has been closed for replies.
    Best answer by Petr Sladecek

    Hello,

    the library simply put a field of non trivial patterns at bottom of the stack defined at your project and check integrity of the field content periodically then. If this run time test fails, it is evident that your area reserved by you for the stack is not sufficient, appli faces stack overflow (the field was found overwritten during the appli run by the test). You need to extend the area at this configuration.

    Best regards,

    Petr

    3 replies

    ST Employee
    July 17, 2025

    Hello,

    the library simply put a field of non trivial patterns at bottom of the stack defined at your project and check integrity of the field content periodically then. If this run time test fails, it is evident that your area reserved by you for the stack is not sufficient, appli faces stack overflow (the field was found overwritten during the appli run by the test). You need to extend the area at this configuration.

    Best regards,

    Petr

    Prakash2Author
    Visitor II
    July 17, 2025

    Thank you for your response. I am new to the Class B library.

    Could you please guide me on where exactly I need to make the necessary extensions?
    Should I make changes in the linker script, specifically to _Min_Stack_Size?

    Regards,
    Prakash R

    ST Employee
    October 14, 2025

    Yes, the overflow checking patterns are stored at stack bottom section, so you need to tune its correct allocation at  RAM memory space via linker script