Main Site Documentation

Cerberus and RLP Light


#1

Hello, I am trying to get my head around RLP light on the Cerberus board. At the moment I simply want to call an RLP lite function that returns an integer, I will expand it once I get it going.

I am currently struggling to even get it running. In debug it hits the invoke line and then never returns. Can anyone see what I am doing wrong?

My C# code


using System;
using System.Collections;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using GHI.OSHW.Native;
using GHI.OSHW.Hardware.LowLevel;

namespace VGA_Cerb
{
    public partial class Program
    {
        // This method is run when the mainboard is powered up or reset.   
        void ProgramStarted()
        {

            byte[] binfile = Resources.GetBytes(Resources.BinaryResources.RLPVGA);
            AddressSpace.Write(0x2001A000, binfile, 0, binfile.Length);

            RLPLite.Procedure RLP_VGAInit = new RLPLite.Procedure(0x2001a0bc);

            byte[] b = new byte[1];
            byte[] b2 = new byte[1];
            int[] i = new int[1];
             
            int boo = RLP_VGAInit.Invoke(new byte[0], new int[0], new byte[0]); //b, i, b2);

            // Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
            Debug.Print("Program Started");
        }
    }
}


and my RLP, very simple



int notinit = 32;

int VGA_Init(void* par0, int* par1, unsigned char* par2)
{
	int i = 32;
	return i;	
}

int main()
{
	return 0;
}

I am using uVision4 with the following settings for the Cerb

R/O base: 0x3000
R/W base: 0x2001A000
Atmel AT91SAM9RL64

the address for the procedure from the map file is 0x2001a0bc (Same as the code above)

Can anyone see anything obvious? I have to reflash the Cerb after every boot so I am guessing its an address problem :frowning:

Thanks for reading :slight_smile:

Paul


#2

@ Bodwad

I noticed that the processor that you selected is for the Hydra. Select the processor type that is for the Cerberus (STM32F405). That may fix the problem. Try that and let us know if it worked.


#3

Ok thanks, it doesn’t compile now as it needs extra headers or something for the new processor type. Will try and work this out.

Thanks for the help :slight_smile:

Paul