How to deploy code/ create hex fie/ deploy solution using command line

I need to achieve these 3 things using command line.
I assume the first - deploy code to gadgeteer using command line should be easy but I couldn’t find the exact command.
regarding create hex file from gadgeteer/ deploy hex file to gadgeteer using command line.
these are functionalists that the GHI config tool has but the config tool does not have a command line. is there any dll I can use to achieve this?
or any existing command line?

Porting Kit has full source code for the MFDeploy. You can start there.

do you mean the MFDeploy dlls? but the MFDeploy did not work with 4.2? did this status change?

  • in addition do you know the commands to perform deploy via VS command line?

No, there is a full source code for MFDeploy. I haven’t check for the command line arguments.

where I can find it,
I find this download:http://netmf.codeplex.com/releases/view/52341
but I didn’t understand how to use it.

Yes, get the “Porting Kit”

http://netmf.codeplex.com/downloads/get/218285

After you install it, the MFDeploy code can be found in:

\Framework\Tools\MFDeploy

hi, back to this topic…
when I deploy hex file via MF Deploy CLI it throws exception- the signature file not found.
and actually, I don’t have this one.
when I extract the HEX file via FEZ config- it creates only hex file without sig file.

I would like to find a way to create sig file from hex file, reather via command line.
or- an optional parameter to :

MFDeploy.exe deploy C:\my file.HEX USB:EMX_Gadgeteer

for ignore sig file.

thanks

You can use MFDeploy to create a sig file.
Look in the program menu for it.

1st you generate an empty key file.
Alternativly you can create an actual key file, and write this one to your device… But be aware that if you loose your key file then you can not deploy anything to the device anymore.

2nd sign your hexfile with the key file (empty or actual key)

3rd put sig file in same folder as hex file and deploy with MFdeploy.

you might get some signature check and/or linker Errors in the Output window of MFdeploy.
This is normal and after a reboot your application shold be on the device and running.
To avoid this you can activate some different deploy method somewhere in the menu (debug or tolls or similar).
Then you don’t get an signature/linker error.

b.t.w. Why don’t you use FEZConfig to deploy your Software? I think it’s easier to use.
Edit: never mind (last Statement) you Need command line.
I have suggested this for FEZCofing already:
https://www.ghielectronics.com/community/forum/topic?id=13743

hi,
I aware about this, but it’s not help me.
I create script to deploy via CLI, this option support only via MF Deploy so I couldn’t use FEZ Config.
But I don’t use MF Deploy as tool- I don’t want to use it GUI. there is no function of create sig file from hex file?
or option to create hex file with sig file via CLI?

How do you create your hex file?
Do you do this also by CLI?
If not then this should not be a Problem.
You only need to create the sig file once for a hex file.

Alternatively you could use the MFDeployEngine.dll (or similar) from your own C# program. By this you should be able to do anything MFDeploy can from UI.
I started my own tool which uses this dll, but since it’s a low priority I did not much more than connect and reboot.

I search for way via CLI…
now- I use FEZ Config tool manually, (but not MF Deploy- so I can’t extract the sig)
but didn’t find a way.

there is a way I can use this dll and create my command line?
can you bring code-example?
thanks

You just add the MFDeployEngine.dll as reference to your Project. You can find this dll in the same Folder as MFDeploy.exe.
The MFDeploy source code is the best example for using it.
I think MFDeployEngin.dll is also fully documented. You can find the source code and docs on netmf.codeplex.com.

b.t.w. the sig file is not extracted from the board. it’s generated by the key file. It’s just a signature to proof the source of the hex file to the board.

Refer to comment- I understood this sig file isn’t critical, so there is not a way to shut-off flags and the deploy wouldn’t search this file?

At least not from the UI. May be .NET or CLI Interface can, but I don’t know.