Re: PowerPC port for company

Posted by BogdanM on
URL: http://elua-development.15.s1.nabble.com/PowerPC-port-for-company-tp7578410p7578412.html

Hi,

Quick answer to your questions: it's pretty much impossible to run (e)Lua in a system that doesn't support dynamic memory allocation, as Lua itself makes extensive use of that. Furthermore, I can't think of an acceptable way to modify Lua to satisfy this restriction. Sorry for the bad news.

Best,
Bogdan


On Mon, May 19, 2014 at 3:41 PM, billson555 <[hidden email]> wrote:
Hello,

I'm attempting a port of eLua for my company. We use micro's with the
PowerPC architecture. We also have a software platform that I need eLua to
work with. I have a few problems I'm hoping the community here might be able
to help with.

Our platform and specific micros do not support dynamic memory allocation,
or at least not heavily. We also don't have a file system. We also don't
support reentrancy. As such, I've been getting a lot of build errors which
seem related to these features. From what I've come across in trying to port
eLua, it seems memory allocation, file systems, and reentrancy are vital to
its function.

I have a few specific questions, if anybody can possibly help...

*1) *I've been getting a few errors about *malloc()* and *free()*.
Specifically, I'm getting some multiple definition errors between *malloc.o*
and *mallocr.o*, both of which are within *libc.a*. This isn't quite an eLua
problem, but I've been trying to prevent linking to *mallocr.o* since this
specific malloc deals with reentrancy, which we don't support. Does anybody
know if it is possible to prevent linking to a specific object file from
within a library file?

*2)* If the above question cannot be solved, I'm considering trying to
remove the dynamic memory allocation code from eLua. Our platform/micros
shouldn't support it anyways, and so I'm pushing the limits by trying any
solution that keeps the code included. But in the case I have to de-couple
any use of malloc, will this be critically detrimental to the proper
functioning of eLua?

*3)* I've been getting persistent errors with this thing called
*_impure_ptr*. The code in our GCC files say this thing is externally
defined, but I can't find anywhere where it is actually defined. Is it
possible we just aren't using enough/the right library files? I have tried
to removed the places in code where it was being used, but this only caused
a slew of more errors. Any advice on this?

Specifics that may be helpful: Using GCC and linker 4.7.2. Not using a build
system or tool chain, just a MS batch file. Running Windows XP, but other
desktops here are running Windos 7. We do not use all of newlib, but I don't
know quantitatively how much of it we use.

Thanks in advance for any help.



--
View this message in context: http://elua-development.2368040.n2.nabble.com/PowerPC-port-for-company-tp7578410.html
Sent from the eLua Development mailing list archive at Nabble.com.
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev