Dynamically loaded assemblies in production?

Hi,
Does anyone use dynamically loaded assemblies in commercial product as remote update solution? Is it really working?

I’m asking because I run with my product in near future and remote update is crucial. Unfortunately this is my one and only option for this.

Best regards
Darek

I’m using dynamically loaded assemblies in my project. For now I doesn’t have any issues.

1 Like

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.

As long as common assemblies (between main app an plugins) doesn’t change this works… The file that must be included is *.pe from le folder.

I think I should browse the docs once in a while.
Thank you.

Thanks everyone for response.
I will go with this solution. Thanks again. :slight_smile:

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.

That’s the plan. I hope it will work in practice. :slight_smile:

Regards

I have same solution implemented, and it works ;D

1 Like

Thanks.

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?

Regards

@ 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.

I think what he ment with the last question is In-Field updates, from SD card

Yeah. I know that. That was my off-topic thoughts about updating whole firmware (assemblies, .net framowork) like ghi did in premium products (https://www.ghielectronics.com/docs/147/in-field-update) :slight_smile:

Exactly :slight_smile:

Missing ‘PS’ after ‘Thanks’ word. :wink:

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

Unfortunately only in Premium. Thats why I have my thoughts :slight_smile:

I think that for a good native programmer this should not be a very difficult task. :slight_smile:

Yep. I expect this. :slight_smile:

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 :slight_smile:

http://skewworks.com/products/Open%20Source

Cheers,
Jay

This is true only for dynamically loading assemblies.

I believe he covers both dynamic loading and application remote update… although his solution is targeted at 4.1…

Yes but if You look closer will see that He use SystemUpdate which only works with GHI Premium Firmware.

Regards