AnsweredAssumed Answered

Splitting processing across multiple cores

Question asked by Jyothsna Rajan on May 1, 2019
Latest reply on May 6, 2019 by Jyothsna Rajan


I am working with the dual core MPC57xx processor and use NXP's S32DS IDE. Initially for proof of concept, I designed the entire application from start to end to be executed on one processor core. Fairly simple - in S32DS I chose only one processor core, used PE to specify my hardware and generate the pin mappings and do the basic interface/module setup, added all my source files to the project and generated the elf output that I then download to the core using PEMicro cyclone. All works good but the core is loaded to the hilt. To reduce the processing load, I now want to separate some low priority housekeeping tasks to the other core. 

In the S32IDE, a separate project is created for each core. Each project has its independent PE directory and requires code to be generated for each project. Documentation clearly states that PE generated code cannot be shared between the two core specific projects. 


Am looking for some guidance on how best to do this without duplicating code and effort.


What I would like to do is:

1. Create one project (independent of the core) and collocate all the source, header and PE beans 

2. Use switch in the source files to control which function runs on which core .

3. Use the linker file directives 

    a. to place core-specific code/data in the local memories of the core on which they execute allocate specifc regions within the SRAM for each cores code and data sections

    c. to allocate specifc memory to store common global data that will be accessed by either core

    d. generate a single ELF file for the complete application 

    e. start both cores with a single operation.

4. Be able to build the project  and debug , using the S32DS IDE  (as opposed to command line build)


Is it really necessary to create two separate projects and create redundant processor expert code for a single hardware unit when all I want is to have the two cores share the execution ?


Appreciate suggestions, caveats from all even if done for another processor type.


Thank you.