This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Run .exe using Mono on AM335x

Hi all,

     I am trying to run .exe file on AM335x Custom board ;

As till i have run .Net Application on Ubuntu 12.04 by installing Mono on my PC and tried to run the same on AM335x.

For that I have copied the Mono package installed on Ubuntu to ti-sdk 5.7 running on AM335x with same location as it is installed on Ubuntu 12.04 PC.

But no luck!!      


1) Pls Let me Know how to install any pakage on AM335x ?

2) Is there any way to compile .exe file in User space and run the application ?

 

I have tried with Permission also but again no luck !!

Pls suggest !!!

Regards

Praveen

  • Hi Praveen,

    To run any .exe (windows executable) on linux machine, yes we need mono or wine package support on host side.

    For that I have copied the Mono package installed on Ubuntu to ti-sdk 5.7 running on AM335x with same location as it is installed on Ubuntu 12.04 PC.

    It wont work if you copied the mono libraries from ubuntu (12.04 host PC) to arm architecture since your host machine is different arch (x86) so , You have to cross compile the mono packages and install in armv7 arch (AM335x board)

    Please learn from net that how to cross compile the mono or any package.

  • Hi Praveen,

    I'm able to build/cross compile the mono package for my armv7 arch board (keystone 2)

    In same way, I think you can also follow the procedures and cross compile the mono source package.

    Steps:

    https://github.com/mono/mono

    CC=arm-linux-gnueabihf-gcc CFLAGS="-march=armv7-a -mfloat-abi=softfp"

    ./configure --host=arm-linux-gnueabihf --disable-mcs-build

    make

    make install DESTDIR=/usr/local/ks2_fs

    Log:


    root@keystone-evm:/#
    root@keystone-evm:/# mono -v
    Usage is: mono [options] program [program-options]

    Development:
        --aot[=<options>]      Compiles the assembly to native code
        --debug[=<options>]    Enable debugging support, use --help-debug for details
        --debugger-agent=options Enable the debugger agent
        --profile[=profiler]   Runs in profiling mode with the specified profiler module
        --trace[=EXPR]         Enable tracing, use --help-trace for details
        --jitmap               Output a jit method map to /tmp/perf-PID.map
        --help-devel           Shows more options available to developers

    Runtime:
        --config FILE          Loads FILE as the Mono config
        --verbose, -v          Increases the verbosity level
        --help, -h             Show usage information
        --version, -V          Show version information
        --runtime=VERSION      Use the VERSION runtime, instead of autodetecting
        --optimize=OPT         Turns on or off a specific optimization
                               Use --list-opt to get a list of optimizations
        --security[=mode]      Turns on the unsupported security manager (off by default)
                               mode is one of cas, core-clr, verifiable or validil
        --attach=OPTIONS       Pass OPTIONS to the attach agent in the runtime.
                               Currently the only supported option is 'disable'.
        --llvm, --nollvm       Controls whenever the runtime uses LLVM to compile code.
        --gc=[sgen,boehm]      Select SGen or Boehm GC (runs mono or mono-sgen)
    root@keystone-evm:/#
    root@keystone-evm:/#

    Try to run .exe with mono command.

    Good luck.

  • Hi Titusrathinaraj,

                      I have tried all the steps that u have mentioned "

    CC=arm-linux-gnueabihf-gcc CFLAGS="-march=armv7-a -mfloat-abi=softfp"

    ./configure --host=arm-linux-gnueabihf --disable-mcs-build

    1)  I have Downloaded Mono 3.0

    2) Created Directory Mono-cross

    3)CC=arm-arago-linux-gnueabi-gcc CFLAGS="-march=armv7-a -mfloat-abi=softfp"
    4) CD to Mono-Cross directory

    5) tar --xjvf ../mono-3.0.0.tar.bz2      // as zip is out side the folder

    6)cd mono-3.0.0

    7)./configure --host=arm-arago-linux-gnueabi --disable-mcs-disable

    8)make

    Got Error after this : 'GC_local_malloc'

    to solve this I modified ./configure  to ---

    ./configure --host=arm-arago-linux-gnueabi --disable-mcs-disable --with-tls=pthread

    after performing this command it excute well and above error removed : but one new error : found -- "MonoContext"

    Is there any necessary to remove this error :

    Thanks for support

  • Hi Praveen,

    I have downloaded "mono" package from the following link.

    https://github.com/mono/mono

  • Hi

    I have cross compiled mono-4.9 using TI-SDK ti-processor-sdk-linux-am335x-evm-03.02.00.05  using the following command:

    1)  export PATH=/home/canary/ti-processor-sdk-linux-am335x-evm-03.02.00.05/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:$PATH

    2) export CROSS_COMPILE=/home/canary/ti-processor-sdk-linux-am335x-evm-03.02.00.05/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-

    3) export CC=${CROSS_COMPILE}gcc

    4) export ARCH=arm

    5) cd mono-4.9.0/

    6) ./configure --host=arm-linux-gnueabihf --disable-mcs-disable --with-tls=pthread

    7)make install DESTDIR=/home/canary/ti-am335x-03.02.00.05/mono

    I have copied all the libraries and binary inside the respectable directories.

    I have created a simple Hello World program.

    vi hello.cs

    using System;
     
    public class HelloWorld
    {
        static public void Main ()
        {
            Console.WriteLine ("Hello Mono World");
        }
    }

    I am getting the following error

    mono: /lib/libc.so.6: version `GLIBC_2.16' not found (required by mono)

    Thanks

    Deep