MPC5748G Multi-core function call each other

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC5748G Multi-core function call each other

919 Views
oceansea
Contributor III

IDE:S32DS for Power 2.1

MCU:MPC5748G

I creat a MPC5748G Multi-Core project in the S32DS for Power;  

Creat a   testLINFlexD_2()  function in the core0 project  , but i  want call this function in core1 project ,how to do this?

oceansea_0-1702451428964.pngoceansea_1-1702451472700.png

 

haiyang

0 Kudos
Reply
2 Replies

895 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @oceansea 

these are independent projects, so core1 project doesn't know details about core0 project. If you want to share some functions, one solution is to create a table of pointers in core0 project which needs to be forced to certain constant address. Then you can just read the table from core1 and call shared function via pointer to function.

Obviously, an address of shared function can be changed after each update of the application, so you can't simply use absolute addresses for calling via pointer.

Regards,

Lukas

 

0 Kudos
Reply

891 Views
oceansea
Contributor III
hi,
thanks reply.
i see your opinion.
and, i try creat a table to do this, but now have a new problem.
i change the linker file ,add a custom section ,
but compile err ,in the follow topic:
https://community.nxp.com/t5/S32-Design-Studio/custom-section-in-the-linker-file/m-p/1773865#M11536
0 Kudos
Reply