One of the nice things of open source is, you can trace problems further in source code.
This error is raised in luaw_flash.c around line 46:
buffer = adl_memGet( size);
if( ! buffer) luaL_error( L, "Can't allocate buffer to retrieve from flash");
r = adl_flhRead( handle, i, size, buffer);
So adl can not supply you with enough memory to read from flash?
Maybe are you writting to much data to BOOT cell or are using it in inappropriate way, check your code. On the other side you can read that cell with adl, I think the used handle is ‘wiplua.boot’. Or maybe use TMT in RTE mode and read out contents to your PC.
First, I hope you are using G type (1MB+) of product, smaller ones are only good for some Mickey Mouse sort of programs and that may be source of your problem.
LuaW has mem() function, it gives you data about how much memory you use now and its peak use. There is also memdisp() function, which outpus to debug device, I think to be used to optimize pool memory.
this is my status:
$ =mem()
= {
USED_MEM_NOW = 123530,
USED_MEM_MAX = 144380,
HEAP_MEM_NOW = 87168,
POOL_MEM_MAX = 59640,
POOL_MEM_NOW = 51860,
HEAP_MEM_MAX = 113344,
LOST_MEM_NOW = 12765,
LOST_MEM_MAX = 13412 }
$
it look like that I using 95% of memory.
I have Wavecom fastrack supreme module.
with Ram size of 1024K
and Flash size of 4096K
Can i expend the size of the memory used by lua?
how can i delete from lua flash function and ver that saved.
Thx
No, you are using only a fraction of available memory.
As said, problem lies in size of your BOOT object, check it out. Also, there are some restrictions on use of flash objects, do check them in LuaW refman. There is also a description what can you do with them.