-
Notifications
You must be signed in to change notification settings - Fork 224
Getting Started
- Visual Studio 2013 (Community, Pro or Ultimate editions)
- Visual Studio SDK
To build the VSIX packages for integration with Visual Studio, you must have the Visual Studio SDK matching the version of VS you intend to target (e.g. VS2012, VS2013 or VS2015). The build system will automatically skip generation of the VSIX package for a given version of VS if the corresponding VSSDK is not found.
- Clone or fork the repository from GitHub
For your local repository it is recommended to use a path that will leave at least one level of directory hierarchy from the root to accommodate the additional binaries from step #3 (See the example following these steps for more details, the cloned folder is namednetmf-interpreter
in the example. ) - Download the binary tools zip file
The zip contains binaries necessary to build the SDK along with support files needed to build custom device images. Our longer term goal is to remove the need for these binaries - so they are a separate download at present. - Unzip the contents of the tools zip to the parent folder of the repository, that is the tools and bin folders in the zip should become siblings of the folder containing the repository.
For example:
...\GitHub\NETMF\
|
+---------------\Bin
|
+---------------\netmf-interpreter
|
+---------------\Tools
NOTE: There are a number of online tutorials for how to build the NETMF code that list additional steps that are not applicable to the v4.4 and later. You should treat these as highly advanced optimization hints and reviewed with a skeptical eye as the issues the original authors faced and wrote the article to deal with, may not exist anymore. Some contained steps that were simply unnecessary. However, in some cases the instructions are just wrong or potentially problematic due to a confusion on the differences between the Porting Kit and raw source tree builds that previously existed. Hopefully with the move to GitHub, a regularly updated WIKI and the simpler build support in V4.4 we can eliminate the confusion.
- Open a command prompt and navigate to the root of the repository
- Run the build_sdk.cmd command script to generate a new SDK MSI and VSIX packages.
This will generate the SDK installer MSI and the VSIX packages in the BuildOutput folder:
...\netmf-interpreter\BuildOutput\public\Release\Server\msm\MicroFrameworkSDK.MSI
...\netmf-interpreter\BuildOutput\public\Release\Server\dll\netmfvs2012.vsix
...\netmf-interpreter\BuildOutput\public\Release\Server\dll\netmfvs2013.vsix
- Open a command prompt and navigate to the root of the repository
- Run
setenv_<toolset> <args>
to set up the build environment for the tool-set you have.
Example:C:\GitHub\Netmf\netmf-interpreter>setenv_mdk 5.05
NOTE: For the ARMCC tool chain the version number provided to setenv_mdk.cmd is the compiler version number and NOT the KEIL MDK/uVision version number. (e.g. for KEIL MDK v5.14 the ARMCC version is 5.05) This is to keep the settings consistent between the KEIL and ARM DS-x tool suites, which share the same compiler. - Navigate to the
Solutions\<platformname>
folder for the platform you wish to build - Run msbuild to build the firmware
While a simplemsbuild
with no arguments is enough it tends to make for a noisy display. An easier to follow and faster build is achieved by providing the options for generating a detailed log file but use only minimal logging to the console window as follows:
msbuild /flp:verbosity=detailed /clp:verbosity=minimal
This will build the Release version of the firmware for FLASH. If you want to build the debug version simply add/p:FLAVOR=Debug
to the command line to set the FLAVOR property to Debug.
A commonly used shortcut for the build command is to use a command line alias via DOSKEY as follows:
DOSKEY mfbld=cls$Tmsbuild /flp:verbosity=detailed /clp:verbosity=minimal $*
This sets up an alias command mfbld
that clears the screen and runs msbuild with the previously mentioned logging settings. Furthermore, any additional arguments specified on the command line when using the mfbld alias are passed directly on to msbuild.