Compile error for multi core in CORTEX_MPS2_QEMU_IAR_GCC

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?

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

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

1 Like

how can can I add SMP to my project?

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.

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
  2. Raspberry Pi Pico
1 Like

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

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

Here are the 2 FreeRTOS ports which support SMP: