# Compile error for multi core in CORTEX\_MPS2\_QEMU\_IAR\_GCC

**URL:** <https://forums.freertos.org/t/compile-error-for-multi-core-in-cortex-mps2-qemu-iar-gcc/23695>\
**Category:** Kernel\
**Created:** [August 7, 2025, 5:48am UTC](https://forums.freertos.org/t/compile-error-for-multi-core-in-cortex-mps2-qemu-iar-gcc/23695 "2025-08-07T05:48:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![javid](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@javid](https://forums.freertos.org/u/javid)\
**Post date:** [August 7, 2025, 5:48am UTC](https://forums.freertos.org/t/compile-error-for-multi-core-in-cortex-mps2-qemu-iar-gcc/23695/1 "2025-08-07T05:48:36Z")

</div>

Hi every one When I want to build the CORTEX\_MPS2\_QEMU\_IAR\_GCC in multi core option with "#define configNUMBER\_OF\_CORES 2 " I get error in complie that says some functions like portGET\_CORE\_ID or portYIELD\_CORE must be defiend. should i write this functions manualy?

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [August 7, 2025, 5:51am UTC](https://forums.freertos.org/t/compile-error-for-multi-core-in-cortex-mps2-qemu-iar-gcc/23695/2 "2025-08-07T05:51:54Z")

</div>

> [@javid](#):
>
> I get error in complie that says some functions like portGET\_CORE\_ID or portYIELD\_CORE must be defiend.

That is because the FreeRTOS Cortex-M3 port does not support SMP yet.

> [@javid](#):
>
> should i write this functions manualy?

You’ll need to add SMP support to Cortex-M3 port which will include implementing these macros (and several other things).

---

<div class="post-metadata">

**Author:** ![javid](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@javid](https://forums.freertos.org/u/javid)\
**Post date:** [August 7, 2025, 5:53am UTC](https://forums.freertos.org/t/compile-error-for-multi-core-in-cortex-mps2-qemu-iar-gcc/23695/3 "2025-08-07T05:53:53Z")

</div>

how can can I add SMP to my project?

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [August 7, 2025, 6:37am UTC](https://forums.freertos.org/t/compile-error-for-multi-core-in-cortex-mps2-qemu-iar-gcc/23695/4 "2025-08-07T06:37:08Z")

</div>

Depends on which hardware you are using. If you are using Cortex-M3 (assuming it because you mentioned CORTEX\_MPS2\_QEMU\_IAR\_GCC project), then you need to write SMP port for Cortex-M3. The following post has a good SMP porting checklist: [SMP Porting Checklist - A53 \*4 as reference](https://forums.freertos.org/t/smp-porting-checklist-a53-4-as-reference/14499).

If you are not tied to a specific hardware and want to try out SMP, you can use any of the following 2 hardware:

1. [XMOS XCORE AI](https://freertos.org/Documentation/02-Kernel/03-Supported-devices/04-Demos/XMOS/smp-demo-for-xmos-xcore-ai-explorer-board)
2. [Raspberry Pi Pico](https://freertos.org/Documentation/02-Kernel/03-Supported-devices/04-Demos/Raspberry-Pi/smp-demos-for-the-raspberry-pi-pico-board)

---

<div class="post-metadata">

**Author:** ![javid](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@javid](https://forums.freertos.org/u/javid)\
**Post date:** [August 7, 2025, 6:40am UTC](https://forums.freertos.org/t/compile-error-for-multi-core-in-cortex-mps2-qemu-iar-gcc/23695/5 "2025-08-07T06:40:15Z")

</div>

I am using -machine mps2-an385 -cpu cortex-m3

---

<div class="post-metadata">

**Author:** ![javid](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@javid](https://forums.freertos.org/u/javid)\
**Post date:** [August 7, 2025, 7:01am UTC](https://forums.freertos.org/t/compile-error-for-multi-core-in-cortex-mps2-qemu-iar-gcc/23695/6 "2025-08-07T07:01:39Z")

</div>

Is there any project that has done this before to i get some Idea about the codes that I should add?

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [August 7, 2025, 8:49am UTC](https://forums.freertos.org/t/compile-error-for-multi-core-in-cortex-mps2-qemu-iar-gcc/23695/7 "2025-08-07T08:49:05Z")

</div>

Here are the 2 FreeRTOS ports which support SMP:

- [FreeRTOS-Kernel/portable/ThirdParty/GCC/RP2040 at main · FreeRTOS/FreeRTOS-Kernel · GitHub](https://github.com/FreeRTOS/FreeRTOS-Kernel/tree/main/portable/ThirdParty/GCC/RP2040)
- [FreeRTOS-Kernel/portable/ThirdParty/xClang/XCOREAI at main · FreeRTOS/FreeRTOS-Kernel · GitHub](https://github.com/FreeRTOS/FreeRTOS-Kernel/tree/main/portable/ThirdParty/xClang/XCOREAI)
