Compile LUA in Developr Studio

Hello,

I downloaded Developer Studio 2.2.1

I would like to use OpenAT + Lua Plugin with my Fastrack XTEND modem

I get this Error during compilation
undefined reference to `luaW_openBytecodeTable’

I was trying with this versions of software:
Open AT Embedded Soft. Suite 2.35
Open AT OS 6.35
Firmware Package 7.45
Lua Plugin 2.1.0

and Other but I get the same problem.

Any ideas?

Thank you
Doron

Hi,

Can you please do the following modification in lua2flash.lua file and try again to build your application :

Go to the Developer Studio parent directory (by default it is C:\Program Files\Sierra Wireless\Developer Studio) -> plugins -> com.wavecom.openat.ide.luacompiler.win32_2.0.0.201102171614-R6456=>executables. Open the file “lua2flash.lua” and change the line:
local cmd = “$LUAC$ -o $TMP$ $FLASHFLAG$ $STRIPFLAG$ $SRC$ 2>&1” % options.
with
local cmd = “”$LUAC$" -o $TMP$ $FLASHFLAG$ $STRIPFLAG$ $SRC$ 2>&1" % options.

check if it works fine.

Thanks.

Thanks for the help I done this already
I am trying to build test empty project and have some problems I will be grateful if you can help me
After open new Lua Project and compile i get this error for missing function

src-bytecode\TestLua1_main.o: In function luaopen_TestLua1_main': ..\src-bytecode/TestLua1_main.c:19: undefined reference toluaW_openBytecodeTable’
Build error occurred, build is stopped

I add this two function that i think is missing I hope I am right:
luaW_openBytecodeTable
find_global

and now I can load the application to the modem but there is problem to find one of the module
My module.
error from console:

------------- Start Program -------------.
[MEM] Reserving 2600 bytes out of 104160 for 8-blocks pool
[MEM] Reserving 5160 bytes out of 104160 for 16-blocks pool
[MEM] Reserving 19320 bytes out of 104160 for 20-blocks pool
[MEM] Reserving 23160 bytes out of 104160 for 24-blocks pool
[MEM] Reserving 9000 bytes out of 104160 for 28-blocks pool
[MEM] Reserving 20560 bytes out of 104160 for 32-blocks pool
[MEM] Reserving 24360 bytes out of 104160 for 76-blocks pool
[LUAW] load library oatlua…[LUAW] load oatlua / generic
[LUAW] load generic / base
[LUAW] load generic / table
[LUAW] load generic / string
[LUAW] load generic / package
[LUAW] load generic / debug
[LUAW] load generic / time
[LUAW] load generic / misc
[LUAW] flashload ‘misc’ 0x2a064c… done.
[LUAW] load generic / os
[LUAW] load generic / schedtimer
[LUAW] flashload ‘schedtimer’ 0x299c50… done.
[LUAW] load generic / sched
[LUAW] flashload ‘sched’ 0x29aa40… done.
[LUAW] load generic / log
[LUAW] flashload ‘log’ 0x2a0e28… done.
[LUAW] load generic / mem
[LUAW] load generic / sms
[LUAW] flashload ‘sms_lua’ 0x2b1854… done.
[LUAW] load generic / at
[LUAW] flashload ‘at_lua’ 0x2ac3e0… done.
[LUAW] load generic / uart
[LUAW] flashload ‘uart_lua’ 0x2afffc… done.
[LUAW] load generic / pipe
[LUAW] flashload ‘pipe’ 0x29f7e0… done.
[LUAW] load generic / bit
[LUAW] load oatlua / wip
[LUAW] load wip / options
[LUAW] load wip / channels
[LUAW] flashload ‘channels_lua’ 0x2a3f2c… done.
[LUAW] load wip / bearers
[LUAW] flashload ‘bearers_lua’ 0x2aa254… done.
[LUAW] load wip / tcp
[LUAW] flashload ‘tcp_lua’ 0x2b0b10… done.
[LUAW] load oatlua / flash
[LUAW] load flash / flash_read
[LUAW] flashload ‘flash_read_lua’ 0x2a343c… done.
[LUAW] load flash / flash_write
[LUAW] flashload ‘flash_write_lua’ 0x2a1c20… done.
[LUAW] load flash / rawflash
[LUAW] flashload ‘rawflash’ 0x29dd70… done.
[LUAW] load flash / ad
[LUAW] flashload ‘ad_lua’ 0x2aded0… done.
[LUAW] load oatlua / interactive
[LUAW] load interactive / shell
[LUAW] flashload ‘shell’ 0x29726c… done.
[LUAW] load interactive / print
[LUAW] flashload ‘print’ 0x29e1c8… done.
[LUAW] load interactive / bootload
[LUAW] flashload ‘bootload’ 0x2a6e7c… done.
[LUAW] load interactive / at_plus_lua
[LUAW] flashload ‘at_plus_lua’ 0x2ac0c8… done.
uses 86616 bytes
[LUAW] load library strict…[LUAW] flashload ‘strict’ 0x296abc… done.
uses 1158 bytes

+LUALOG: “sched”,“DETAIL”,“RUN [thread 0x18121260]”

+LUALOG: “require”,“INFO”,“require ‘TestLua1.main’: begin”
[LUAW ERROR] *** src-lua\bootload.lua:190: Unable to load module TestLua1.main:
no field package.preload[‘TestLua1.main’]

Can’t load ‘TestLua1/main’ from network, DOWNLOAD_CONFIG not set


[LUAW] run(): error: src-lua\bootload.lua:190: Unable to load module TestLua1.main:
no field package.preload[‘TestLua1.main’]

Can’t load ‘TestLua1/main’ from network, DOWNLOAD_CONFIG not set

[LUAW] stack traceback:
[C]: in function ‘error’
src-lua\bootload.lua:190: in function ‘find_module_loader’
src-lua\bootload.lua:202: in function ‘require’
[string “require ‘TestLua1.main’; main()”]:1: in main chunk

+LUALOG: “sched”,“DETAIL”,“SIGNAL [thread 0x18121260].die”
------------- End Exit Program -------------.

Please advice how i can solve this problem.
Please Help.

Thanks
DZ

i am having the EXACT same issue as described above.

same modem, same firmware version, same Developer Studio version, same goal.

note this is NOT related to the compiler executable path and white space (i too already solved this issue) - the blank OpenAT Lua project doesnt even build.

can someone at Sierra Wireless please look into this issue? Lua seems like a great solution for embedded development on Open AT but support is pretty thin on the ground - a few working examples would be really helpful! (Lua project examples, not just C examples).

Hello,

Please see post https://forum.sierrawireless.com/t/compile-lua-in-developr-studio/5808/1
The LUA solution on OpenAT is no longer supported, and as such I would recommend you go for C/OpenAT directly or transition to AirLink ALEOS AF devices (who do support LUA)

Cheers