Multiple Instance on Multicore

Hello , I’m new of FreeRTOS ,

I’m using it on Infineon AURIX , I’m able to run on 1 core only , i made small changes to the infineon port , selecting what core I want to use . It work fine , but now I would like to run more instances on 2 or more cores .

Can someone say to me how difficult it will be ?

Before proceeding with FreeRTOS application images, you should first verify that you can successfully load different application images on separate cores and ensure that interrupts are functioning correctly on each core. Once you have confirmed this, loading FreeRTOS application images should be straightforward.

Thank You aggarg ,

Yes I did and it works . For that I modified the application example supplied by Infineon ( the port was able to run on multiple core , but the application not ) .

For what I understood FreeRTOS is not re-entrant , there are some global variables on the code ( please correct me if I’m wrong ) . So I can’t link the same code to be used for more instance on more cores .

For some reason I can’t made different ELF , I must keep a single ELF .

Do you mean to say that you are able to load different binary images on different cores and they are working? In other words:

  • Core 0 is programmed with an image that blinks LED0.
  • Core 1 is programmed with an image that blinks LED1.

If yes, what is the problem in having FreeRTOS in those 2 binaries?

What is the reason? How are you programming 2 different cores with 2 different binaries then?

Sorry , I didn’t explain me crealy .

The infineon example work correctly on Core0 , but as soon as You set “configCPU_NR” to a different sore ( 1 or 2 ) , the example didn’t work .

I made some changes to the example and so I’m able to run FreeRTOS on Core0 or Core1 or Core2 , but one instance only .

About ELF file , I have only 1 single ELF ( of binary ) for all 3 cores . Technically it’s possible to generate 3 binary ( one for each core ) setting the Linker correctly , but it’s not my case , I can’t from requirements constraigh .

What I need to do is to run multiple instances ( for example 3 ) one running on single core .
I don’t need to share services ( times , mutex …. ) from cores . Just need to run instances separated .

Looking to the code , there are lot of global variables :

pxCurrentTCB , pxReadyTasksLists , xDelayedTaskList1 , xDelayedTaskList2 …… and so on …

So the code is not re-entrant , and code can’t be shared by different instances .

My question is if someone had my same request , and if find a way to solve it .

Thanks

If you need to run separate instances of FreeRTOS on separate core, you need to have separate binaries.