Dynamically loading code on a Panda II

Hi everyone,

I am new to this forum and have a question about my Fez Panda II. I want to know if it is possible to dynamically load code onto the board?

I have a project which loads a program on the board and runs it. I want that program to obtain a compiled .NET assembly from somewhere (say by the ethernet connection - I am running the Shield) and then have that assembly dynamically loaded and then call into it on an well-known interface definition.

I am a long time .NET developers (since before .NET was released) and am looking to do the equivalent of an Assembly.Load() on the board. Has anyone tried this?

Taking this further, if the above was possible, I am wondering if that assembly could be an .EXE that I somehow stage such that my original running program “reboots” the board, and the newly obtained .EXE will run when the board reboots.

Basically I am looking for strategies on how to make my program on the board “updatable” without having to be hooked up to Visual Studio.


(Hopefully I know what I’m talking about, so here goes)

Currently on a Fez Panda (Usbzi) there is no way to load code like Assembly.Load() or any other way. Devices like the EMX module and Chipworkx have the ability to do “field updates”, which will allow you to do that. Further, since you’re a veteran like me, you should need to know that C# on .NETMF is intepreted like a scripting language as opposed to compliled (well the MSIL is). Even though its not supported on Panda, it is possible to write in the functionality to do so if you make your own port of the framework. Additionally, the EMX and Chipworkx modules can be debugged via their ethernet ports. This could allow for remote debugging of a device in the field, if your network is setup correctly.

The Fez Domino has a USB host port that will allow you to connect a Fez Panda to it. With alot of hard work you could program a Fez to Update another Fez by hooking them together via their USB host ports.

Welcome to the forum RodDaSilva!

Thanks for the speedy reply!

Okay so who knows anything about the LDR (Load) operation Visual Studio is doing to the device when it pushes your program to your Fez Panda II?

How might I go about writing my own custom loader software that would run on my PC and use it to push the update to my Panda II project?? I mean Visual Studio can’t be doing too much magical here right?

I am thinking I should be able write a custom Windows app to mimick what VS is doing to push the assembly to the Panda II in some sort of “load” mode.

To complicate things I don’t want to use the USB to do this. I would rather use a COM port.

Has anybody done anything like this?


Oh you want to actualy us a PC to do the update? If I’m not mistaken there is a utility somewhere around here that allows you to update the user code. If I find it I’ll link it. Also, I don’t believe that it can be done via the COM interface without triggering the boot loader in LDR mode.

You can upload a program to the Panda over serial. Just short the Mode pin to ground and use a level converter or COM1.

There must be a way to write your own update program, but I’m not sure where to begin. If I remember correctly there is a DLL as part of MFdeploy.

You can also put a new version on sd card and use a custom bootloader to update. Search the forum for for in field update.

Thanks for the responses.

I will have a look at MFdeploy. I am sure what I am looking for will be in there.