.NET Micro Framework for Linux (METMF Linux) is a sample code to port .NET Micro framework to Linux platform.
This project indicates the porting sample code with following items.
  • How to write OS facilities for NETMF port on to other operating systems.
  • Sample Linux implementation with linux-socket marshaling.
  • Usabilities of cygwin based cross compiler and gcc-4.1.x.
This project has some issues as below.
  • Debugger / MFDeploy interface is not supported .
  • .dat format IL database file is needed for application running.
  • Flash ROM and storage are not supported.
  • Various driver is not supported. (e.g. USB host/target, gpio, serial (rs232/rs422/rs485), i2c, spi, adc, rtc, sd-card, lcd, nvram,...)
We have a plan to enhance this project to support these issues.

syntax of tinyclr.axf:

tinyclr.axf IL-assembly-database-file

Preparation

You have to get Eddy-DK embedded linux board in order to build and run. SystemBase in Korea is manufacturing Eddy embedded module series micro-computer boards. See details at http://www.sysbas.com/. you can find distributers at the following page. http://eng.sysbas.com/e-wheretobuy/

We checked this project is working on both Eddy-DK v2.1 and Eddy-S4M-DK v2.1. Newer Eddy v2.5 series may support this project, but we don't check it. Note that Development Environment needed by this project is opened to DK (Development Kit) customer only.

We are using these below files to build and test.

Files from Eddy Community

Before starting, you have to get following files from Eddy Community site, http://www.embeddedmodule.com/.

Toolchain for Windows

  • cygwin-setup.zip (Size : 210.7MB)
  • toolchain-windows-arm-411.tgz (Size : 48.84MB)
  • lemonide-windows-10b-8514.tgz (Size : 77.9MB)

Source (Open Linux 2.1.1.X)

  • filesystem_2.1.1.1_10723.tar.gz (Size : 58.59MB)

Documents (Manual & Spec sheet) Ver 2.1.x.x

  • manual_2.1.x.x_Eng_10723.zip (Size : 27.59MB)

VC++ compiler and VC# compiler

  • Visual Studio 2010
  • Or VC++ 2010 Express + VC# 2010 Express + Windows SDK for .NET Framework 4.0

NETMF PK and SDK.

And also you need the following NETMF 4.1 (QFE) PK and SDK.
  • PKProductNoLibs.zip
  • SDK.zip

How to build tinyCLR

  1. Install Visual Studio or VC++ 2010 Express + VC# 2010 Express + Windows SDK.
  2. Install NETMF PK and SDK.
  3. Update Eddy firmware (os and fs) to 2.1.1.1.
  4. Install all Eddy Development Environment.
  5. (Optional) You can check build environment with compiling "hello sample". See details at Eddy DK Programmer Guide.
  6. Build and load new shrunken filesystem .
    1. Replace C:\filesystem_2.1.1.1\ramdisk\Makefile with downloaded Makefile in filesystem-differences to extend ROM/RAM area.
    2. Add sample .dat files in downloaded filesystem-differences.
    3. Build the new filesystem.
    4. Load new filesystem.
  7. (Optional) Backup installed PK files.
  8. Overwrite EddyLinuxPatch to $(SPOCLIENT). Note that $(SPOCLIENT) is usually C:\MicroFrameworkPK_v4_1.
  9. Open Command prompt and enter these commands.
>CD C:\MicroFrameworkPK_v4_1
>setenv_lemonix
>CD Solutions\EddyDK21_linux
>Build tinyclr [debug | release]

You can find tinyclr.axf (linux elf format executable application file) at
In case of Debug build:
BuildOutput\ARM\GCC4.2\le\FLASH\debug\EddyDK21_linux\bin
In case of Release build:
BuildOutput\ARM\GCC4.2\le\FLASH\release\EddyDK21_linux\bin

Build, load, and run Application

There are three samples to build .dat IL database file to load.
  • SocketClient.csproj -- sample to rewrote .csproj file.
  • builddat.cmd,makedb.txt -- sample input command to build .dat file.
  • SocketClient directory -- sample custormized VS10 application project.

Build applications

You can build SocketClient and SocketServer application, and convert those to .dat files by previous way.

Load tinyCLR and applications

You can transfer tinyclr.axf and applications to '/' or '/tmp' directory via ftp. Note that tinyclr.axf should have executable permission. In order to add executable permission, login via telnet and run the command.
# chmod +x tinyclr.axf

Run it

Login via telnet and run the command.
# ./tinyclr.axf SocketClient.dat

After built

You can copy tinyclr.axf into Eddy's ramdisk file with NETMF '.dat' format application. And you can update Eddy's firmware to include tinyclr.axf and NETMF applications.

Last edited Apr 27, 2011 at 3:57 PM by hidaka, version 16

Comments

hidaka May 4, 2011 at 5:29 AM 
I will transfer this question to discussions area.