MPC5748G Multi-core function call each other

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MPC5748G Multi-core function call each other

1,386 次查看
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

标记 (1)
0 项奖励
回复
2 回复数

1,362 次查看
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 项奖励
回复

1,358 次查看
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 项奖励
回复