Solutions for small flash

Since the g400 only has about 1 .4 MB of flash, how does one compress the size of a program?
Does it take more memory to store a string variable in the program or to reference it in an xml file?

Second can I create a small application that resides on the flash and accesses the larger set of instructions(modules/methods) on the USB?

What is involved in doing that?

Are you using a lot of resource files. These can easily be stored on an SD card.

Basically anything that could be classed as data can be stored in a filesystem. You have loads of RAM so loading all this into memory should not be too much of an issue.

It’s hard to advise on this without more knowledge of your code. Are you using gadgeteer or plain MF?

It is possible to split your program into different assemblies and store the .pe files on USB or SD.
You have to use them by Reflection then.
SO best would be ta have some interfaces in your “normal” assemblies which are implemented in the assemblies on USB/SD.
I’m not sure if debugging of these assemblies will work.
And they are not deployed automatically, you have to copy them to USB/SD manually.
But as mentioned above, it would be better to extract all larger resources like bitmaps, text files, … from the resources and put them on USB/SD.
The code size itself should usually not be that big.

Thanks will work on the first option.

Is there a way to check deployment size on device? Is it the size of the hex file?

Look at the output window of VS. But since VS does incremental deploys you should erase the application with FEZConfig first.
And be aware that the Output window switches to an other view right after deployment when you start the debugger. You have to read quick or switch the view back.