lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I have an embedded application where I am running Lua on Freescale Big Endiam CPU. At present I can only run script text files. I havent yet tried to make a build of Luac to run on the Freescale Target CPU.
I would much prefer if possible to build a Lua script binary on the PC using Luac that can then be downloaded and run on the target CPU. I realise that wont work for standard 5.1.4 Lua due at least to the big/little endiam issue. (Not sure if there would be any additional incompatibilites)
I came across a very old but interesting post from Luiz dating back to 2006
Can I just check that I am understanding this correctly ?
I am assuming if I try this lundump patch on my Target system, it would mean that I can use a totally standard luac build on the pc, use that to produce a lua script binary, then I would download that to my target board. The patched Target Lua would realise it is running on a big endian system, then it compares that to the binary header byte that says it was built on a big endian CPU, then do the appropriate byte swaps when it loads the binary image into RAM ?
I am fairly new to this stuff, so I could easy have got this completly wrong :), or am I on the right track ?
The original post from 2006 mentions that this patch is largely untested, does anyone have any experience or recollection of whether this patch worked OK ?
Regards Geoff