9. MFDeploy Tool
In Porting Kit, there is a useful Tool, MFDeploy.exe. Using this tool, you can make sure if TinyCLR works fine, see the Flash memory mapping information, and erase the data in Deployment area.
9.1 How to build and run MFDeploy.exe
Following is the way to build and run MFDeploy.exe.
1) Make sure the Timer driver, Power driver and the Serial driver work fine
Before using MFDeploy.exe, please make sure the Timer driver, Power driver and the Serial driver works fine using NativeSample.
2) Build MFDeply.exe
You can build MFDeploy.exe with the command “MSBUILD.EXE build.dirproj” under the C:\MicroFrameworkPK_v4_1 folder.
Using this command, you can build not only MDFelpoy.exe but also all the managed tests in the PK as well.
MFdeploy is located in
\BuildOutput\public\Debug\Server\dll\MFDeploy.exe.
3) Run the MFDeply.exe
i) Connect COM Port to the board
Before run the MFDeploy.exe, please make sure the COM port in your PC is not used by another application like Tera Term.
Then connect the COM port in your PC to the Serial connector on the board by Serial Cross Cable.
ii) Run the MFDeply.exe
Run the MFDeploy.exe by double-clicking it.
iii) Select the COM Port
Select the COM Port which you want to use for MFDeploy as shown below (List Box).
Figure 9.1 .NET Micro Framework Deployment Tool
iii) Connect COM Port
Connect MFdeoply.exe to COM Port by selecting Target menu -> Connect option as shown below.
Figure 9.2 .NET Micro Framework Deployment Tool
9.2 How to make sure if TinyCLR works fine
If you can not deploy the application properly, “MFDeloy.exe” is a good tool to make sure if the TinyCLR works fine.
Turn on the board so that you can see like below log output.
Connecting to COM1...Connected
TinyCLR (Build 4.0.2037.0)
Starting...
Created EE.
Started Hardware.
No debugger!
Create TS.
Loading start at 95000, end b5f88
Attaching file.
Assembly: mscorlib (4.0.2037.0) (3572 RAM - 29944 ROM - 17631 METADATA)
AssemblyRef = 0 bytes ( 0 elements)
TypeRef = 0 bytes ( 0 elements)
FieldRef = 0 bytes ( 0 elements)
MethodRef = 0 bytes ( 0 elements)
TypeDef = 1032 bytes ( 129 elements)
FieldDef = 232 bytes ( 115 elements)
MethodDef = 1448 bytes ( 724 elements)
Attributes = 0 bytes ( 0 elements)
TypeSpec = 16 bytes ( 4 elements)
Resources = 232 bytes ( 29 elements)
Resources Files = 16 bytes ( 2 elements)
Resources Data = 437 bytes
Strings = 967 bytes
Signatures = 2015 bytes
ByteCode = 10500 bytes
Attaching file.
Assembly: Microsoft.SPOT.Native (4.0.2037.0) (1064 RAM - 5752 ROM - 4159 METADATA)
AssemblyRef = 4 bytes ( 1 elements)
TypeRef = 80 bytes ( 20 elements)
FieldRef = 0 bytes ( 0 elements)
MethodRef = 60 bytes ( 15 elements)
TypeDef = 328 bytes ( 41 elements)
FieldDef = 132 bytes ( 65 elements)
MethodDef = 216 bytes ( 108 elements)
Attributes = 48 bytes ( 6 elements)
TypeSpec = 0 bytes ( 0 elements)
Resources = 72 bytes ( 9 elements)
Resources Files = 8 bytes ( 1 elements)
Resources Data = 747 bytes
Strings = 207 bytes
Signatures = 587 bytes
ByteCode = 413 bytes
Attaching file.
Assembly: Microsoft.SPOT.Hardware (4.0.2037.0) (1752 RAM - 11404 ROM - 7365 METADATA)
AssemblyRef = 8 bytes ( 2 elements)
TypeRef = 124 bytes ( 31 elements)
FieldRef = 24 bytes ( 6 elements)
MethodRef = 120 bytes ( 30 elements)
TypeDef = 496 bytes ( 62 elements)
FieldDef = 176 bytes ( 88 elements)
MethodDef = 444 bytes ( 222 elements)
Attributes = 0 bytes ( 0 elements)
TypeSpec = 0 bytes ( 0 elements)
Resources = 0 bytes ( 0 elements)
Resources Files = 0 bytes ( 0 elements)
Resources Data = 0 bytes
Strings = 1329 bytes
Signatures = 1061 bytes
ByteCode = 2579 bytes
Attaching file.
Assembly: Microsoft.SPOT.Hardware.SerialPort (4.0.2037.0) (508 RAM - 3440 ROM - 1527 METADATA)
AssemblyRef = 8 bytes ( 2 elements)
TypeRef = 96 bytes ( 24 elements)
FieldRef = 0 bytes ( 0 elements)
MethodRef = 80 bytes ( 20 elements)
TypeDef = 16 bytes ( 2 elements)
FieldDef = 32 bytes ( 16 elements)
MethodDef = 92 bytes ( 46 elements)
Attributes = 0 bytes ( 0 elements)
TypeSpec = 0 bytes ( 0 elements)
Resources = 0 bytes ( 0 elements)
Resources Files = 0 bytes ( 0 elements)
Resources Data = 0 bytes
Strings = 667 bytes
Signatures = 239 bytes
ByteCode = 1118 bytes
Attaching file.
Assembly: Microsoft.SPOT.IO (4.0.2037.0) (716 RAM - 4432 ROM - 2459 METADATA)
AssemblyRef = 12 bytes ( 3 elements)
TypeRef = 72 bytes ( 18 elements)
FieldRef = 0 bytes ( 0 elements)
MethodRef = 96 bytes ( 24 elements)
TypeDef = 120 bytes ( 15 elements)
FieldDef = 68 bytes ( 34 elements)
MethodDef = 140 bytes ( 70 elements)
Attributes = 0 bytes ( 0 elements)
TypeSpec = 0 bytes ( 0 elements)
Resources = 0 bytes ( 0 elements)
Resources Files = 0 bytes ( 0 elements)
Resources Data = 0 bytes
Strings = 646 bytes
Signatures = 335 bytes
ByteCode = 1199 bytes
Attaching file.
Assembly: System.IO (4.0.2037.0) (1548 RAM - 13264 ROM - 5862 METADATA)
AssemblyRef = 8 bytes ( 2 elements)
TypeRef = 168 bytes ( 42 elements)
FieldRef = 36 bytes ( 9 elements)
MethodRef = 392 bytes ( 98 elements)
TypeDef = 144 bytes ( 18 elements)
FieldDef = 76 bytes ( 37 elements)
MethodDef = 392 bytes ( 195 elements)
Attributes = 0 bytes ( 0 elements)
TypeSpec = 8 bytes ( 2 elements)
Resources = 0 bytes ( 0 elements)
Resources Files = 0 bytes ( 0 elements)
Resources Data = 0 bytes
Strings = 356 bytes
Signatures = 790 bytes
ByteCode = 6919 bytes
Attaching file.
Assembly: Microsoft.SPOT.Graphics (4.0.2037.0) (388 RAM - 2268 ROM - 1357 METADATA)
AssemblyRef = 8 bytes ( 2 elements)
TypeRef = 24 bytes ( 6 elements)
FieldRef = 0 bytes ( 0 elements)
MethodRef = 20 bytes ( 5 elements)
TypeDef = 40 bytes ( 5 elements)
FieldDef = 16 bytes ( 8 elements)
MethodDef = 96 bytes ( 48 elements)
Attributes = 0 bytes ( 0 elements)
TypeSpec = 0 bytes ( 0 elements)
Resources = 0 bytes ( 0 elements)
Resources Files = 0 bytes ( 0 elements)
Resources Data = 0 bytes
Strings = 537 bytes
Signatures = 293 bytes
ByteCode = 242 bytes
Attaching file.
Assembly: Microsoft.SPOT.TinyCore (4.0.2037.0) (5080 RAM - 61564 ROM - 23446 METADATA)
AssemblyRef = 16 bytes ( 4 elements)
TypeRef = 224 bytes ( 56 elements)
FieldRef = 52 bytes ( 13 elements)
MethodRef = 456 bytes ( 114 elements)
TypeDef = 1104 bytes ( 138 elements)
FieldDef = 728 bytes ( 363 elements)
MethodDef = 1576 bytes ( 787 elements)
Attributes = 0 bytes ( 0 elements)
TypeSpec = 4 bytes ( 1 elements)
Resources = 0 bytes ( 0 elements)
Resources Files = 0 bytes ( 0 elements)
Resources Data = 0 bytes
Strings = 12916 bytes
Signatures = 3122 bytes
ByteCode = 25075 bytes
Attaching file.
Assembly: Microsoft.SPOT.Time (4.0.2037.0) (508 RAM - 2976 ROM - 1552 METADATA)
AssemblyRef = 12 bytes ( 3 elements)
TypeRef = 60 bytes ( 15 elements)
FieldRef = 0 bytes ( 0 elements)
MethodRef = 36 bytes ( 9 elements)
TypeDef = 96 bytes ( 12 elements)
FieldDef = 40 bytes ( 20 elements)
MethodDef = 84 bytes ( 41 elements)
Attributes = 0 bytes ( 0 elements)
TypeSpec = 0 bytes ( 0 elements)
Resources = 0 bytes ( 0 elements)
Resources Files = 0 bytes ( 0 elements)
Resources Data = 0 bytes
Strings = 895 bytes
Signatures = 220 bytes
ByteCode = 403 bytes
Loading Deployment Assemblies.
Resolving.
Total: (12884 RAM - 135044 ROM - 65358 METADATA)
AssemblyRef = 76 bytes ( 19 elements)
TypeRef = 848 bytes ( 212 elements)
FieldRef = 112 bytes ( 28 elements)
MethodRef = 1260 bytes ( 315 elements)
TypeDef = 3376 bytes ( 422 elements)
FieldDef = 1500 bytes ( 746 elements)
MethodDef = 4488 bytes ( 2241 elements)
DebuggingInfo = 2252 bytes
Attributes = 48 bytes ( 6 elements)
TypeSpec = 28 bytes ( 7 elements)
Resources Files = 72 bytes ( 3 elements)
Resources = 304 bytes ( 38 elements)
Resources Data = 1184 bytes
Strings = 18520 bytes
Signatures = 8662 bytes
ByteCode = 48448 bytes
GC: 1msec 15276 bytes used, 4178820 bytes available
Type 0F (STRING ): 24 bytes
Type 15 (FREEBLOCK ): 4178820 bytes
Type 17 (ASSEMBLY ): 15180 bytes
Type 34 (APPDOMAIN_HEAD ): 72 bytes
Total: (12884 RAM - 135044 ROM - 65358 METADATA)
AssemblyRef = 76 bytes ( 19 elements)
TypeRef = 848 bytes ( 212 elements)
FieldRef = 112 bytes ( 28 elements)
MethodRef = 1260 bytes ( 315 elements)
TypeDef = 3376 bytes ( 422 elements)
FieldDef = 1500 bytes ( 746 elements)
MethodDef = 4488 bytes ( 2241 elements)
DebuggingInfo = 2252 bytes
Attributes = 48 bytes ( 6 elements)
TypeSpec = 28 bytes ( 7 elements)
Resources Files = 72 bytes ( 3 elements)
Resources = 304 bytes ( 38 elements)
Resources Data = 1184 bytes
Strings = 18520 bytes
Signatures = 8662 bytes
ByteCode = 48448 bytes
Ready.
Cannot find any entrypoint!
Done.
Waiting for debug commands...
After the above messages, you should try and connect from MFdeploy by clicking “Ping” button from MFdeploy. If you see that the TinyCLR responds, then it means that the TinyCLR is up and running.
Pinging... TinyCLR
9.3 Erase data in the deployment area
Following is the way to erase data in the deployment area.
1) Connect the Terget Plarform referring section 9.1.
2) Press Erase button so that erasing starts.
Figure 9.3 .NET Micro Framework Deployment Tool
3) If below error shows up, don’t mind.
Figure 9.4 Error message
4) Following message shows up when the data in deployment area has erased.
Figure 9.5 .NET Micro Framework Deployment Tool