Try to use Lua Script with MPC5748G on S32 DESIGN STUDIO

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

Try to use Lua Script with MPC5748G on S32 DESIGN STUDIO

1,149 次查看
PierreCahier
Contributor I

Hello,

I was trying to use lua scripts on my MPC5748G microcontroller.

For that to work, I have to compile the luaJIT library to create a file like libluajit.a and give it to the linker of S32 Design Studio. I use LuaJIT (https://github.com/LuaJIT/LuaJIT)

The first thing I have done is to compile it with MinGw (I work on Windows). It created me a libluajit.a with the right symbols (I seen them with the nm command). But with that method I compiled it for Windows and not cross-compiling it for my MPC5748G so it doesn't work.

The second thing I have tried is to merge the Makefile generated by S32DS to compile the code of my MPC5748G ans the Makefile used to compile LuaJIT. But I encountered a lot of error when I try to use powerpc-eabivle-gcc instead of classic gcc. An exemple of the errors I have :

 

 

powerpc-eabivle/bin/real-ld.exe: cannot find -lm

 

 

When I try to find that file on my computer, I find it but named powerpc-eabivle-real-ld.exe so I don't know if it's because he try to find another version of powerpc-eabivle-gcc or something else.

I haven't been able to find on Internet a good solution to resolve my problem and to do what I want.

If you have recommandations on how I can use Lua on my MPC5748G or to resolve the problem I have please help me.

标记 (3)
0 项奖励
回复
1 回复

1,110 次查看
petervlna
NXP TechSupport
NXP TechSupport

Hello,

I have never heard of anyone trying to do so.

the second thing I have tried is to merge the Makefile generated by S32DS to compile the code of my MPC5748G ans the Makefile used to compile LuaJIT

Not sure what you have done here.

But you simply compile your project files with the compiler supporting MPC5748G device. For example S32DS gcc compiler.

not sure how you added libluajit.a library files in the S32DS before compilation, but i would suspect issue just there.

Best regards,

Peter

0 项奖励
回复