Latest lua sources

Where can we find the latest lua source code that is used by OpenAT (it appears to be version 1.1.0.2010). The version posted here http://www.wavecom.com/modules/movie/scenes/forums/viewtopic.php?f=74&t=2722&p=9930&hilit=lua+scheduler#p9929 is quite outdated.

Thanks
chris

Hi,

indeed a newer version is available at http://people.anyware-tech.com/~fabien/oatlua.html. To durably keep up-to-date with the latest versions, I suggest that you follow the public svn repository: https://svn.anyware-tech.com/wavecom/openat-lua/oatlua/.

Where can we find the latest lua source code that is used by OpenAT?
I using Wavecom fasttrack supreme with open M2M stdio.
I am trying to use lua version 14 and after i compile oatlua lib i receiving this messages in target:

[LUAW][MEM] Reserving 2600 bytes out of 104160 for 8-blocks pool
[LUAW][MEM] Reserving 5160 bytes out of 104160 for 16-blocks pool
[LUAW][MEM] Reserving 19320 bytes out of 104160 for 20-blocks pool
[LUAW][MEM] Reserving 23160 bytes out of 104160 for 24-blocks pool
[LUAW][MEM] Reserving 9000 bytes out of 104160 for 28-blocks pool
[LUAW][MEM] Reserving 20560 bytes out of 104160 for 32-blocks pool
[LUAW][MEM] Reserving 24360 bytes out of 104160 for 76-blocks pool
[LUAW] load library base...uses 3246 bytes
[LUAW] load library table...uses 756 bytes
[LUAW] load library string...uses 1030 bytes
[LUAW] load library package...uses 1633 bytes
[LUAW] load library debug...uses 1396 bytes
[LUAW] load library strict...uses 2032 bytes
[LUAW] load library scheduling...uses 11072 bytes
[LUAW] load library timer...uses 869 bytes
[LUAW] load library options...uses 192 bytes
[LUAW] load library channels...uses 14765 bytes
[LUAW] load library bearers...uses 
5887 bytes
[LUAW] load library tcp...uses 4216 bytes
[LUAW] load library flash_read...uses 2488 bytes
[LUAW] load library flash_write...uses 6148 bytes
[LUAW] load library rawflash...uses 1271 bytes
[LUAW] load library bit...uses 546 bytes
[LUAW] load library shell...uses 13851 bytes
[LUAW] load library misc...uses 718 bytes
[LUAW] load library bootload...[LUAW][MEM] Failed to allocate 8 bytes
   ********************
   *** EMERGENCY GC ***
   ********************
  (81048 -> 81029)
[LUAW][MEM] Failed to allocate 12 bytes
   ********************
   *** EMERGENCY GC ***
   ********************
  (81045 -> 81045)
MALLOC FAILURE (12)
[LUAW][MEM] Failed to allocate 21 bytes
   ********************
   *** EMERGENCY GC ***
   ********************
  (81022 -> 74520)
uses 32 bytes
[LUAW] load library ad...uses 2341 bytes
[LUAW] load library at...[LUAW][MEM] Failed to allocate 108 bytes
   ********************
   *** EMERGENCY GC ***
   ********************
  (80335 -> 80335)
MALLOC FAILURE (108)
[LUAW][MEM] Failed to allocate 20 bytes
   ********************
   *** EMERGENCY GC ***
   ********************
  (80352 -> 78554)
uses 1665 bytes
[LUAW] load library mem...uses 64 bytes
[LUAW] load library print...[LUAW][MEM] Failed to allocate 652 bytes
   ********************
   *** EMERGENCY GC ***
   ********************
  (80352 -> 80333)
MALLOC FAILURE (652)
uses 0 bytes
[LUAW] load library sms...[LUAW][MEM] Failed to allocate 37 bytes
   ********************
   *** EMERGENCY GC ***
   ********************
  (80198 -> 80179)
[LUAW][MEM] Failed to allocate 26 bytes
   ********************
   *** EMERGENCY GC ***
   ********************
  (80216 -> 80216)
MALLOC FAILURE (26)
uses 136 bytes
[LUAW] load library initcom...uses 44 bytes
[LUAW] load library pollereader...uses 47 bytes
[LUAW][MEM] Failed to allocate 80 bytes
   ********************
   *** EMERGENCY GC ***
   ********************
  (80397 -> 79789)
[LUAW][MEM] Failed to allocate 320 bytes
   ********************
   *** EMERGENCY GC ***
   ********************
  (80195 -> 80169)
MALLOC FAILURE (320)
[LUAW] luaW_run() syntax error: not enough memory

I changed my ‘lua_interactive.c’ according the change with init of mempools functions.
Way there is no more memory.until now all was ok.
Thanks
Doron Zamir

You’re compiling for 256KB memory model; all modules sold by Wavecom in the last year or so have had 2MB of RAM, and should be complied with the “1MB+” memory mapping, (in the applicaiton’s properties, “Open AT Application / Build Settings / Memory Type”.

M2MStudio settings should be changed soon, so that it sets the memory at 1MB+, since 256KB only serves for some legacy hardware.

Thanks,
I will test it right now.
Doron Zamir

I think that i need some help.
I download the file oatlua-14.zip from above link.And I import it to my M2M stdio. I running with ADL 6.21.0.02 and WIP 5.10.0.2020.
When i tring to build the new lib. i recive some error some missing types.I found that this lib request some old ASL and WIP version.
Please can you help me compile the new version of oatlua lib?.
Doron Zamir

It can work on all decently recent versions of WIP and ADL. You can change it in the project’s properties, but it’s not so easy. Set the Firmware version to yours, and then it should propose you to set dependencies to your versions of plug-ins.

A simpler solution would be to just copy the sources and headers in the source and header folders of your application project.

Thanks for your replay.
When you think that LUA 14 plug-in for M2M will be available for download.
if not i would like to compile the lib.
when you say ‘copy the sources and headers …of your application’ you mean to copy oatlua-14 sources and to copy them to my application and compile?

Thanks for all the help. :slight_smile:

I don’t know when the “official” Lua plug-in will be synchronized with the HEAD, but I understood that it won’t be done for the next Open AT delivery, so I’d advise you to synchronize yourself with the HEAD rather than depending on Wavecom’s integration process.

Yes, it’s dead simple and it works :slight_smile:

I am using Fastrack Supreme 10.This modem have Internal 32 Mb Flash and 8 Mb PSRAM.
As I undestand from adl user guide application for this modem need to use ‘256KB’ link option and not 1MB+
‘1MB+’ link option not compatible - and application that liked with 1MB will not start and this the behavior that i have.

I succed to compile lua_interactive examble with oatlua sources inside M2M Studio with building setting of memory type 1MB+
but this type of configration is not compatible with my modem.Can i compile it with ‘256KB’ link option ?
If not how can i use oatlua14 with my modem?

Anybody know how can i compile LUA14 and load it to Fastrack Supreme 10.
THX

You can, but with some limitations to save RAM:

  • you’d better compile it without debug info
  • you’d better know which modules you need or not, and cherry pick only what you really need in the lua boot table
  • you’ll have to be careful about your application’s memory consumption.

That being said, I think that Wavecom don’t sell 256KB modules/modems anymore, so if you plan to buy some hardware for your project’s deployement, this hardware will be 1MB+, and you should also develop on a 1MB+ device.

How to build lua plagin ? i download source from svn with use m2mstuduio 2.30 .

i click build? but project builds with errors((

You should build oatlua as a library, and link it with an application, such as the sample lua_interactive or lua_interactive_ethernet_fastrack.

If you have difficulties buildin a lib and linking it to an application, I suggest that you ask for assistance in the M2M Studio section of the forum.

thanks for answer

I am succeed compile latest Lua. But when I trying to run it inside the modem there is error about missing log variable .
I download the sources from ‘https://svn.anyware-tech.com/wavecom/openat-lua/trunk/
I need some help her where this variable need to be declare in Lua…
Thanks

[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 base...uses 3254 bytes
[LUAW] load library table...uses 756 bytes
[LUAW] load library string...uses 1670 bytes
[LUAW] load library package...uses 949 bytes
[LUAW] load library debug...uses 1396 bytes
[LUAW] load library strict...uses 1849 bytes
[LUAW] load library scheduling...uses 13718 bytes
[LUAW] load library timer...uses 849 bytes
[LUAW] load library options...uses 192 bytes
[LUAW] load library channels...uses 13952 bytes
[LUAW] load library bearers...uses 8362 bytes
[LUAW] load library tcp...uses 4217 bytes
[LUAW] load library flash_read...uses 2489 bytes
[LUAW] load library flash_write...uses 8197 bytes
[LUAW] load library rawflash...uses 1260 bytes
[LUAW] load library bit...uses 546 bytes
[LUAW] load library log...uses 0 bytes
[LUAW] load library shell...[LUAW ERROR] *** .\src_lua\shell.lua:283: variable 'log' is not declared ***
Error while loading shell:.\src_lua\shell.lua:283: variable 'log' is not declareduses 11359 bytes
[LUAW] load library misc...uses 1062 bytes
[LUAW] load library bootload...uses 15348 bytes
[LUAW] load library ad...uses 2963 bytes
[LUAW] load library at...uses 9439 bytes
[LUAW] load library mem...uses 64 bytes
[LUAW] load library print...uses 5773 bytes
[LUAW] load library sms...uses 2965 bytes
[LUAW] load library uart...uses 0 bytes
[LUAW] Starting telnet server
[WIP] new TCPSERVER 0x181315f0
[UART1]: open: -> DISCONNECTED
[UART1]: PPP start: -> PPP CONNECTING
[UART1]: startsrv: -> CONNECTING

There is an attempt to load the log library, but as it takes 0 bytes once loaded, it seems that it somehow failed to load. Which revision of oatlua are you using?