Sorry, if I spammed. I’ll remove link.
The link shows project, where I use dynamic assembly load. It’s some kind of graphic programming language for Gadgeteer products…
Are there no assembly Version issues when loading an assembly dynamically?
For linked assemblies it need to match exactly, which makes using multiple sub projects (solutions) more complicated.
@ andre.m: Do you have an sample for this?
I’m using dynamically loaded assemblies a lot on Windows, but didn’t know that it’s possible in NETMF. Even refelction is more complicated because of missing methods.
Thanks everyone for response.
I will go with this solution. Thanks again.
My plan is to create my own program aka. BootLoader which will be only responsible for checking/testing and running newest plugin from SD card.
Each plugin will responsible for downloading new version and will be implementing interface ITestable
interface ITestable
{
bool Test();
}
Test method gives me opportunity to test new plugin against the hardware.
If test pass then new version will be current, if not then restart and run previous.
I (plugin) need to be sure that everything is working fine. Devices will be distributed across whole country and I will not have the possibility to connect the device locally.
If assembly will be wrong and device hangs then watchdog restarts CPU and loader use previous version.
PS
I’m not native programmer but with good skills in .net c#.
I was wonder why community ports have no remote firmware update based on data read from attached sd card.
Tinybooter does this (but data is sent through serial port). There is source code but unfortunately I don’t understand most of it. What is difficult to make (if somebody knows c/cpp) something like this but with sd card?
@ dariol - Dynamic loading assemblies does not need any C/C++ code.
Its pure C#, using the classes in the System.Reflection namespace.
Most of it in NETMF is a subset of the Windows .NET classes.
But InField update does also only need C# code. No matter which source it comes from, because you need to provide it as byte array which you can get with System.IO… from SD card.
p.s. I only use PremiumOffers, not sure if that’s true for OSHW
I’m using STM32F407VGT6 and porting kit from Mountaineer but this microbooter does not work. Is microbooter from FEZCerberus will work? Or where I can find working solution for this cpu? (I can compile code my self)
save yourself some time and check out Tom ( AKA Skewworks) Project Pyxis it does exactly what you are trying to do and more, and yes it is open source so you can peek at the code