I get the following message from VS2010 when I deploy my application to the USBizi module, running sdk 4.1 and firmware 1.6
My PC is an XP, with a real serial port, and we are using the USBizi serial port to debug with, as we require the USB client to access the SD card via PC
“Incrementally deploying assemblies to device
Deploying assemblies for a total size of 135148 bytes”
But if I count my PE files, they total 86k.
If my PE size gets any larger than 100k, my application will no longer deploy, I just get a message that says, "check your hardware"
and, then I won’t get the message from VS2010 indicating the size.
so, using PE file size: 86K+14k = 100K image which does not deploy.
using VS2010 reported size: 135148 + 14000= 149148 which is larger than the 148K of code space on the USBizi.
so, it appears that VS2010 is reporting the correct number,
but from reading the posts, I am supposed to add up all the PE files to calculate the size of the deployment.
can anyone explain why VS2010 will not deploy when my PE file size gets over 100k?
or why the VS2010 reports that my assemblies are 135k, but my PE size is 86k?
There are probably other PE files that are not in your output folder that VS will pull in when it is deploying and not copy them locally. When your application runs, you can see all DLLs showing in the output window.
Another possibility is that VS needs to set assemblies at a sector start and this causes fragmentation.
This may not be exactly correct because I didn’t load the same exact project you originally posted, but I think it will help you understand what Gus means by other Microsoft DLLs.
I loaded a similiar project to your code and checked the output window.
Its very instructive to watch this output windows as you can see what is being loaded into memory
Below is what is being loaded according to VS.
In your directory screen shot, you show all the PE files from GHIElectronics.NETMF. If you add them up, you get your total of 100K
But as Gus mentioned, you also need to include the Microsoft. files which are NOT shown in your project directory but shown (as indicated by Gus) in the output window.
IF I take the above list of assemblies and list just the microsoft DLLs, which again are NOT shown in the project directory (but in the output window during load), we see the following items are loaded into memory;
Doing some quick math, you can see include mscorlib in your project uses about 33K of Flash memory.
The XML code uses 6.5K of flash
Doing some quick math,
33236
4620
11440
6544
3740
6516
13292
3440
Total =- 82828
Now if you look at the very end of the VS output window shown during load, you’ll see
Total: (14036 RAM - 169024 ROM - 63075 METADATA)
Notice the ROM or Flash memory is actually 169024 or about 169K. If you take the Microsoft DLL assemblies, your main assembly and the GHI assemblies, you will get a total of 169K which is why you have reached the limit of device memory.
One interesting thing to note is including mscorlib uses about 33K or ROM. It uses up a bunch of memory!