we have quite a big project
Master record : 20 bytes.
Class records : 222 (2664 bytes).
Field records : 393 (396 bytes).
Static fields : 138 (276 bytes).
Static state : 138 (548 bytes).
Constant records : 351 (1404 bytes).
Constant values : 351 (3664 bytes).
Method records : 957 (11484 bytes).
Exception records: 237 (1896 bytes).
Interface maps : 17 (16 bytes).
Code : 883 (43672 bytes).
Total : 65496 bytes.
Run time options : EnableCompact
Constant loads : 286N 115O 3W 283S
Static load/store: 81N 580O
Field load/store: 1000N 1117O
but at a certain point we cannot link the project anymore, we'll get the following error. I have
js.tinyvm.TinyVMException: Offset out of range (65617)
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:766)
at js.tinyvm.Binary.createFromClosureOf(Binary.java:324)
at js.tinyvm.TinyVMTool.link(TinyVMTool.java:97)
at js.tinyvm.TinyVMTool.link(TinyVMTool.java:48)
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(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at lejos.pc.tools.ToolStarter.startTool(ToolStarter.java:31)
at lejos.pc.tools.NXJLink.main(NXJLink.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)
at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)
at org.apache.tools.ant.taskdefs.Java.run(Java.java:771)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:221)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
this is our link ant task:
- Code: Select all
<!-- Link the binary and create a signature file -->
<property name="myclasspath" refid="lejos.nxt" />
<echo>${myclasspath}</echo>
<java classname="lejos.pc.tools.NXJLink" failonerror="true">
<classpath refid="lejos.pc" />
<arg value="--bootclasspath" />
<arg pathref="lejos.nxt" />
<arg value="--classpath" />
<arg path="${botsrc}" />
<arg value="--writeorder" />
<arg value="LE" />
<arg value="-o" />
<arg file="${output.nxj}" />
<arg value="-od" />
<arg file="${output.nxd}" />
<arg value="-v" />
<arg value="${main.class}" />
</java>
is there a way to use more than 64KB since the flash actually is bigger, or do we need to cut Strings/large datatypes to make it fit?
