Project - GHI.OSHW for NETMF 4.3

GHI.OSHW for NETMF 4.3

Here are the GHI.OSHW assemblies compiled for NETMF 4.3.
This is for use with Cerberus Firmware for NETMF 4.3

I share this because NETMF 4.3 Interop build fail with assembly name that contains dot(’.’), like "MyCompany.MyNamespace"
The bug is located in Microsoft.SPOT.tasks.dll

This can be fix by changing line 87 in "C:\MicroFrameworkPK_v4_3_Travail\Framework\Tools\BuildTasks\CreateInteropFeatureProj.cs"
Line 87: bpg.AddProperty(m_name.ToUpper().Replace(’.’, ‘_’) + “_FEATUREPROJ”, “True”);

Rebuild (see command line screen capture)

Then copy
C:\MicroFrameworkPK_v4_3\BuildOutput\public\Debug\Server\dll\Microsoft.SPOT.tasks.dll (and .pdb)
to
C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Tools

You can now build your managed code for interop.
Don’t forget to check “Generate native stubs for internal methods”, it is mandatory to generate all the files required for deployment, not only stubs files.

2 Likes

@ NicolasG - I am going to have to try this out.

What are the chances of success of me using your great work on 4.3 to get the 4.2 firmware for the Cerberus building? I have not looked at all, but I am interested in getting the SignalGenerator stuff ported to the Cerb family as well.

The GCC build for NETMF 4.2 is very close to the 4.3. I started with 4.2 but I finalized the work with 4.3 and didn’t make a clean code for 4.2.
Now I realize that gadgeteer is not going to shift to 4.3 right now so create the 4.2 GCC port is really meaningfull.

@ taylorza - I would not want to discourage trying to compile .NET MF 4.2 with GCC, but I would point out that one of the stated features of 4.3 was specifically to support GCC compiling. So, 4.2 may still be a challenge.

@ Valkyrie-MT - Thanks, that is what I was wondering about. but from NicolaG’s reply it sounds like the differences are not that vast. Well, it is not a high priority for me, but if I get a gap I will take a look.

@ NicolasG:
Nice, clean fix. I like it.

@ taylorza:
the 4.2 PK doesn’t support recent-enough versions of the GCC compiler needed to target the Cerberus’s STM32F4 processor. You’ll need MDK to be able to build the 4.2 Cerberus firmware.

@ jay - I quickly took a few hours tonight and got the 4.2 Cerb Firmware building with GCC. Thanks to the great work NocolasG did on the 4.3 build it was almost a no brainer.

@ NicolasG - Given that the only reason I was even able to do this was because of the great work that you had done on 4.3, I would like to ask your permission before releasing the changes required to support a Cerb build of the firmware with GCC.

Fantastic! I figured someone would do this. Remember to change all the author strings and the version number so that there is no confusion with official GHI built firmware.

So, why not just go with 4.3? I have completely switched over to using 4.3 and it is working great. Also, how will you distribute? Codeplex? Codeshare?

-Valkyrie-MT

@ Valkyrie-MT - Well if NicolasG is kind enough to grant his permission. I will ask GHI if I can commit it to the GHI codeplex repository directly, I did this when I sorted the scatterfile out for the Hydra. That way it is not a custom build separate from the GHI OSHW build. I have not included anything that is not GHI’s I have just applied the changes required to compile with GCC.

@ taylorza - No problem to include this code in GHI repository.
I also made the NETMF 4.2 GCC port minimal change set from GHI code but I think it’s too late now :slight_smile:
I also tried to keep to the GHI memory map.
Do you think I should post it anyway?

@ NicolasG - If you would rather submit the code changes that is 100% fine with me. I achieved my goal which was really just to have a working GCC build for 4.2 since that is what most people will be using but it was really your works so I please go ahead and post the code.

@ taylorza - Done :slight_smile:

1 Like

@ NicolasG - I am trying to rebuild this DLL for 4.3. But I recall there being a screenshot that showed the rebuild, and I can’t seem to find it now. Am I missing something or has it vanished?

And… that didn’t take long. I found it in the Internet Archive of the tinyclr.com page! I think that’s the first time I had ever used the internet archive for something useful! Image attached. And just to be thorough, here is the text from my command prompt session:

C:\>cd MicroFrameworkPK_v4_3

C:\MicroFrameworkPK_v4_3>setenv_vs 11
Compiler: VS 11

C:\MicroFrameworkPK_v4_3>cd framework\tools\buildtasks

C:\MicroFrameworkPK_v4_3\Framework\Tools\BuildTasks>msbuild buildtasks.csproj

I just tried this with the latest MF 4.3.1 and I’m getting an error. It doesn’t like the Microsoft.SPOT.Tasks.dll that is included in the download. It looks like that dll was compiled with 4.3.0. Could someone recompile it with 4.3.1? I would but don’t know how.

Thanks,

Mark.

Better late then never, the update is now available.
With some new feature to discover like USB Host for mass storage :slight_smile:
However, this is not fully tested…

Edit: this is here GitHub - NicolasG3/NETMF4.3_Community: NETMF 4.3 Community features and GCC compatibility

3 Likes

Nicolas - thanks for the update but I’m still a little confused.

At your Codeshare post, https://www.ghielectronics.com/community/codeshare/entry/627, you have a modified Microsoft.SPOT.Tasks.dll that you said needs to replace the one that comes with .NETMF4.3. Is this still needed? I don’t see it in your Community page.

Also, your Community page has a new firmware.hex file. I’m assuming that this replaces the .NETMF4.3.1 one?

The modified Microsoft.SPOT.Tasks.dll is not longer needed with NETMF 4.3.1.
The related issue was fixed in this release.

firmware.hex is the NETMF4.3.1 + GHI code + Community code compiled with GCC
This is the file [em]C:\MicroFrameworkPK_v4_3\BuildOutput\THUMB2\GCC4.6\le\FLASH\release\FEZCerberus\bin\tinyclr.hex\ER_FLASH[/em] (just renamed as GHI did a long time ago)

Edit: I found an error in my code commit mixing NETMF 4.3 and 4.3.1. Need some time to fix and really test before the next update.

I’ve had some problems trying to get the Ready to Use content to work.

  1. There are no .sig files in the Firmware/FEZCerberus folder so FEZ Config doesn’t work. If I copy the ones from the GHI SDK over, it flashes but is not recognized as a USB device. Same if I replace GHI firmware.hex with the Community version.

  2. If I use the GHI firmware and compile with the Community GHI.OSHW.Hardware.dll I get a the following deployment errors:

Assembly: GHI.OSHW.Hardware (4.3.5.1) needs assembly ‘mscorlib’ (4.3.0.0)

Assembly: GHI.OSHW.Hardware (4.3.5.1) needs assembly ‘Microsoft.SPOT.Hardware’ (4.3.0.0)

Assembly: GHI.OSHW.Hardware (4.3.5.1) needs assembly ‘Microsoft.SPOT.Native’ (4.3.0.0)

Anything else I should do or try?

Just saw your edit so I’ll wait and give it a go when you publish it.

I never used FEZConfig, MFDeploy is perfect for my usage.
This time, all assemblies should be properly compiled :-[
The USBHost sample code tested with a Cerbuino is here in the wiki : Community.Hardware.USBHost · NicolasG3/NETMF4.3_Community Wiki · GitHub