after some programming I ended up with the following error message:
Linking ...
js.tinyvm.TinyVMException: Offset out of range (65603)
at js.tinyvm.WritableDataWithOffset.initOffset(WritableDataWithOffset.java:22)
at js.tinyvm.RecordTable.initOffset(RecordTable.java:212)
at js.tinyvm.RecordTable.initOffset(RecordTable.java:212)
at js.tinyvm.Binary.initOffsets(Binary.java:736)
at js.tinyvm.Binary.createFromClosureOf(Binary.java:327)
at js.tinyvm.TinyVMTool.link(TinyVMTool.java:98)
at js.tinyvm.TinyVMTool.link(TinyVMTool.java:49)
at lejos.pc.tools.NXJLink.start(NXJLink.java:134)
at lejos.pc.tools.NXJLink.run(NXJLink.java:101)
at lejos.pc.tools.NXJLink.start(NXJLink.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at lejos.pc.tools.ToolStarter.startTool(ToolStarter.java:31)
at lejos.pc.tools.NXJLink.main(NXJLink.java:28)
Linking the file failed with exit status 1
So, this means my binary *.nxj is not allowed to exceed 64 KB ?
Is this a 16 bit limitation of TinyVM or of LeJOS/NXT? Sounds like TinyVM... since it's not reaching uploading
Does anyone have some hints what can be done to reduce the memory usage, e. g. stripping unnecessary data from binary. However, from what I've understood so far it is already quite optimized? So the only real option seems for me to reduce my code somehow.
By the way, how can I check the available RAM during execution? I haven't figured out that so far, maybe I missed a method in the LeJOS API.
LEJOS 0.9.0 shows under "System" quite varying values for "free RAM". I assume it's the remaining RAM under the LeJOS menu system since sometimes it's raising again (gc?). What's the amount of free RAM in bytes for self-written programs? I also had problems with low RAM in the past...
Correct me please, but the whole binary is not loaded into the NXT RAM? It remains in the 256 KB flash memory as a file, just heap and stack are used from RAM, of course, right?
Thanks for every help!
