Main Site Documentation

G400 Limitations


#1

are there any limitations on G400 codesize?
near on 800kb compiled size i get exceptions like CLR_E_OUT_OF_RANGE.

I search for methodes to build greater applications. are there any basics to understand how cli generates such errors?


#2

Your assemblies and allocated memory need to be under 700k on any NETMF device.

Break your program into multiple assemblies.


#3

my assemly sizes are as follows:
exe. 134kb
lib1 141kb
lib2 69kb
other libs in sum 150kb

pe size:
pe off exe 92kb
pe of libs between 10 and 100kb

each lib is a assembly with a uniqe name

the whole project including all (exe, user lib, ghi libs) is in sum 758kb

at last compile a checked the optimize option for build operations.
the code is a little bit smaller.

question: do you recommend code optimation?


the last time I experiences the clr build error, the sum of all libs and exe was about 800kb


#4

I am not sure then!


#5

is there existing any official specification?


#6

in this case, I suspect you’re going to need to get into the weeds, with someone who can look at your project. Perhaps you’re hitting a stack size limitation, or some other quirk, but I suspect you’ll need multiple eyes on your actual project.


#7

sounds like assembly size is ok. is this a compile or runtime error.

if a runtime error, what does the debugger tell you?


#8

Enable the verbose output. I found this handy to locate the offending module that was causing the issue.

There is a bit about this here.


#9

thank you very much, i start testing!


#10

have you ever analysed? the amout of data is enourmous


#11

Yes, verbose mode is … verbose.
And yes, it is that mountain of output that will help you find the cause, or at least help you narrow down the possibilities. You don’t have to read every line - just zoom into the spot where things failed and you’ll get a lot more contextual information than you get with the non-verbose output.