Skip to main content
raptorhal2
Lead
July 10, 2011
Question

stm32f10x_stdperiph_lib warning

  • July 10, 2011
  • 2 replies
  • 702 views
Posted on July 10, 2011 at 22:56

In my IAR EWARM version 6.20 STM32 library, both stm32f10x_rcc.c and stm32f10x_dma.c have duplicate #define FLAG_Mask statements, producing a warning at compile time.

I redefined the RCC statement and its usage to RCC_FLAG_Mask and all is well. Redefining the DMA statement and all DMA usage to DMA_FLAG_Mask will reduce the probability of application code tripping on the same warning.

This probably occurs on other development IDEs as well.

Cheers, Hal
    This topic has been closed for replies.

    2 replies

    rosarium
    Associate
    July 11, 2011
    Posted on July 11, 2011 at 10:16

    copy teh attached file at the following path and see if teh warnings are removed.

    C:\Program Files\IAR Systems\Embedded Workbench 6.0\arm\inc\c

    ________________

    Attachments :

    intrinsics.h : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hzgv&d=%2Fa%2F0X0000000beT%2FpsOj20vkB29P3xt.dVEWf3.YiATIA6ko5Ub5N.gKHj0&asPdf=false
    raptorhal2
    Lead
    July 11, 2011
    Posted on July 11, 2011 at 16:54

    I already have revision 43377 of intrinsics.h at that location. Your revision is 34635. Is there some reason to change to your revision ?

    My standard peripheral library version is 3.1.2. The ST web site now has version 3.5.0, and it also has the duplicate #defines. Since only a warning is produced, the code may execute OK, but even warnings should be fixed.

    ST-One - what say you ?