MPC5748G Multi-core function call each other

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MPC5748G Multi-core function call each other

1,388件の閲覧回数
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,364件の閲覧回数
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,360件の閲覧回数
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 件の賞賛
返信