Community

How to build .Net Micro Framework 4.4 Firmware

Had a play with this and a couple of things needed my attention:

  • CMSIS needed installing. I ran the command powershell ./Install-CMSIS.ps1 and that helped.
  • By default, the ARM compiler needed the floating point libraries moving to the right place. I initially tried the latest version (7.2.1) and that failed. I then tried the compiler version recommended and that failed as well. Moved the libraries on both compilers and then everything built OK.

I also tried the 4.4 build for the STM32F4 and that worked as well.

Regards,
Mark

1 Like

I think I fixed all the issues this morning. Take a look at the latest post.

You were just a little to fast for me.

The major changes this morning were to add CMSIS and updated the version of GCC to 4.9.3.

Please let me know if any updates are needed.

Thanks David

1 Like

Guys I have attempted many times to get this to build but it is not. I think that msbuild is not executing but do not see why. here is my output but it executes in 2s not 10m.

C:\net4_4_0>call setenv_gcc 4.9.3 “C:\netmf\gcc_4_9_3” call cd Solutions\STM32F411NUCLEO msbuild /t:build /p:flavor=release;memory=flash /fl call C:\WINDOWS\explorer.exe “C:\netmf\netmf4_4_0\BuildOutput\THUMB2FP\GCC4.9\le\FLASH\release\STM32F411NUCLEO\bin”
Compiler: GCC 4.9.3 C:\netmf\gcc_4_9_3
setting vars for GCC compiler GCC4.9.3

Any ideas want i am doing wrong?

Looks like all of the commands are on one line. Try to put the call statements on new lines:

call setenv_gcc 4.9.3 "C:\netmf\gcc_4_9_3"
call cd Solutions\STM32F411NUCLEO
msbuild /t:build /p:flavor=release;memory=flash /fl
call C:\WINDOWS\explorer.exe "C:\netmf\netmf4_4_0\BuildOutput\THUMB2FP\GCC4.9\le\FLASH\release\STM32F411NUCLEO\bin"

Regards,
Mark

1 Like

Mark

I separated the lines as you suggested and it attempts a build.

Brad

Mark

It failed to build - i am not familiar with this message… looking online is pointing nuget. is this the floating point issue? If I open the project in vsd2015 it fails to load the project.

C:\net4_4_0\tools\Targets\Microsoft.SPOT.Build.Targets(929,5): error MSB4062: The “Microsoft.SPOT.Tasks.GenerateTinyRes
ource” task could not be loaded from the assembly C:\net4_4_0\BuildOutput\Public\Release\Server\dll\Microsoft.SPOT.Task
s.dll. Could not load file or assembly ‘file:///C:\net4_4_0\BuildOutput\Public\Release\Server\dll\Microsoft.SPOT.Tasks.
dll’ or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is
correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [C:\net4_4_0\Framework\Subset_of_CorLib\SpotCorLib.csproj]

Brad

Good Morning Brad,

. The directory below should be C:\netmf\netmf4_4_0 I have updated Step 7 in my by post.

Create a directory c:\net4_4_0 and unzip the .NET Micro Framework Interpreter into the directory https://github.com/valoni/netmf-interpreter

The file Microsoft.SPOT.Task is located in here https://github.com/valoni/netmf-interpreter/tree/dev/tools/Targets

Hope this will fix in the issue?

David

Build fails still - looks like files are missing or path is wrong? Earlier I was trying moving the folder but it does not matter.
Cannot attach the build output file but here is a snippet…

WixLibSpotBuild -> C:\net4_4_0\BuildOutput\Public\release\Server\dll\Microsoft.SPOT.WiX.dll
Done Building Project “C:\netmf\net4_4_0\Framework\Tools\WiXLib\WixLibSpotBuild.csproj” (Build target(s)).
Project “C:\netmf\net4_4_0\Framework\Tools\BuildTasks.dirproj” (5) is building “C:\netmf\net4_4_0\Framework\Tools\BuildTasksInternal\BuildSigner\BuildSignerSpotBuild.csproj” (7) on node 1 (Build target(s)).
StartBuild:
Building…C:\netmf\net4_4_0\Framework\Tools\BuildTasksInternal\BuildSigner\BuildSignerSpotBuild.csproj;
ResolveAssemblyReferences:
Primary reference “CODESIGN.Submitter”.
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly “CODESIGN.Submitter”. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\netmf\net4_4_0\Framework\Tools\BuildTasksInternal\BuildSigner\BuildSignerSpotBuild.csproj]
For SearchPath “{HintPathFromItem}”.
Considered “C:\netmf\tools\x86\CODESIGN\CODESIGN.Submitter.dll”, but it didn’t exist.
For SearchPath “{TargetFrameworkDirectory}”.
Considered “C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\CODESIGN.Submitter.winmd”, but it didn’t exist.
Considered “C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\CODESIGN.Submitter.dll”, but it didn’t exist.
Considered “C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\CODESIGN.Submitter.exe”, but it didn’t exist.
Considered “C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\CODESIGN.Submitter.winmd”, but it didn’t exist.
Considered “C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\CODESIGN.Submitter.dll”, but it didn’t exist.
Considered “C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\CODESIGN.Submitter.exe”, but it didn’t exist.
For SearchPath “{AssemblyFolders}”.
Considered “C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\CODESIGN.Submitter.winmd”, but it didn’t exist.
Considered “C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\CODESIGN.Submitter.dll”, but it didn’t exist.
Considered “C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\CODESIGN.Submitter.exe”, but it didn’t exist.
For SearchPath “{GAC}”.
Considered “CODESIGN.Submitter”, which was not found in the GAC.
For SearchPath “{RawFileName}”.
Considered treating “CODESIGN.Submitter, Version=4.1.0.0, Culture=neutral, PublicKeyToken=3d8252bd1272440d, processorArchitecture=MSIL” as a file name, but it didn’t exist.

Brad

Did you delete the BuildOut directory before the new compile?

Yes.

I am starting over again.

Ok I started over and think the steps are off …
Step #8 and #9 have wrong paths, I think.
Also when I unzip the netmf-interpreter should the folder exist? C:\netmf\netmf4_4_0\netmf-interpreter-dev?

This is why I started moving folder(s) around since it seerms paths are wrong.

Step 8
Download the CMSIS tools (rename the file extension “.pack” to “.zip” and unzip them in the c:\net4_4_0
Should read C:\netfm\netfm4_4_0 and has been corrected

Step 9

Create a batch file in the c:\net4_4_0 should be
C:\netfm\netfm4_4_0 and has been corrected

Thanks for finding the issues.

Also when I unzip the netmf-interpreter should the folder exist? C:\netmf\netmf4_4_0\netmf-interpreter-dev?

The files should be unzipped to C:\netmf\netmf4_4_0
.

Still not building …
Is there a time table to a release of this framework?

Between steps 8 & 9 there should there be a step to run powershell script: ./Install-CMSIS,ps1?
How about ./Install-BinTools.ps1?
What about Marks issue “By default, the ARM compiler needed the floating point libraries moving to the right place.” ?

Microsoft .net micro framework was released in 2015.

If you try again here is my net4_4_0 directory tree

Yes my structure is similar but still fails.

“C:\netmf\netmf4_4_0\Solutions\STM32F411NUCLEO\dotnetmf.proj” (build target) (1) ->
“C:\netmf\netmf4_4_0\Framework\Tools\CreateCLRDefines.proj” (Build target) (12:176) ->
(BuildClrDefines target) ->
C:\netmf\netmf4_4_0\Framework\Tools\CreateCLRDefines.proj(12,5): error MSB4062: The “Microsoft.SPOT.Tasks.Internal.Ge
nerateCLRDefines” task could not be loaded from the assembly C:\netmf\netmf4_4_0\BuildOutput\Public\Release\Server\dll
Microsoft.SPOT.Tasks.Internal.dll. Could not load file or assembly ‘file:///C:\netmf\netmf4_4_0\BuildOutput\Public\Rele
ase\Server\dll\Microsoft.SPOT.Tasks.Internal.dll’ or one of its dependencies. The system cannot find the file specified
. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and th
at the task contains a public class that implements Microsoft.Build.Framework.ITask.

5 Warning(s)
205 Error(s)

Time Elapsed 00:00:45.55

C:\netmf\netmf4_4_0\BuildOutput\Public\Release\Server\dll\ is not a part of a good build

Here is my last BuildOutput directory:

C:\netmf\netmf4_4_0\BuildOutput\THUMB2FP\GCC4.9\le\FLASH\release\EspruinoWifi11\bin

Note: EspruinoWifi11 is a new solution I was building but the other directories are standard.

Your directory tree of the should be exactly like the one above without the BuiildOutput directory.

Don’t forget to the Delete the BuildOutput directory before the build starts or the solution will not build.

My folder layout is ALMOST identical - I am missing the firmware folder.

Where does firmware come from?

Sorry you don’t need firmware that is a temp directory I have been storing my good builds in.

If your root directory looks like this

and the DeviceCode directory is deleted it should built.

Well I think i got it - I closed my cmd window i.e. vs2015 dev command window.
Re-ran As Administrator and it seems to be building with no red …

It built - finally at step #11

Thanks for the help and being a pain.

I had a lot of help to.

It’s a very complicated process.

Congratulations!!!