Native code on ChipX

I have my code running on ChipX.

Now how do I make it run native. So it can be faster

Search for “RLP” on this forum and documentation.

I searched and do not see anything usefull. Like sample code or doc.

WOuld you point me to it

See fezzer for my example

So I see this code on feezer. But no explanation.
So is my assumption correct.
The first function below is c or cpp.
And is a seperate project or can it be in the same project?
How do I cross compile it for the ChipX.
Then this arm elf file is used like a dll by the .NET MF C# code.
And wher is the parameters for the function passed?

// Include RLP 
 #include <RLP.h> 
// Add 29 + 92 and return 
int Add_c(unsigned int *generalArray, void **args, unsigned int argsCount, unsigned int *argSize) 
{ 
    return 29 + 92; 
}
---
using System;

using System;
using Microsoft.SPOT;
using GHIElectronics.NETMF.System;
using GHIElectronics.NETMF.Native;
namespace RLPTest
{
    public class Program
    {
        public static void Main()
        {
            // Load ELF in byte array 
            byte[] elfFile = Resources.GetBytes(Resources.BinaryResources.Hello_World);
            // Load ELF to RLP 
            RLP.LoadELF(elfFile);
            RLP.InitializeBSSRegion(elfFile);
            // Ge the procedure 
            RLP.Procedure add = RLP.GetProcedure(elfFile, "Add_c");
            // Invoke it 
            Debug.Print(add.Invoke().ToString());
        }
    }
}


The docs explain it all with code examples. Do not use the fezzer example to get started.

Are you trying to convert your managed code to unmanaged code?

Gus, which docs explains it all? Is it too much trouble to post a link?

Click on
Help → GHI netmf lib
on top menu

http://www.ghielectronics.com/downloads/NETMF/Library%20Documentation/Index.html

Then find RLP class