# Error when I use FreeRTOS LTS with IAR EWARM 7.50

**URL:** <https://forums.freertos.org/t/error-when-i-use-freertos-lts-with-iar-ewarm-7-50/9299>\
**Category:** Kernel\
**Created:** [March 23, 2020, 10:37am UTC](https://forums.freertos.org/t/error-when-i-use-freertos-lts-with-iar-ewarm-7-50/9299 "2020-03-23T10:37:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tankist](https://avatars.discourse-cdn.com/v4/letter/t/50afbb/32.png) [@tankist](https://forums.freertos.org/u/tankist)\
**Post date:** [March 23, 2020, 10:37am UTC](https://forums.freertos.org/t/error-when-i-use-freertos-lts-with-iar-ewarm-7-50/9299/1 "2020-03-23T10:37:45Z")

</div>

I tryed to use the latest version of FreeRTOS LTS in IAR EWARM 7.50 (with Cortex-M7 core) and the compilatio process failed. There is an error in sources\portable\IAR\ARM\_CM7\portmacro.h file - my IAR can’t recognize macro “portFORCE\_INLINE inline **attribute** (( always\_inline))”. I changed it to just “portFORCE\_INLINE inline” and everything is correct. So it seems there is a bug in sources of FreeRTOS.

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [March 23, 2020, 3:09pm UTC](https://forums.freertos.org/t/error-when-i-use-freertos-lts-with-iar-ewarm-7-50/9299/2 "2020-03-23T15:09:41Z")

</div>

I just tried this with V8.42.1 of IAR’s tools and V10.3.1 of FreeRTOS by making a call to xPortIsInsideInterrupt(), which is declared as

```auto
portFORCE_INLINE static BaseType_t xPortIsInsideInterrupt( void )

```

and didn’t get any compiler warning.

portFORCE\_INLINE is implemented as:

```auto
#ifndef portFORCE_INLINE
	#define portFORCE_INLINE inline __attribute__ (( always_inline))
#endif

```

so I think there are two choices for you:

1. Update your compiler version, it is very old, or
2. Provide your own implementation of portFORCE\_INLINE in FreeRTOSConfig.h. That will mean the preprocessor will see your implementation and so not use the one in portmacro.h.

---

<div class="post-metadata">

**Author:** ![tankist](https://avatars.discourse-cdn.com/v4/letter/t/50afbb/32.png) [@tankist](https://forums.freertos.org/u/tankist)\
**Post date:** [March 31, 2020, 7:33am UTC](https://forums.freertos.org/t/error-when-i-use-freertos-lts-with-iar-ewarm-7-50/9299/3 "2020-03-31T07:33:06Z")

</div>

I can’t change my compiler you should understand. I fixed it by using redefinition of portFORCE\_INLINE in FreeRTOSConfig.h. It helps but it still looks like a bug - you’d better indicate which version of FreeRTOS is compatible to which compiler or you should support all versions.

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [March 31, 2020, 3:42pm UTC](https://forums.freertos.org/t/error-when-i-use-freertos-lts-with-iar-ewarm-7-50/9299/4 "2020-03-31T15:42:06Z")

</div>

Sorry, but it is simply not practical to support all versions. In the case of IAR that would require a different project file for every version, multiple versions of the linker script, and multiple versions of assembly files per target. We do however [keep every version of FreeRTOS available](https://github.com/FreeRTOS/FreeRTOS/releases), so you can go back to try and find one that matches your compiler version.
