Main Site Documentation

Deploying application from commandline


Hi all,

I’m getting more and more confident in my new Panda and would like to start working on easing deployment for production usage.

I have googled quite a bit, but I haven’t been able to tell if it is possible to deploy an application without making a custom firmware?
From the USBizi manual I gathered that the GHI Bootloader can load managed code, but from my understanding this is not the output format of my VS compilation. Therefore I cannot modify the MAC address in this during deployment.

I am using the Ethernet Shield which means I need to put in a MAC address, and thus my deployment scenario includes that I need to compile the .NET MF application.

Therefore, what I would like to achieve is a utility which can

  1. Plug in MAC address to my C# source code
  2. Compile the .NET MF application
  3. Deploy the application

How would you go about this? What is the best practice?
Perhaps I could also include an initial step for updating the device to GHI’s latest firmware version.

Best Regards


You wouldn’t create an appp to compile, this is too much work. Just compile from VS then use the GHI loader on USBizi to create a “master copy” of your firmware. From there you will have a file that you can load at production. IT is loaded using XMODEM protocol which is very common and easy to implement.


But how would I go about specifying the MAC address, so that each device has a unique address?

I don’t believe I have other choices than specifying it in my source code or adding a SD card to the device which could store the address. I would much prefer the former in that case.


When your embedded application boots, your same embedded app can talk to the your “XMODEM app” to obtain a MAC address and save it.


I dont think I quite follow you.

Isn’t the MAC address supposed to be in my compiled application, to be passed onto the Dhcp.EnableDhcp method?
Do I have an alternative to this?

Oh perhaps I can set the MAC permanently using MFDeploy?
If this is the case, I simply deploy once using VS and then copy it to other devices. Probably I could use MFDeploy’s API to set the MAC address afterwards then.


The pc application you make to load the firmware on your device will also load some configurations, on of the config is the MAC address


You can set the MAC address using MFDeploy but this is only available on boards that have integrated Ethernet (like Cobra). When you are using an Ethernet module like Wiznet than you need to store the MAC address and initialize the module with it.


So as far as I understand I only have two choices:

  1. Store it directly as part of my source code (thus I need to find a way to compile and deploy my application from commandline / APIs)

  2. Add a SD card so I have some form of accessible persistent storage where I can store the MAC address. Do I have other options of persistent storage?


Option 3: your app can accept config and save them to flash


I found the InternalFlashStorage documentation.

Can this region be written through e.g. teraterm/xmodem?


Yes, if you write an application to talk to teraterm that writes to InternalFlashStorage.

How about this:
[ol]You flash your application to the board.
Your program starts
It looks in InternalFlashStorage for MAC adderss
It find MAC and continues normally OR if it doesn’t frin MAC then it connects via xmodem to get MAC and stores it in InternalFlashStorage[/ol]

That way it will start up in “config mode” if it isn’t configured yet, or it will run as final product once it gets it’s config…


Errol, this is what I was trying to explain multiple times but maybe I am not explaining this right!


Thanks for explaining and sorry for being stubborn. It definitely sounds doable and I’ll try to implement this scheme into it.


Gus, I thought that was your idea, I just elaborated a bit… :slight_smile: