Skip to main content
ivan239955_stm1_stmicro_com
Associate III
July 2, 2010
Question

DEBUG and RELEASE version of StdPeriphLib 3.2.0

  • July 2, 2010
  • 3 replies
  • 668 views
Posted on July 02, 2010 at 13:14

DEBUG and RELEASE version of StdPeriphLib 3.2.0

    This topic has been closed for replies.

    3 replies

    ivan239955_stm1_stmicro_com
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 13:57

    Thank you, Stuart.

    Perhaps I will use assert_param if I have a debug problem.

    Do you think that IAR EWARM ignores this dummy function generated by non-defined

    USE_FULL_ASSERT

    ?
    swhite2
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 13:57

    The 'assert_param()' macro  is defined, in ST's code, in stm32f10x_conf.h. As you already know the USE_FULL_ASSERT define controls whether it evaluates to a function call or '((void)0)'. Most compilers will see the latter as pointless and not generate any code but you'd have to check this for whatever you're using. That is generate assembler listings for the library modules and have a look.

    In my (real world) code 'assert_param()' evaluates to a function that dumps the info out a serial port in debug builds (where USE_FULL_ASSERT is define in the project) but not in release builds. It has proved VERY valuable to me. In fact just a few days ago I discovered an issue, with one of the ST library functions, that I hadn't been aware of.

    I've spent a lot of time building a stable low-level platform for STM32 processors. It includes real fault handling (dumps CPU registers) and debug serial output routines. All that upfront effort has save me hours of debugging time. In fact I use the 'assert_param()' macro in my own code.

    swhite2
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 13:57

    Yes. I use IAR's EWARM 5.xx product and if USE_FULL_ASSERT isn't defined no extra code is generated.