Multiple FreeRTOS instances in single Binary

Hi there,

I have a platform with multiple cores, that should run FreeRTOS independently, since the platform doesn’t support SMP well. My idea was to create multiple sperate FreeRTOS instances, but I have to have a single binary (elf). I’am not sure how to make this happen? We be happy if someone has a nice idea.

Best regards,
Chris

Does your platform have a single bootloader that could load images onto both cores? If not, then you can have a primary core that boots first while holding the secondary core in reset, then have the primary core load the image for the secondary core before releasing it from reset. Build the images for both cores separately, then just combine them into a single file (can just concatinate them provided the first image has a method of knowing where the second image starts within the single file).

What you want to do is to combine two applications, each using FreeRTOS, into one elf-file. FreeRTOS will not care about that as long as you develop the two applications as independent projects.
The questions you then need to answer is how you need to partition the memory of your platform and how to concatenate the images. The first is dependent on your chosen hardware, the second is dependent on you chosen build environment. You named none of those (and the FreeRTOS Kernel is agnostic of both).

Some more context as an answer. The platform I use (Infineon TC3x) has a non-uniform memory architecture, where each core has access to the complete memory map, but the timing is depended on, where the memory is located.
I was able to merge two hex files into one and to create the correct jumping. Now two instances run separately.
I also created a SMT port, which works nicely. So I can choose. :slight_smile: