cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F107 ethernet demo rebuild problem

jay
Associate
Posted on February 27, 2015 at 16:31

Has any body rebuilt the STM32F107 LwIP TCP/IP demo (STSW-STM32026)   in latest IAR EWARM toolchain ? The demo provided by ST still uses IAR 5.42 ( old one). This creates errors when I try to rebuild with IAR 6.30. Any suggestions ? 

#ethernet #stm32f107
4 REPLIES 4
Posted on February 27, 2015 at 17:04

Any suggestions ?

Read what the error messages tell you, and address/fix those issues? Start with the first ones and move forward incrementally. Start with the obvious project related issues like defines and include paths.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
jay
Associate
Posted on February 27, 2015 at 19:24

Hi Clive1, thanks for your quick reply & interest. Let us talk about errors I get !

Earlier I noticed that it concerned with only core_cm3.h file so I replaced it with new one . Then if I rebuild the same I get following errors -

Error[Pe065]: expected a '';'' C:\ST projects\stsw-stm32026-TCPIP\STM32F107_ETH_LwIP_V1.0.0\Libraries\CMSIS\Core\CM3\core_cm3.h 896

The code is -

/** \brief  Set Priority Grouping

  This function sets the priority grouping field using the required unlock sequence.

  The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field.

  Only values from 0..7 are used.

  In case of a conflict between priority grouping and available

  priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set.

    \param [in]      PriorityGroup  Priority grouping field

 */

static __INLINE (

cursor is here

)void NVIC_SetPriorityGrouping(uint32_t PriorityGroup)

{

  uint32_t reg_value;

  uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07);               /* only values 0..7 are used          */

  reg_value  =  SCB->AIRCR;                                                   /* read old register configuration    */

  reg_value &= ~(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk);             /* clear bits to change               */

  reg_value  =  (reg_value                                 |

                ((uint32_t)0x5FA << SCB_AIRCR_VECTKEY_Pos) |

                (PriorityGroupTmp << 8));                                     /* Insert write key and priorty group */

  SCB->AIRCR =  reg_value;

}

 

As this is core CMSIS file, I do not think there is an error ! What is your opinion ?

Well, I also appeal to ST people to change the demo files so that it can be rebuilt without any errors with latest & not so latest version of IAR. ( the demos are of 2009 !)  

Thanks.

Posted on February 27, 2015 at 20:58

Well, I also appeal to ST people to change the demo files so that it can be rebuilt without any errors with latest & not so latest version of IAR. ( the demos are of 2009 !)  

 

Isn't this really IAR's problem, they after all released an IDE incapable of compiling projects from an earlier version? Do they offer a migration guide? Or support? A compatibility check box?

I'd look at how the __INLINE macro is defined.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
francescatodiego
Associate II
Posted on February 28, 2015 at 09:27

__INLINE define in file core_cm3.h

........
#elif defined ( __ICCARM__ )
#define __ASM __asm /*!< asm keyword for IAR Compiler */
#define __INLINE inline /*!< inline keyword for IAR Compiler. Only available in High optimization mode! */
#define __STATIC_INLINE static inline
......

I added the macro __INLINE to my project function and it works without compiler errors with IAR EWARM 7

Check the compiler options settings dialog